You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/community/contributing.md
+16-14Lines changed: 16 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,8 +49,6 @@ If you're having trouble using Parcels, feel free to create a discussion in our
49
49
50
50
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.
51
51
52
-
(editing-parcels-code)=
53
-
54
52
## Development
55
53
56
54
### Environment setup
@@ -77,7 +75,19 @@ Now you have a development installation of Parcels, as well as a bunch of develo
77
75
78
76
### Pixi workflows
79
77
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.
81
91
82
92
**Testing**
83
93
@@ -99,21 +109,13 @@ You can use the following Pixi commands to run common development tasks.
99
109
100
110
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:
101
111
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
104
114
105
115
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.
106
116
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
-
115
117
```{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`.
0 commit comments