Skip to content

Commit

Permalink
Use long CLI options more often (#211)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hofer-Julian authored May 15, 2023
1 parent f420435 commit bf50fd7
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/core_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
cache-env: true
environment-file: ./environment.yml
- name: Install ribasim
run: pip install -e python/ribasim
run: pip install --editable python/ribasim
- name: Prepare model input
run: python python/ribasim/tests/conftest.py
- uses: julia-actions/setup-julia@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
environment-file: ./environment.yml

- name: Install ribasim-python
run: pip install -e python/ribasim
run: pip install --editable python/ribasim

- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
environment-file: ./environment.yml

- name: Install ribasim
run: pip install -e python/ribasim
run: pip install --editable python/ribasim

- name: Run tests
run: pytest python/ribasim/tests
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ call conda env create -f environment.yml --prefix "%conda_env_path%"]]></param>
<runner id="RUNNER_1991" name="Install Ribasim Python" type="simpleRunner">
<parameters>
<param name="script.content"><![CDATA[call conda activate "%conda_env_path%"
call pip install -e "python/ribasim"]]></param>
call pip install --editable "python/ribasim"]]></param>
<param name="teamcity.step.mode" value="default" />
<param name="use.custom.script" value="true" />
</parameters>
Expand All @@ -38,7 +38,7 @@ call python python/ribasim/tests/conftest.py]]></param>
</runner>
<runner id="RUNNER_1984" name="Instantiate environment" type="simpleRunner">
<parameters>
<param name="script.content" value="julia +release --project -e &quot;using Pkg; Pkg.instantiate()&quot;" />
<param name="script.content" value="julia +release --project --eval &quot;using Pkg; Pkg.instantiate()&quot;" />
<param name="teamcity.build.workingDir" value="build/create_binaries" />
<param name="teamcity.step.mode" value="default" />
<param name="use.custom.script" value="true" />
Expand Down Expand Up @@ -111,4 +111,3 @@ call python python/ribasim/tests/conftest.py]]></param>
<cleanup />
</settings>
</build-type>

Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ call conda env create -f environment.yml --prefix "%conda_env_path%"]]></param>
<runner id="RUNNER_1956" name="Install Ribasim Python" type="simpleRunner">
<parameters>
<param name="script.content"><![CDATA[call conda activate "%conda_env_path%"
call pip install -e "python/ribasim"]]></param>
call pip install --editable "python/ribasim"]]></param>
<param name="teamcity.step.mode" value="default" />
<param name="use.custom.script" value="true" />
</parameters>
Expand All @@ -41,7 +41,7 @@ call python python/ribasim/tests/conftest.py]]></param>
</runner>
<runner id="RUNNER_1984" name="Instantiate environment" type="simpleRunner">
<parameters>
<param name="script.content" value="julia --project -e &quot;using Pkg; Pkg.instantiate()&quot;" />
<param name="script.content" value="julia --project --eval &quot;using Pkg; Pkg.instantiate()&quot;" />
<param name="teamcity.build.workingDir" value="build/create_binaries" />
<param name="teamcity.step.mode" value="default" />
<param name="use.custom.script" value="true" />
Expand Down Expand Up @@ -100,4 +100,3 @@ call python python/ribasim/tests/conftest.py]]></param>
<cleanup />
</settings>
</build-type>

Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ call conda create --prefix "%conda_env_path%" python=3.10]]></param>
<runner id="RUNNER_1502" name="Install Ribasim API and Ribasim Python" type="simpleRunner">
<parameters>
<param name="script.content"><![CDATA[call conda activate "%conda_env_path%"
call pip install -e "python/ribasim"
call pip install -e "python/ribasim_api[tests]"]]></param>
call pip install --editable "python/ribasim"
call pip install --editable "python/ribasim_api[tests]"]]></param>
<param name="teamcity.step.mode" value="default" />
<param name="use.custom.script" value="true" />
</parameters>
Expand Down Expand Up @@ -81,4 +81,3 @@ call pytest tests --basetemp=tests/temp --junitxml="report.xml"]]></param>
<cleanup />
</settings>
</build-type>

2 changes: 1 addition & 1 deletion build/ribasim_cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ If you have installed Julia and Ribasim, a simulation can also be started from t
line as follows:

```
julia -e 'using Ribasim; Ribasim.run("path/to/config.toml")'
julia --eval 'using Ribasim; Ribasim.run("path/to/config.toml")'
```

With a Ribasim CLI build this becomes:
Expand Down
2 changes: 1 addition & 1 deletion docs/contribute/python.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ conda activate ribasim
In order to develop on `ribasim` locally, execute the following line inside your virtual environment with `python/ribasim` as your working directory:

```bash
pip install -e .
pip install --editable .
```

## Running the tests
Expand Down
2 changes: 1 addition & 1 deletion docs/python/examples.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@
" [\n",
" \"julia\",\n",
" \"--project=../../core\",\n",
" \"-e\",\n",
" \"--eval\",\n",
" f'using Ribasim; Ribasim.run(\"{datadir.as_posix()}/basic-transient/basic-transient.toml\")',\n",
" ],\n",
" check=True,\n",
Expand Down

0 comments on commit bf50fd7

Please sign in to comment.