Skip to content

Commit ea9517a

Browse files
Update Pixi environment definitions (#2430)
1 parent 6442f06 commit ea9517a

File tree

3 files changed

+20
-11
lines changed

3 files changed

+20
-11
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
fail-fast: false
3030
matrix:
3131
os: [ubuntu, windows]
32-
pixi-environment: [test-latest]
32+
pixi-environment: [test]
3333
include:
3434
- os: ubuntu
3535
pixi-environment: "test-py311"

docs/development/index.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ pixi install
9292

9393
Now you have a development installation of Parcels, as well as a bunch of developer tooling to run tests, check code quality, and build the documentation! Simple as that.
9494

95+
We primarily use the `default` environment when developing locally (you can 'activate' this using `pixi shell`) - but sometimes you might want to enter and run other environments. For example, if you're trying to debug a failure from CI.
96+
9597
### Pixi workflows
9698

9799
**Typical development workflow**
@@ -134,7 +136,7 @@ Parcels supports testing against different environments (e.g., different Python
134136
The name of the workflow on GitHub contains the command you have to run locally to recreate the workflow - making it super easy to reproduce CI failures locally.
135137

136138
```{tip}
137-
For those familiar with Conda, you are used to activating an environment. With Pixi, you can do the same by doing `pixi shell <env-name>`. For example, `pixi shell test-latest` will drop you into a shell where you can run commands such as `pytest` like normal. You can exit the shell with `exit` or `Ctrl+D`.
139+
For those familiar with Conda, you are used to activating an environment. With Pixi, you can do the same by doing `pixi shell -e <env-name>`. For example, `pixi shell -e test` will drop you into an environment used in CI for testing (where you can run commands such as `pytest` like normal). Doing `pixi shell` will drop you into our default development environment. You can exit the shell with `exit` or `Ctrl+D`.
138140
```
139141

140142
### Changing code

pixi.toml

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,6 @@ backend = { name = "pixi-build-python", version = "==0.4.0" }
1616
setuptools = "*"
1717
setuptools_scm = "*"
1818

19-
[environments]
20-
test-latest = { features = ["test"], solve-group = "test" }
21-
test-minimum = { features = ["test", "minimum"], solve-group = "test" }
22-
test-py311 = { features = ["test", "py311"] }
23-
test-py313 = { features = ["test", "py313"] }
24-
test-notebooks = { features = ["test", "notebooks"], solve-group = "test" }
25-
docs = { features = ["docs", "notebooks"], solve-group = "docs" }
26-
typing = { features = ["typing"], solve-group = "typing" }
27-
pre-commit = { features = ["pre-commit"], no-default-feature = true }
2819

2920
[package.run-dependencies] # keep section in sync with pyproject.toml dependencies
3021
python = ">=3.11"
@@ -110,3 +101,19 @@ types-tqdm = "*"
110101

111102
[feature.typing.tasks]
112103
typing = "mypy src/parcels --install-types"
104+
105+
106+
[environments]
107+
default = { features = [
108+
"test",
109+
"notebooks",
110+
"typing",
111+
"pre-commit",
112+
], solve-group = "main" }
113+
test = { features = ["test"], solve-group = "main" }
114+
test-minimum = { features = ["test", "minimum"] }
115+
test-py311 = { features = ["test", "py311"] }
116+
test-py313 = { features = ["test", "py313"] }
117+
test-notebooks = { features = ["test", "notebooks"], solve-group = "main" }
118+
docs = { features = ["docs", "notebooks"], solve-group = "docs" }
119+
typing = { features = ["typing"], solve-group = "main" }

0 commit comments

Comments
 (0)