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

Minimal pixi default environment #1322

Merged
merged 3 commits into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/core_testmodels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
with:
pixi-version: "latest"
- name: Prepare pixi
run: pixi run install-ci
run: pixi run --environment=dev install-ci
- name: Run testmodels with Ribasim Core
run: |
pixi run ribasim-core-testmodels
2 changes: 1 addition & 1 deletion .github/workflows/core_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
with:
pixi-version: "latest"
- name: Prepare pixi
run: pixi run install-ci
run: pixi run --environment=dev install-ci
- name: Test Ribasim Core
run: |
pixi run test-ribasim-core-cov
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
with:
pixi-version: "latest"
- name: Prepare pixi
run: pixi run install-ci
run: pixi run --environment=dev install-ci

- name: Check Quarto installation and all engines
run: pixi run quarto-check
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python_codegen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
with:
pixi-version: "latest"
- name: Prepare pixi
run: pixi run install-ci
run: pixi run --environment=dev install-ci
- name: Test if codegen runs without errors
run: pixi run codegen
- name: Ensure that no code has been generated
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python_lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
with:
pixi-version: "latest"
- name: Prepare pixi
run: pixi run install-ci
run: pixi run --environment=dev install-ci
- name: Run mypy on python/ribasim
run: |
pixi run mypy-ribasim-python
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 @@ -30,7 +30,7 @@ jobs:
with:
pixi-version: "latest"
- name: Prepare pixi
run: pixi run --environment ${{ matrix.pixi-environment }} install-ci
run: pixi run --environment ${{ matrix.pixi-environment }} install-python
- name: Test Ribasim Python
run: pixi run --environment ${{ matrix.pixi-environment }} test-ribasim-python-cov
- name: Upload coverage to Codecov
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/qgis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
pixi-version: "latest"
- name: Prepare pixi
run: |
pixi run install-ci
pixi run --environment=dev install-ci
- name: Run tests
run: pixi run test-ribasim-qgis-cov
- name: Upload coverage to Codecov
Expand Down
3 changes: 1 addition & 2 deletions .teamcity/Ribasim/buildTypes/Ribasim_GenerateTestmodels.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ source /usr/share/Modules/init/bash

module load pixi
pixi --version
pixi run install-ci]]></param>
pixi run --environment=dev install-ci]]></param>
<param name="teamcity.build.workingDir" value="ribasim" />
<param name="teamcity.step.mode" value="default" />
<param name="use.custom.script" value="true" />
Expand Down Expand Up @@ -56,4 +56,3 @@ pixi run generate-testmodels]]></param>
<cleanup />
</settings>
</build-type>

Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ source /usr/share/Modules/init/bash

module load pixi
pixi --version
pixi run install-ci]]></param>
pixi run --environment=dev install-ci]]></param>
<param name="teamcity.build.workingDir" value="ribasim" />
<param name="teamcity.step.mode" value="default" />
<param name="use.custom.script" value="true" />
Expand Down Expand Up @@ -63,4 +63,3 @@ pixi run build-libribasim]]></param>
<cleanup />
</settings>
</build-type>

Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ source /usr/share/Modules/init/bash

module load pixi
pixi --version
pixi run install-ci]]></param>
pixi run --environment=dev install-ci]]></param>
<param name="teamcity.build.workingDir" value="ribasim" />
<param name="teamcity.step.mode" value="default" />
<param name="use.custom.script" value="true" />
Expand Down Expand Up @@ -70,4 +70,3 @@ pixi run build-ribasim-cli]]></param>
<cleanup />
</settings>
</build-type>

Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ source /usr/share/Modules/init/bash

module load pixi
pixi --version
pixi run install-ci]]></param>
pixi run --environment=dev install-ci]]></param>
<param name="teamcity.build.workingDir" value="ribasim" />
<param name="teamcity.step.mode" value="default" />
<param name="use.custom.script" value="true" />
Expand Down Expand Up @@ -108,4 +108,3 @@ pixi run test-ribasim-api]]></param>
<cleanup />
</settings>
</build-type>

Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ source /usr/share/Modules/init/bash

