From f95c708980e681ef88791a595c43bc4abe06a176 Mon Sep 17 00:00:00 2001 From: Samuel-AMAP Date: Fri, 19 Sep 2025 10:21:58 +0200 Subject: [PATCH 1/7] Remove dev branch references, and add extra check to force a failure if the downstream dependency branch isn't main/master. --- .github/workflows/Integration.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/Integration.yml b/.github/workflows/Integration.yml index 9e965ce92..2099902ee 100644 --- a/.github/workflows/Integration.yml +++ b/.github/workflows/Integration.yml @@ -2,7 +2,7 @@ name: Integration on: push: branches: - - dev + - main tags: "*" pull_request: workflow_dispatch: @@ -32,8 +32,8 @@ jobs: arch: - x64 package: - - {user: PalmStudio, repo: XPalm.jl, branch: dev} - - {user: VEZY, repo: PlantBioPhysics.jl, branch: dev} + - {user: PalmStudio, repo: XPalm.jl, branch: main, default: main} + - {user: VEZY, repo: PlantBioPhysics.jl, branch: master, default: master} steps: - uses: actions/checkout@v4 - uses: julia-actions/setup-julia@v2 @@ -64,6 +64,11 @@ jobs: @info "Testing with an incompatible downstream release as a breaking change was introduced. Expected failure." exception=err exit(0) # Exit immediately, as a success end + - name: Only succeed if the checks pass on the dependencies' main/master branches + if: ${{ matrix.package.branch }} != ${{ matrix.package.default }} + run: | + echo "This action requires the downstream dependencies' branches to be set to their main/master to succeed. Please switch them back and ensure tests pass before merging" + exit 1 - uses: julia-actions/julia-processcoverage@v1 - uses: codecov/codecov-action@v5 with: From c899efe95ad94ef34ca4588070de9c5da09b6996 Mon Sep 17 00:00:00 2001 From: Samuel-AMAP Date: Fri, 19 Sep 2025 10:36:55 +0200 Subject: [PATCH 2/7] Attempt at fixing likely syntax error in the yml --- .github/workflows/Integration.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Integration.yml b/.github/workflows/Integration.yml index 2099902ee..d9bff5246 100644 --- a/.github/workflows/Integration.yml +++ b/.github/workflows/Integration.yml @@ -65,7 +65,7 @@ jobs: exit(0) # Exit immediately, as a success end - name: Only succeed if the checks pass on the dependencies' main/master branches - if: ${{ matrix.package.branch }} != ${{ matrix.package.default }} + if: ${{ matrix.package.branch != matrix.package.default }} run: | echo "This action requires the downstream dependencies' branches to be set to their main/master to succeed. Please switch them back and ensure tests pass before merging" exit 1 From 9ca30aa729444a0aca560f99be0092bab1c4ca35 Mon Sep 17 00:00:00 2001 From: Samuel-AMAP Date: Fri, 19 Sep 2025 10:45:00 +0200 Subject: [PATCH 3/7] Remove 'fit' from the exports, which should cause PBP downstream tests -but not PSE tests- to fail, and the 'Integration' GH action to fail. --- src/PlantSimEngine.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PlantSimEngine.jl b/src/PlantSimEngine.jl index ebf59dcb9..1c7d63bee 100644 --- a/src/PlantSimEngine.jl +++ b/src/PlantSimEngine.jl @@ -111,7 +111,7 @@ export @process, process export to_initialize, is_initialized, init_variables, dep export inputs, outputs, variables, convert_outputs export run! -export fit +#export fit # Re-exporting PlantMeteo main functions: export Atmosphere, TimeStepTable, Constants, Weather From 5492b4ae9e11e8f0da15ccd4c4a4c40c71ab93b2 Mon Sep 17 00:00:00 2001 From: Samuel-AMAP Date: Fri, 19 Sep 2025 15:22:39 +0200 Subject: [PATCH 4/7] Break the run! function, temporarily --- src/PlantSimEngine.jl | 2 +- src/run.jl | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/PlantSimEngine.jl b/src/PlantSimEngine.jl index 1c7d63bee..ebf59dcb9 100644 --- a/src/PlantSimEngine.jl +++ b/src/PlantSimEngine.jl @@ -111,7 +111,7 @@ export @process, process export to_initialize, is_initialized, init_variables, dep export inputs, outputs, variables, convert_outputs export run! -#export fit +export fit # Re-exporting PlantMeteo main functions: export Atmosphere, TimeStepTable, Constants, Weather diff --git a/src/run.jl b/src/run.jl index c0fd916a5..aa228a6f8 100644 --- a/src/run.jl +++ b/src/run.jl @@ -336,7 +336,7 @@ function run_node!( end # Actual call to the model: - run!(node.value, object.models, st, meteo, constants, extra) + #run!(node.value, object.models, st, meteo, constants, extra) node.simulation_id[i] += 1 # increment the simulation id, to know if the model has been called already # Recursively visit the children (soft dependencies only, hard dependencies are handled by the model itself): @@ -344,7 +344,7 @@ function run_node!( #! check if we can run this safely in a @floop loop. I would say no, #! because we are running a parallel computation above already, modifying the node.simulation_id, #! which is not thread-safe. - run_node!(object, child, i, st, meteo, constants, extra) + #run_node!(object, child, i, st, meteo, constants, extra) end end @@ -467,6 +467,6 @@ function run_node_multiscale!( #! check if we can run this safely in a @floop loop. I would say no, #! because we are running a parallel computation above already, modifying the node.simulation_id, #! which is not thread-safe yet. - run_node_multiscale!(object, child, i, models, meteo, constants, extra, check, executor) + #run_node_multiscale!(object, child, i, models, meteo, constants, extra, check, executor) end end \ No newline at end of file From 75e7a6c1a4bcf4b7e2b19e775198be38ff061767 Mon Sep 17 00:00:00 2001 From: Samuel-AMAP Date: Fri, 19 Sep 2025 16:14:19 +0200 Subject: [PATCH 5/7] Point downstream yml to PBP dummy PR, tests should still break --- .github/workflows/Integration.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Integration.yml b/.github/workflows/Integration.yml index d9bff5246..ed212f344 100644 --- a/.github/workflows/Integration.yml +++ b/.github/workflows/Integration.yml @@ -33,7 +33,7 @@ jobs: - x64 package: - {user: PalmStudio, repo: XPalm.jl, branch: main, default: main} - - {user: VEZY, repo: PlantBioPhysics.jl, branch: master, default: master} + - {user: VEZY, repo: PlantBioPhysics.jl, branch: CI_downstream_changes_tests, default: master} steps: - uses: actions/checkout@v4 - uses: julia-actions/setup-julia@v2 From 2031d269af2cce9507791f01a058aa23c5794fac Mon Sep 17 00:00:00 2001 From: Samuel-AMAP Date: Fri, 19 Sep 2025 16:24:15 +0200 Subject: [PATCH 6/7] Fix the run! function --- src/run.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/run.jl b/src/run.jl index aa228a6f8..c0fd916a5 100644 --- a/src/run.jl +++ b/src/run.jl @@ -336,7 +336,7 @@ function run_node!( end # Actual call to the model: - #run!(node.value, object.models, st, meteo, constants, extra) + run!(node.value, object.models, st, meteo, constants, extra) node.simulation_id[i] += 1 # increment the simulation id, to know if the model has been called already # Recursively visit the children (soft dependencies only, hard dependencies are handled by the model itself): @@ -344,7 +344,7 @@ function run_node!( #! check if we can run this safely in a @floop loop. I would say no, #! because we are running a parallel computation above already, modifying the node.simulation_id, #! which is not thread-safe. - #run_node!(object, child, i, st, meteo, constants, extra) + run_node!(object, child, i, st, meteo, constants, extra) end end @@ -467,6 +467,6 @@ function run_node_multiscale!( #! check if we can run this safely in a @floop loop. I would say no, #! because we are running a parallel computation above already, modifying the node.simulation_id, #! which is not thread-safe yet. - #run_node_multiscale!(object, child, i, models, meteo, constants, extra, check, executor) + run_node_multiscale!(object, child, i, models, meteo, constants, extra, check, executor) end end \ No newline at end of file From ba1cfd2e952b7783377acb807b9c001322e6258e Mon Sep 17 00:00:00 2001 From: Samuel-AMAP Date: Fri, 19 Sep 2025 16:32:52 +0200 Subject: [PATCH 7/7] Revert PBP testing branch to master, the branch status check should now pass --- .github/workflows/Integration.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Integration.yml b/.github/workflows/Integration.yml index ed212f344..d9bff5246 100644 --- a/.github/workflows/Integration.yml +++ b/.github/workflows/Integration.yml @@ -33,7 +33,7 @@ jobs: - x64 package: - {user: PalmStudio, repo: XPalm.jl, branch: main, default: main} - - {user: VEZY, repo: PlantBioPhysics.jl, branch: CI_downstream_changes_tests, default: master} + - {user: VEZY, repo: PlantBioPhysics.jl, branch: master, default: master} steps: - uses: actions/checkout@v4 - uses: julia-actions/setup-julia@v2