Skip to content

Commit

Permalink
Merge branch 'main' into split_vertical_fluxes
Browse files Browse the repository at this point in the history
  • Loading branch information
SouthEndMusic committed Mar 25, 2024
2 parents 8e0d15b + fe57d38 commit f0b5703
Show file tree
Hide file tree
Showing 17 changed files with 40 additions and 50 deletions.
7 changes: 2 additions & 5 deletions .teamcity/Ribasim/buildTypes/Ribasim_GenerateTestmodels.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,10 @@ pixi run generate-testmodels]]></param>
</parameters>
</runner>
</build-runners>
<vcs-settings>
<vcs-entry-ref root-id="Ribasim_Ribasim">
<checkout-rule rule=". =&gt; ribasim" />
</vcs-entry-ref>
</vcs-settings>
<vcs-settings />
<requirements>
<does-not-equal id="RQ_275" name="env.OS" value="Windows_NT" />
<does-not-equal id="RQ_339" name="teamcity.agent.name" value="Default Agent" />
</requirements>
<build-triggers>
<build-trigger id="TRIGGER_646" type="vcsTrigger">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<build-runners />
<vcs-settings>
<vcs-entry-ref root-id="Ribasim_Ribasim">
<checkout-rule rule="ribasim" />
<checkout-rule rule=". =&gt; ribasim" />
</vcs-entry-ref>
</vcs-settings>
<requirements />
Expand All @@ -17,7 +17,7 @@
<param name="github_authentication_type" value="token" />
<param name="github_host" value="https://api.github.com" />
<param name="publisherId" value="githubStatusPublisher" />
<param name="secure:github_access_token" value="credentialsJSON:558df52e-822f-4d9d-825a-854846a9a2ff" />
<param name="secure:github_access_token" value="credentialsJSON:6b37af71-1f2f-4611-8856-db07965445c0" />
<param name="vcsRootId" value="Ribasim_Ribasim" />
</parameters>
</extension>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<description />
<settings>
<parameters>
<param name="env.GITHUB_TOKEN" value="%github_teamcity-deltares_public_access_token%" />
<param name="env.GITHUB_TOKEN" value="%github_deltares-service-account_access_token%" />
</parameters>
<build-runners>
<runner id="RUNNER_2523" name="Push release to GitHub" type="simpleRunner">
Expand All @@ -14,8 +14,7 @@ set -euxo pipefail
. /usr/share/Modules/init/bash
module load pixi
pixi run github-release
]]></param>
pixi run github-release]]></param>
<param name="teamcity.step.mode" value="default" />
<param name="use.custom.script" value="true" />
</parameters>
Expand Down Expand Up @@ -112,3 +111,4 @@ pixi run github-release
</cleanup>
</settings>
</build-type>

