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

Add pixi run ribasim-models to run all test models #1224

Merged
merged 5 commits into from
Mar 11, 2024
Merged

Add pixi run ribasim-models to run all test models #1224

merged 5 commits into from
Mar 11, 2024

Conversation

visr
Copy link
Member

@visr visr commented Mar 8, 2024

This runs them all in a single Julia session to avoid latency. I didn't add this to CI for now since we already run them all on TeamCity using the CLI. But this is especially helpful during development to see which models fail and why.

If I intentionally break two models you see this output at the end:

[ Info: Ran 32 models, 30 passed, 2 failed.
Failed models:
bucket
rating_curve

And in between the normal output:

[ Info: Running model bucket
ERROR: expect key: starttime
Stacktrace:
  [1] error(s::String)
    @ Base .\error.jl:35
  [2] macro expansion
    @ C:\Users\visser_mn\.julia\packages\Configurations\Yxczn\src\from_dict.jl:0 [inlined]
  [3] from_dict_specialize(::Type{Ribasim.config.Toml}, d::Dict{String, Any})
    @ Ribasim.config C:\Users\visser_mn\.julia\packages\Configurations\Yxczn\src\codegen.jl:362
  [4] #from_dict#4
    @ C:\Users\visser_mn\.julia\packages\Configurations\Yxczn\src\from_dict.jl:46 [inlined]
  [5] from_dict
    @ C:\Users\visser_mn\.julia\packages\Configurations\Yxczn\src\from_dict.jl:33 [inlined]
  [6] from_toml(::Type{Ribasim.config.Toml}, filename::String; kw::@Kwargs{})
    @ Configurations C:\Users\visser_mn\.julia\packages\Configurations\Yxczn\src\from_toml.jl:18
  [7] from_toml
    @ C:\Users\visser_mn\.julia\packages\Configurations\Yxczn\src\from_toml.jl:8 [inlined]
  [8] #Config#62
    @ D:\Ribasim\core\src\config.jl:147 [inlined]
  [9] Config
    @ D:\Ribasim\core\src\config.jl:146 [inlined]
┌ Error: Simulation failed
│   modelname = "bucket"
└ @ Main D:\Ribasim\utils\testmodelrun.jl:15

@visr visr merged commit 4610c0d into main Mar 11, 2024
22 of 23 checks passed
@visr visr deleted the runner branch March 11, 2024 10:31
Hofer-Julian added a commit that referenced this pull request Mar 11, 2024
This runs them all in a single Julia session to avoid latency. I didn't
add this to CI for now since we already run them all on TeamCity using
the CLI. But this is especially helpful during development to see which
models fail and why.

If I intentionally break two models you see this output at the end:

```
[ Info: Ran 32 models, 30 passed, 2 failed.
Failed models:
bucket
rating_curve
```

And in between the normal output:
```
[ Info: Running model bucket
ERROR: expect key: starttime
Stacktrace:
  [1] error(s::String)
    @ Base .\error.jl:35
  [2] macro expansion
    @ C:\Users\visser_mn\.julia\packages\Configurations\Yxczn\src\from_dict.jl:0 [inlined]
  [3] from_dict_specialize(::Type{Ribasim.config.Toml}, d::Dict{String, Any})
    @ Ribasim.config C:\Users\visser_mn\.julia\packages\Configurations\Yxczn\src\codegen.jl:362
  [4] #from_dict#4
    @ C:\Users\visser_mn\.julia\packages\Configurations\Yxczn\src\from_dict.jl:46 [inlined]
  [5] from_dict
    @ C:\Users\visser_mn\.julia\packages\Configurations\Yxczn\src\from_dict.jl:33 [inlined]
  [6] from_toml(::Type{Ribasim.config.Toml}, filename::String; kw::@kwargs{})
    @ Configurations C:\Users\visser_mn\.julia\packages\Configurations\Yxczn\src\from_toml.jl:18
  [7] from_toml
    @ C:\Users\visser_mn\.julia\packages\Configurations\Yxczn\src\from_toml.jl:8 [inlined]
  [8] #Config#62
    @ D:\Ribasim\core\src\config.jl:147 [inlined]
  [9] Config
    @ D:\Ribasim\core\src\config.jl:146 [inlined]
┌ Error: Simulation failed
│   modelname = "bucket"
└ @ Main D:\Ribasim\utils\testmodelrun.jl:15
```

---------

Co-authored-by: Hofer-Julian <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants