Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression tests for ODE solver and integration tests for production model is in place #1695

Merged
merged 63 commits into from
Aug 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
e697dbb
a integration test
Jingru923 Jul 30, 2024
3f5a858
Merge branch 'main' into bench-large-model
Jingru923 Jul 31, 2024
f5a151b
add a log for performance
Jingru923 Jul 31, 2024
eb20bf3
separate integration test from unit tests
Jingru923 Jul 31, 2024
ee7ae61
debug test and reduce duplication
Jingru923 Jul 31, 2024
4667ed9
TC configuration
Jingru923 Aug 1, 2024
4085a52
fix vcs step1
Jingru923 Aug 1, 2024
f78544b
fix vcs 2
Jingru923 Aug 1, 2024
9cb981a
vcs fix 3
Jingru923 Aug 1, 2024
d969b4f
fix vcs 4
Jingru923 Aug 1, 2024
cebadcc
vcs fix 5
Jingru923 Aug 1, 2024
f07d327
vcs fix 6
Jingru923 Aug 1, 2024
df5d94a
move windows template to Ribasim/Project.kt
Jingru923 Aug 1, 2024
b17153d
sandbox fix 1
Jingru923 Aug 1, 2024
28b8fcc
linux integration test pipeline is in place
Jingru923 Aug 2, 2024
3921022
fixes linux pipeline
Jingru923 Aug 2, 2024
af54697
try matrix build
Jingru923 Aug 2, 2024
2048e07
reduce duplication in buildtype
Jingru923 Aug 2, 2024
7d6f9d6
cherrypick restructure test group
Jingru923 Aug 5, 2024
de826bb
regression pipeline for ODE solver is up
Jingru923 Aug 5, 2024
6c847d8
fix artifact path
Jingru923 Aug 5, 2024
2fe24ed
adding benchmark
Jingru923 Aug 5, 2024
ad07487
fix templates
Jingru923 Aug 5, 2024
64de8b0
try this
Jingru923 Aug 5, 2024
281e736
change name for two pipelines
Jingru923 Aug 5, 2024
717d34f
try restructure
Jingru923 Aug 5, 2024
b811ec3
try restructure 2
Jingru923 Aug 5, 2024
d79907e
add name field
Jingru923 Aug 5, 2024
1d6d873
delete comments
Jingru923 Aug 5, 2024
c6b484c
update documentation
Jingru923 Aug 6, 2024
ab7944e
correct typos and grammar error
Jingru923 Aug 6, 2024
2a31f2b
address comment for julia part
Jingru923 Aug 7, 2024
b99830a
Test if build is needed for test pipeline
Jingru923 Aug 7, 2024
7f81198
add trigger back to pipeline
Jingru923 Aug 8, 2024
b2455a0
refactor pipeline
Jingru923 Aug 8, 2024
bc1a563
test changes
Jingru923 Aug 8, 2024
c9cc0de
recover commented lines
Jingru923 Aug 8, 2024
752c1c5
update vcs
Jingru923 Aug 8, 2024
b497cf5
add authoring method
Jingru923 Aug 8, 2024
8c1ef6e
revert setting
Jingru923 Aug 8, 2024
7bbf010
add white line
Jingru923 Aug 8, 2024
2831d9f
update credentials
Jingru923 Aug 9, 2024
a8c6701
Revert "update credentials"
Jingru923 Aug 9, 2024
7926096
update the artifact storage
Jingru923 Aug 9, 2024
f7b9cee
Merge branch 'main' into bench-large-model
Jingru923 Aug 9, 2024
63921c6
Revert "Merge branch 'main' into bench-large-model"
Jingru923 Aug 9, 2024
f76ae6d
ignore .iidea
Jingru923 Aug 9, 2024
624124d
ignore .idea
Jingru923 Aug 9, 2024
236ecf9
created python script to retrieve MiniO file
Jingru923 Aug 9, 2024
4c27482
add steps on TC to get hws
Jingru923 Aug 9, 2024
a765d82
change path to hws model and its benchmark
Jingru923 Aug 9, 2024
bcef9ad
address 2nd round of comment
Jingru923 Aug 9, 2024
3ac542d
leave time for TC agent to run
Jingru923 Aug 9, 2024
85752a1
rename
Jingru923 Aug 9, 2024
db3a045
remove benchmark from repo since it's obtained from MiniO
Jingru923 Aug 9, 2024
9274ed4
add password
Jingru923 Aug 9, 2024
35730b9
give 1 hour runtime limit for TC
Jingru923 Aug 12, 2024
a640cbb
merge two interface into one
Jingru923 Aug 12, 2024
45ad313
delete place holder TODOs, and move those to relevant issues
Jingru923 Aug 12, 2024
d12cd47
sync pixi.lock with main
Jingru923 Aug 12, 2024
4fbd427
revert wrongly-reverted commit
Jingru923 Aug 12, 2024
2ddc305
fix the path to models after the merge of two API
Jingru923 Aug 13, 2024
fc751e4
final fixes
Jingru923 Aug 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ playground/output
# Ruff
.ruff_cache
.teamcity/.idea/
.idea/