10 changes: 0 additions & 10 deletions .teamcity/Ribasim/buildTypes/Ribasim_Ribasim_MakeQgisPlugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,6 @@ zip -r ribasim_qgis.zip ribasim_qgis]]></param>
</parameters>
</build-trigger>
</build-triggers>
<dependencies>
<depend-on sourceBuildTypeId="Ribasim_Windows_BuildRibasimCli">
<options>
<option name="run-build-if-dependency-failed" value="CANCEL" />
<option name="run-build-if-dependency-failed-to-start" value="CANCEL" />
<option name="take-started-build-with-same-revisions" value="true" />
<option name="take-successful-builds-only" value="true" />
</options>
</depend-on>
</dependencies>
<cleanup />
</settings>
</build-type>
Expand Down
28 changes: 14 additions & 14 deletions .teamcity/Ribasim/project-config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,20 @@
<name>Ribasim</name>
<parameters />
<project-extensions>
<extension id="AmazonWebServicesAws" type="OAuthProvider">
<parameters>
<param name="awsAccessKeyId" value="AKIAQBIN2MPWXSD2IZ5F" />
<param name="awsCredentialsType" value="awsAccessKeys" />
<param name="awsIamRoleSessionName" value="TeamCity-session" />
<param name="awsRegionName" value="eu-west-3" />
<param name="awsSessionCredentials" value="false" />
<param name="awsSessionDuration" value="60" />
<param name="awsStsEndpoint" value="https://sts.eu-west-3.amazonaws.com" />
<param name="displayName" value="Amazon Web Services (AWS)" />
<param name="providerType" value="AWS" />
<param name="secure:awsSecretAccessKey" value="credentialsJSON:dba90026-9856-4f87-94d9-bab91f3f2d5c" />
</parameters>
</extension>
<extension id="PROJECT_EXT_106" type="active_storage">
<parameters>
<param name="active.storage.feature.id" value="s3_ribasim" />
Expand Down Expand Up @@ -46,20 +60,6 @@
<param name="storage.type" value="S3_storage" />
</parameters>
</extension>
<extension id="AmazonWebServicesAws" type="OAuthProvider">
<parameters>
<param name="awsAccessKeyId" value="AKIAQBIN2MPWXSD2IZ5F" />
<param name="awsCredentialsType" value="awsAccessKeys" />
<param name="awsIamRoleSessionName" value="TeamCity-session" />
<param name="awsRegionName" value="eu-west-3" />
<param name="awsSessionCredentials" value="false" />
<param name="awsSessionDuration" value="60" />
<param name="awsStsEndpoint" value="https://sts.eu-west-3.amazonaws.com" />
<param name="displayName" value="Amazon Web Services (AWS)" />
<param name="providerType" value="AWS" />
<param name="secure:awsSecretAccessKey" value="credentialsJSON:dba90026-9856-4f87-94d9-bab91f3f2d5c" />
</parameters>
</extension>
</project-extensions>
<cleanup />
</project>
Expand Down
6 changes: 3 additions & 3 deletions .teamcity/Ribasim/vcsRoots/Ribasim_Ribasim.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@
<name>Ribasim</name>
<param name="agentCleanFilesPolicy" value="ALL_UNTRACKED" />
<param name="agentCleanPolicy" value="ON_BRANCH_CHANGE" />
<param name="authMethod" value="ACCESS_TOKEN" />
<param name="authMethod" value="PASSWORD" />
<param name="branch" value="main" />
<param name="ignoreKnownHosts" value="true" />
<param name="reportTagRevisions" value="true" />
<param name="secure:password" value="credentialsJSON:abf605ce-e382-4b10-b5de-8a7640dc58d9" />
<param name="submoduleCheckout" value="CHECKOUT" />
<param name="teamcity:branchSpec"><![CDATA[+:refs/heads/*
+:refs/tags/*
-:refs/heads/gh-pages]]></param>
<param name="tokenId" value="tc_token_id:CID_96d1eedfd6e8bb3ca5e1dcd3ad2e3fe9:-1:80c953f8-a7b4-4c2c-8860-1279fc1f86e4" />
<param name="url" value="https://github.com/Deltares/Ribasim" />
<param name="useAlternates" value="AUTO" />
<param name="username" value="oauth2" />
<param name="username" value="teamcity-deltares" />
<param name="usernameStyle" value="USERID" />
</vcs-root>

Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ pixi run build-libribasim]]></param>
<param name="github_authentication_type" value="token" />
<param name="github_host" value="https://api.github.com" />
<param name="publisherId" value="githubStatusPublisher" />
<param name="secure:github_access_token" value="credentialsJSON:71420214-373c-4ccd-ba32-2ea886843f62" />
<param name="secure:github_access_token" value="credentialsJSON:6b37af71-1f2f-4611-8856-db07965445c0" />
</parameters>
</extension>
</build-extensions>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ pixi run build-ribasim-cli]]></param>
<param name="github_authentication_type" value="token" />
<param name="github_host" value="https://api.github.com" />
<param name="publisherId" value="githubStatusPublisher" />
<param name="secure:github_access_token" value="credentialsJSON:71420214-373c-4ccd-ba32-2ea886843f62" />
<param name="secure:github_access_token" value="credentialsJSON:6b37af71-1f2f-4611-8856-db07965445c0" />
</parameters>
</extension>
</build-extensions>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ pixi run test-ribasim-api]]></param>
<param name="github_authentication_type" value="token" />
<param name="github_host" value="https://api.github.com" />
<param name="publisherId" value="githubStatusPublisher" />
<param name="secure:github_access_token" value="credentialsJSON:71420214-373c-4ccd-ba32-2ea886843f62" />
<param name="secure:github_access_token" value="credentialsJSON:6b37af71-1f2f-4611-8856-db07965445c0" />
</parameters>
</extension>
<extension id="BUILD_EXT_145" type="xml-report-plugin">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ pixi run test-ribasim-cli]]></param>
<param name="github_authentication_type" value="token" />
<param name="github_host" value="https://api.github.com" />
<param name="publisherId" value="githubStatusPublisher" />
<param name="secure:github_access_token" value="credentialsJSON:71420214-373c-4ccd-ba32-2ea886843f62" />
<param name="secure:github_access_token" value="credentialsJSON:6b37af71-1f2f-4611-8856-db07965445c0" />
</parameters>
</extension>
<extension id="BUILD_EXT_145" type="xml-report-plugin">
Expand Down
4 changes: 1 addition & 3 deletions .teamcity/Ribasim_Linux/project-config.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" parent-id="Ribasim" uuid="cb1be3ff-9395-4b93-8bf1-50ff8f19edeb" xsi:noNamespaceSchemaLocation="https://www.jetbrains.com/teamcity/schemas/2021.1/project-config.xsd">
<name>Linux</name>
<parameters>
<param name="env.JULIA_SSL_CA_ROOTS_PATH" value="/etc/ssl/certs/ca-bundle.crt" />
</parameters>
<parameters />
<cleanup />
</project>

Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ pixi run build-libribasim]]></param>
<param name="github_authentication_type" value="token" />
<param name="github_host" value="https://api.github.com" />
<param name="publisherId" value="githubStatusPublisher" />
<param name="secure:github_access_token" value="credentialsJSON:71420214-373c-4ccd-ba32-2ea886843f62" />
<param name="secure:github_access_token" value="credentialsJSON:6b37af71-1f2f-4611-8856-db07965445c0" />
</parameters>
</extension>
</build-extensions>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ pixi run build-ribasim-cli]]></param>
<param name="github_authentication_type" value="token" />
<param name="github_host" value="https://api.github.com" />
<param name="publisherId" value="githubStatusPublisher" />
<param name="secure:github_access_token" value="credentialsJSON:71420214-373c-4ccd-ba32-2ea886843f62" />
<param name="secure:github_access_token" value="credentialsJSON:6b37af71-1f2f-4611-8856-db07965445c0" />
</parameters>
</extension>
</build-extensions>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
<param name="github_authentication_type" value="token" />
<param name="github_host" value="https://api.github.com" />
<param name="publisherId" value="githubStatusPublisher" />
<param name="secure:github_access_token" value="credentialsJSON:71420214-373c-4ccd-ba32-2ea886843f62" />
<param name="secure:github_access_token" value="credentialsJSON:6b37af71-1f2f-4611-8856-db07965445c0" />
<param name="vcsRootId" value="Ribasim_Ribasim" />
</parameters>
</extension>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
<param name="github_authentication_type" value="token" />
<param name="github_host" value="https://api.github.com" />
<param name="publisherId" value="githubStatusPublisher" />
<param name="secure:github_access_token" value="credentialsJSON:71420214-373c-4ccd-ba32-2ea886843f62" />
<param name="secure:github_access_token" value="credentialsJSON:6b37af71-1f2f-4611-8856-db07965445c0" />
<param name="vcsRootId" value="Ribasim_Ribasim" />
</parameters>
</extension>
Expand Down
2 changes: 0 additions & 2 deletions .teamcity/Ribasim_Windows/project-config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" parent-id="Ribasim" uuid="4c0eeff3-9b2d-4b06-8c99-647ca57a0dc3" xsi:noNamespaceSchemaLocation="https://www.jetbrains.com/teamcity/schemas/2021.1/project-config.xsd">
<name>Windows</name>
<parameters />
<project-extensions>
</project-extensions>
<cleanup />
</project>

7 changes: 7 additions & 0 deletions core/src/model.jl
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,13 @@ function Model(config::Config)::Model
state = load_structvector(db, config, BasinStateV1)
n = length(get_ids(db, "Basin"))

sql = "SELECT node_id FROM Node ORDER BY node_id"
node_id = only(execute(columntable, db, sql))
if !allunique(node_id)
error(
"Node IDs need to be globally unique until https://github.com/Deltares/Ribasim/issues/1262 is fixed.",
)
end
finally
# always close the database, also in case of an error
close(db)
Expand Down

0 comments on commit f0b5703

Please sign in to comment.