module load pixi
pixi --version
pixi run install-ci]]></param>
pixi run --environment=dev install-ci]]></param>
<param name="teamcity.build.workingDir" value="ribasim" />
<param name="teamcity.step.mode" value="default" />
<param name="use.custom.script" value="true" />
Expand Down Expand Up @@ -108,4 +108,3 @@ pixi run test-ribasim-cli]]></param>
<cleanup />
</settings>
</build-type>

Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<runner id="RUNNER_2415" name="Set up pixi" type="simpleRunner">
<parameters>
<param name="script.content"><![CDATA[pixi --version
pixi run install-ci]]></param>
pixi run --environment=dev install-ci]]></param>
<param name="teamcity.build.workingDir" value="ribasim" />
<param name="teamcity.step.mode" value="default" />
<param name="use.custom.script" value="true" />
Expand Down Expand Up @@ -52,4 +52,3 @@ pixi run build-libribasim]]></param>
<cleanup />
</settings>
</build-type>

Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<build-runners>
<runner id="RUNNER_2418" name="Set up pixi" type="simpleRunner">
<parameters>
<param name="script.content" value="pixi run install-ci" />
<param name="script.content" value="pixi run --environment=dev install-ci" />
<param name="teamcity.build.workingDir" value="ribasim" />
<param name="teamcity.step.mode" value="default" />
<param name="use.custom.script" value="true" />
Expand Down Expand Up @@ -58,4 +58,3 @@ pixi run build-ribasim-cli]]></param>
<cleanup />
</settings>
</build-type>

Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<build-runners>
<runner id="RUNNER_1501" name="Set up pixi" type="simpleRunner">
<parameters>
<param name="script.content" value="pixi run install-ci" />
<param name="script.content" value="pixi run --environment=dev install-ci" />
<param name="teamcity.build.workingDir" value="ribasim" />
<param name="teamcity.step.mode" value="default" />
<param name="use.custom.script" value="true" />
Expand Down Expand Up @@ -97,4 +97,3 @@
<cleanup />
</settings>
</build-type>

Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<build-runners>
<runner id="RUNNER_1501" name="Set up pixi" type="simpleRunner">
<parameters>
<param name="script.content" value="pixi run install-ci" />
<param name="script.content" value="pixi run --environment=dev install-ci" />
<param name="teamcity.build.workingDir" value="ribasim" />
<param name="teamcity.step.mode" value="default" />
<param name="use.custom.script" value="true" />
Expand Down Expand Up @@ -97,4 +97,3 @@
<cleanup />
</settings>
</build-type>

2 changes: 1 addition & 1 deletion docs/contribute/index.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ First, set up pixi as described on their getting started [page](https://prefix.d
Then set up the environment by running the following commands:

```sh
pixi run install
pixi run --environment=dev install
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is only necessary because otherwise the editable install installs into the wrong environment.
As soon as pixi supports editable installs this will not be necessary anymore.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps it's good to create an issue for this, with a reminder to remove this.

```

This will automatically install all required packages for development.
Expand Down
4 changes: 2 additions & 2 deletions docs/contribute/qgis.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: "QGIS plugin development"
# Set up the developer environment

After you have installed the environment as described [here](index.qmd) you must still activate the QGIS plugins.
The simplest way to do this is by running `pixi run install-qgis-plugins`.
The simplest way to do this is by running `pixi run --environment=dev install-qgis-plugins`.
It grabs the latest version of the iMOD QGIS plugin and it makes a symlink to the ribasim_qgis folder so that QGIS can find it.
It also installs plugins that make it possible to reload and debug your plugin while QGIS is open.

Expand Down Expand Up @@ -36,7 +36,7 @@ Then simply call `pixi run test-ribasim-qgis`.

# Debugging

After installing the plugins via `pixi run install-qgis-plugins`.
After installing the plugins via `pixi run --environment=dev install-qgis-plugins`.
Extra debugging tools are also installed in QGIS that is installed within your pixi environment.

After you have started `pixi run qgis`, you can make alterations to the Python code and use the [Plugin Reloader](https://github.com/borysiasty/plugin_reloader) to reload the plugin without restarting QGIS.
Expand Down
2 changes: 1 addition & 1 deletion open-vscode.bat
Original file line number Diff line number Diff line change
@@ -1 +1 @@
pixi run code . | exit
pixi run --environment=dev code . | exit
Loading
Loading