# https://github.com/Deltares/Ribasim/issues/1652
ribasim_qgis/tests/data/database.gpkg
32 changes: 21 additions & 11 deletions .teamcity/Ribasim/Project.kt
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@ import Ribasim.vcsRoots.Ribasim
import Ribasim_Linux.RibasimLinuxProject
import Ribasim_Windows.RibasimWindowsProject
import Templates.*
import Testbench.Testbench
import jetbrains.buildServer.configs.kotlin.Project
import jetbrains.buildServer.configs.kotlin.projectFeatures.activeStorage
import jetbrains.buildServer.configs.kotlin.projectFeatures.awsConnection
import jetbrains.buildServer.configs.kotlin.projectFeatures.githubIssues
import jetbrains.buildServer.configs.kotlin.projectFeatures.s3Storage
import jetbrains.buildServer.configs.kotlin.projectFeatures.*

object Project : Project({

Expand All @@ -23,28 +21,39 @@ object Project : Project({

template(GithubCommitStatusIntegration)
template(GithubPullRequestsIntegration)
template(WindowsAgent)
template(BuildWindows)
template(LinuxAgent)
template(BuildLinux)

features {
awsConnection {
id = "AmazonWebServicesAws"
name = "Amazon Web Services (AWS)"
regionName = "eu-west-3"
credentialsType = static {
accessKeyId = "AKIAQBIN2MPWXSD2IZ5F"
secretAccessKey = "credentialsJSON:dba90026-9856-4f87-94d9-bab91f3f2d5c"
accessKeyId = "KwKRzscudy3GvRB8BN1Z"
secretAccessKey = "credentialsJSON:86cbf3e5-724c-437d-9962-7a3f429b0aa2"
useSessionCredentials = false
stsEndpoint = "https://sts.eu-west-3.amazonaws.com"
stsEndpoint = "https://s3-console.deltares.nl"
}
}
activeStorage {
id = "PROJECT_EXT_106"
activeStorageID = "s3_ribasim"
}
githubIssues {
id = "PROJECT_EXT_107"
displayName = "Ribasim GitHub Issues"
repositoryURL = "https://github.com/Deltares/Ribasim"
}
s3CompatibleStorage {
id = "PROJECT_EXT_171"
accessKeyID = "KwKRzscudy3GvRB8BN1Z"
accessKey = "credentialsJSON:86cbf3e5-724c-437d-9962-7a3f429b0aa2"
endpoint = "https://s3.deltares.nl"
bucketName = "ribasim"
}
activeStorage {
id = "PROJECT_EXT_172"
activeStorageID = "PROJECT_EXT_171"
}
s3Storage {
id = "s3_ribasim"
storageName = "s3"
Expand All @@ -61,4 +70,5 @@ object Project : Project({

subProject(RibasimLinuxProject)
subProject(RibasimWindowsProject)
subProject(Testbench)
})
2 changes: 0 additions & 2 deletions .teamcity/Ribasim_Linux/RibasimLinuxProject.kt
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ object RibasimLinuxProject : Project({
buildType(Linux_BuildRibasim)
buildType(Linux_TestRibasimBinaries)

template(LinuxAgent)
template(BuildLinux)
template(TestBinariesLinux)
})

Expand Down
2 changes: 0 additions & 2 deletions .teamcity/Ribasim_Windows/RibasimWindowsProject.kt
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ object RibasimWindowsProject : Project({
buildType(Windows_TestDelwaqCoupling)
buildType(Windows_TestRibasimBinaries)

template(WindowsAgent)
template(BuildWindows)
template(TestBinariesWindows)
template(TestDelwaqCouplingWindows)
})
Expand Down
75 changes: 75 additions & 0 deletions .teamcity/Templates/IntegrationTest.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
package Templates

import Ribasim_Windows.Windows_BuildRibasim
import Ribasim_Linux.Linux_BuildRibasim
import jetbrains.buildServer.configs.kotlin.Template
import jetbrains.buildServer.configs.kotlin.buildFeatures.XmlReport
import jetbrains.buildServer.configs.kotlin.buildFeatures.xmlReport
import jetbrains.buildServer.configs.kotlin.buildSteps.script
import jetbrains.buildServer.configs.kotlin.triggers.schedule

fun generateIntegrationTestHeader(platformOs: String): String {
if (platformOs == "Linux") {
return """
#!/bin/bash
# black magic
source /usr/share/Modules/init/bash

module load pixi
""".trimIndent() + System.lineSeparator()
}

return ""
}

open class IntegrationTest (platformOs: String) : Template() {

init {
name = "IntegrationTest_${platformOs}_Template"

artifactRules = """


""".trimIndent()

vcs {
root(Ribasim.vcsRoots.Ribasim, ". => ribasim")
cleanCheckout = true
}
params {
password("MiniO_credential_token", "credentialsJSON:86cbf3e5-724c-437d-9962-7a3f429b0aa2")
}
val header = generateIntegrationTestHeader(platformOs)

steps {
script {
name = "Set up pixi"
id = "RUNNER_1505"
workingDir = "ribasim"
scriptContent = header +
"""
pixi --version
pixi run install-ci
""".trimIndent()
}
script {
name = "Run integration tests"
id = "RUNNER_1507"
workingDir = "ribasim"
scriptContent = header +
"""
pixi run python utils/get_benchmark.py %MiniO_credential_token% "hws_2024_7_0/"
pixi run model-integration-test
""".trimIndent()
}
}

failureConditions {
executionTimeoutMin = 90
}

}
}

object IntegrationTestWindows : IntegrationTest("Windows")
object IntegrationTestLinux : IntegrationTest("Linux")
75 changes: 75 additions & 0 deletions .teamcity/Templates/RegressionTest.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
package Templates

import Ribasim_Windows.Windows_BuildRibasim
import Ribasim_Linux.Linux_BuildRibasim
import jetbrains.buildServer.configs.kotlin.Template
import jetbrains.buildServer.configs.kotlin.buildFeatures.XmlReport
import jetbrains.buildServer.configs.kotlin.buildFeatures.xmlReport
import jetbrains.buildServer.configs.kotlin.buildSteps.script
import jetbrains.buildServer.configs.kotlin.triggers.schedule

fun generateRegressionTestHeader(platformOs: String): String {
if (platformOs == "Linux") {
return """
#!/bin/bash
# black magic
source /usr/share/Modules/init/bash

module load pixi
""".trimIndent() + System.lineSeparator()
}

return ""
}

open class RegressionTest (platformOs: String) : Template() {

init {
name = "RegressionTest_${platformOs}_Template"

artifactRules = """


""".trimIndent()

vcs {
root(Ribasim.vcsRoots.Ribasim, ". => ribasim")
cleanCheckout = true
}
params {
password("MiniO_credential_token", "credentialsJSON:86cbf3e5-724c-437d-9962-7a3f429b0aa2")
}
val header = generateRegressionTestHeader(platformOs)

steps {
script {
name = "Set up pixi"
id = "RUNNER_1509"
workingDir = "ribasim"
scriptContent = header +
"""
pixi --version
pixi run install-ci
""".trimIndent()
}
script {
name = "Run regression tests"
id = "RUNNER_1511"
workingDir = "ribasim"
scriptContent = header +
"""
pixi run python utils/get_benchmark.py %MiniO_credential_token% "benchmark/"
pixi run test-ribasim-regression
""".trimIndent()
}
}

failureConditions {
executionTimeoutMin = 30
}

}
}

object RegressionTestWindows : RegressionTest("Windows")
object RegressionTestLinux : RegressionTest("Linux")
55 changes: 55 additions & 0 deletions .teamcity/Testbench/IntegrationTestHWS.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
package Testbench.IntegrationTestHWS

import Ribasim_Linux.Linux_BuildRibasim
import Ribasim_Windows.Windows_BuildRibasim
import Templates.*
import jetbrains.buildServer.configs.kotlin.BuildType
import jetbrains.buildServer.configs.kotlin.Project
import jetbrains.buildServer.configs.kotlin.triggers.schedule

object IntegrationTestHWS : Project ({
id("IntegrationTestHWS")
name = "IntegrationTestHWS"

buildType(IntegrationTest_Windows)
buildType(IntegrationTest_Linux)

template(IntegrationTestWindows)
template(IntegrationTestLinux)
})

object IntegrationTest_Windows : BuildType({
name = "IntegrationTestWindows"
templates(WindowsAgent, GithubCommitStatusIntegration, IntegrationTestWindows)

triggers{
schedule {
id = ""
schedulingPolicy = daily {
hour = 0
}

branchFilter = "+:<default>"
triggerBuild = always()
withPendingChangesOnly = true
}
}
})

object IntegrationTest_Linux : BuildType({
name = "IntegrationTestLinux"
templates(LinuxAgent, GithubCommitStatusIntegration, IntegrationTestLinux)

triggers{
schedule {
id = ""
schedulingPolicy = daily {
hour = 0
}

branchFilter = "+:<default>"
triggerBuild = always()
withPendingChangesOnly = true
}
}
})
57 changes: 57 additions & 0 deletions .teamcity/Testbench/RegressionTestODESolve.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
package Testbench.RegressionTestODESolve

import Ribasim_Windows.Windows_BuildRibasim
import Ribasim_Linux.Linux_BuildRibasim
import Templates.*
import jetbrains.buildServer.configs.kotlin.BuildType
import jetbrains.buildServer.configs.kotlin.Project
import jetbrains.buildServer.configs.kotlin.matrix
import jetbrains.buildServer.configs.kotlin.triggers.schedule
import jetbrains.buildServer.configs.kotlin.*

object RegressionTestODESolve : Project({
id("RegressionTestODE")
name = "RegressionTestODE"

buildType(RegressionTest_Windows)
buildType(RegressionTest_Linux)

template(RegressionTestWindows)
template(RegressionTestLinux)
})

object RegressionTest_Windows : BuildType({
name = "RegressionTestWindows"
templates(WindowsAgent, GithubCommitStatusIntegration, RegressionTestWindows)

triggers{
schedule {
id = ""
schedulingPolicy = daily {
hour = 0
}

branchFilter = "+:<default>"
triggerBuild = always()
withPendingChangesOnly = true
}
}
})

object RegressionTest_Linux : BuildType({
name = "RegressionTestLinux"
templates(LinuxAgent, GithubCommitStatusIntegration, RegressionTestLinux)

triggers{
schedule {
id = ""
schedulingPolicy = daily {
hour = 0
}

branchFilter = "+:<default>"
triggerBuild = always()
withPendingChangesOnly = true
}
}
})
12 changes: 12 additions & 0 deletions .teamcity/Testbench/Testbench.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package Testbench

import Templates.*
import Testbench.IntegrationTestHWS.IntegrationTestHWS
import Testbench.RegressionTestODESolve.RegressionTestODESolve
import jetbrains.buildServer.configs.kotlin.Project

object Testbench : Project({
name = "Testbench"
subProject(IntegrationTestHWS)
subProject(RegressionTestODESolve)
})
Loading