Skip to content
Merged
Changes from 2 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
28 changes: 16 additions & 12 deletions docs/community/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,19 @@ Now you have a development installation of Parcels, as well as a bunch of develo
Pixi workflows
~~~~~~~~~~~~~~

You can use the following Pixi commands to run common development tasks.
**Typical development workflow**

1. Make your code changes
2. Run ``pixi run lint`` to ensure code formatting and style compliance
3. Run ``pixi run tests`` to verify your changes don't break existing functionality
4. If you've added new features, run ``pixi run typing`` to check type annotations
5. If you've modified documentation, run ``pixi run docs`` to build and verify the docs

.. tip::

You can run ``pixi info`` to see all available environments and ``pixi task list`` to see all available tasks across environments.

See below for more Pixi commands relevant to development.

**Testing**

Expand All @@ -107,22 +119,14 @@ You can use the following Pixi commands to run common development tasks.

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:

- ``pixi run -e test-py311 tests`` - Run tests using Python 3.11
- ``pixi run -e test-py312 tests`` - Run tests using Python 3.12
- ``pixi run -e test-py311 tests`` - Run tests in the environment containing Python 3.11
- ``pixi run -e test-py312 tests`` - Run tests in the environment containing Python 3.12

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.

**Typical development workflow**

1. Make your code changes
2. Run ``pixi run lint`` to ensure code formatting and style compliance
3. Run ``pixi run tests`` to verify your changes don't break existing functionality
4. If you've added new features, run ``pixi run typing`` to check type annotations
5. If you've modified documentation, run ``pixi run docs`` to build and verify the docs

.. tip::

You can run ``pixi info`` to see all available environments and ``pixi task list`` to see all available tasks across environments.
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``.


Changing code
Expand Down