Skip to content

Commit 9f9afe7

Browse files
DOC: Improve contrib instructions for Pixi (#2290)
1 parent 81cc43e commit 9f9afe7

File tree

1 file changed

+16
-14
lines changed

1 file changed

+16
-14
lines changed

docs/community/contributing.md

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@ If you're having trouble using Parcels, feel free to create a discussion in our
4949

5050
In the [Projects panel](https://github.com/OceanParcels/parcels/projects?query=is%3Aopen), you'll see the "Parcels development" project. This is used by the core development team for project management, as well as drafting up new ideas for the codebase that aren't mature enough to be issues themselves. Everything in "backlog" is not being actively worked on and is fair game for open source contributions.
5151

52-
(editing-parcels-code)=
53-
5452
## Development
5553

5654
### Environment setup
@@ -77,7 +75,19 @@ Now you have a development installation of Parcels, as well as a bunch of develo
7775

7876
### Pixi workflows
7977

80-
You can use the following Pixi commands to run common development tasks.
78+
**Typical development workflow**
79+
80+
1. Make your code changes
81+
2. Run `pixi run lint` to ensure code formatting and style compliance
82+
3. Run `pixi run tests` to verify your changes don't break existing functionality
83+
4. If you've added new features, run `pixi run typing` to check type annotations
84+
5. If you've modified documentation, run `pixi run docs` to build and verify the docs
85+
86+
```{tip}
87+
You can run `pixi info` to see all available environments and `pixi task list` to see all available tasks across environments.
88+
```
89+
90+
See below for more Pixi commands relevant to development.
8191

8292
**Testing**
8393

@@ -99,21 +109,13 @@ You can use the following Pixi commands to run common development tasks.
99109

100110
Parcels supports testing against different environments (e.g., different Python versions) with different feature sets. In CI we test against these environments, and you can too locally. For example:
101111

102-
- `pixi run -e test-py311 tests` - Run tests using Python 3.11
103-
- `pixi run -e test-py312 tests` - Run tests using Python 3.12
112+
- `pixi run -e test-py311 tests` - Run tests in the environment containing Python 3.11
113+
- `pixi run -e test-py312 tests` - Run tests in the environment containing Python 3.12
104114

105115
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.
106116

107-
**Typical development workflow**
108-
109-
1. Make your code changes
110-
2. Run `pixi run lint` to ensure code formatting and style compliance
111-
3. Run `pixi run tests` to verify your changes don't break existing functionality
112-
4. If you've added new features, run `pixi run typing` to check type annotations
113-
5. If you've modified documentation, run `pixi run docs` to build and verify the docs
114-
115117
```{tip}
116-
You can run `pixi info` to see all available environments and `pixi task list` to see all available tasks across environments.
118+
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`.
117119
```
118120

119121
### Changing code

0 commit comments

Comments
 (0)