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
* Add pixi.toml configuration for environment management
- Define workspace with VirtualShip name and pixi-build preview
- Configure multiple test environments (py310, py311, py312)
- Set up feature environments for docs, typing, and pre-commit
- Define pixi tasks for tests, docs, linting, and type checking
- Align dependencies with existing pyproject.toml
* Update CI workflows to use Pixi
- Replace mamba-org/setup-micromamba with prefix-dev/setup-pixi
- Update test job to use pixi environments (test-py310, test-py312)
- Update typechecking job to use pixi run typing
- Enable pixi caching for faster CI runs
- Simplify workflow by removing manual dependency installation
* Update contributing guidelines for Pixi
- Replace Conda-based development setup with Pixi
- Add comprehensive Pixi workflows section with examples
- Document testing, docs, and code quality commands
- Include tips for environment management and CI reproduction
- Update dependency management instructions to reference pixi.toml
* Add Pixi badge to README
Add Pixi badge to indicate project uses Pixi for environment management
* Remove environment.yml
Environment management is now handled by pixi.toml. The environment.yml
file is no longer needed as all dependencies are defined in pixi.toml.
* Add virtualship source dependency
* Move pytest args to CI call
* Update RTD config
* Add caching of Pixi lock
* Pixi git files
* Remove license = key in pixi.toml
no longer needed since issue is resolved
* Update pixi-build-python backend version
* Update workflow to external pixi lock action
* Update default environment for Pixi
* Refactor pixi manifest to use run-dependencies
* Move environment definitions to the end of the file
Copy file name to clipboardExpand all lines: docs/contributing/index.md
+51-21Lines changed: 51 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,36 +8,66 @@ We have a design document providing a conceptual overview of VirtualShip. This d
8
8
9
9
### Development installation
10
10
11
-
We use `conda` to manage our development installation. Make sure you have `conda` installed by following [the instructions here](https://docs.conda.io/projects/conda/en/latest/user-guide/install/index.html) and then run the following commands:
11
+
```{note}
12
+
VirtualShip uses [Pixi](https://pixi.sh) to manage environments and run developer tooling. Pixi is a modern alternative to Conda and also includes other powerful tooling useful for a project like VirtualShip. It is our sole development workflow - we do not offer a Conda development workflow. Give Pixi a try, you won't regret it!
**Step 2:**[Fork the repository](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo#forking-a-repository)
20
+
21
+
**Step 3:** Clone your fork and `cd` into the repository.
22
+
23
+
**Step 4:** Install the Pixi environment
12
24
13
25
```bash
14
-
conda create -n ship python=3.10
15
-
conda activate ship
16
-
conda env update --file environment.yml
17
-
pip install -e . --no-deps --no-build-isolation
26
+
pixi install
18
27
```
19
28
20
-
This creates an environment, and installs all the dependencies that you need for development, including:
29
+
Now you have a development installation of VirtualShip, as well as a bunch of developer tooling to run tests, check code quality, and build the documentation! Simple as that.
30
+
31
+
### Pixi workflows
32
+
33
+
You can use the following Pixi commands to run common development tasks.
21
34
22
-
- core dependencies
23
-
- development dependencies (e.g., for testing)
24
-
- documentation dependencies
35
+
**Testing**
25
36
26
-
then installs the package in editable mode.
37
+
-`pixi run tests` - Run the full test suite using pytest with coverage reporting
38
+
-`pixi run tests-notebooks` - Run notebook tests
27
39
28
-
### Useful commands
40
+
**Documentation**
29
41
30
-
The following commands are useful for local development:
42
+
-`pixi run docs` - Build the documentation using Sphinx
43
+
-`pixi run docs-watch` - Build and auto-rebuild documentation when files change (useful for live editing)
31
44
32
-
-`pytest` to run tests
33
-
-`pre-commit run --all-files` to run pre-commit checks
34
-
-`pre-commit install` (optional) to install pre-commit hooks
35
-
- this means that every time you commit, pre-commit checks will run on the files you changed
36
-
-`sphinx-autobuild docs docs/_build` to build and serve the documentation
37
-
-`sphinx-apidoc -o docs/api/ --module-first --no-toc --force src/virtualship` (optional) to generate the API documentation
38
-
-`sphinx-build -b linkcheck docs/ _build/linkcheck` to check for broken links in the documentation
45
+
**Code quality**
39
46
40
-
The running of these commands is useful for local development and quick iteration, but not _vital_ as they will be run automatically in the CI pipeline (`pre-commit` by pre-commit.ci, `pytest` by GitHub Actions, and `sphinx` by ReadTheDocs).
47
+
-`pixi run lint` - Run pre-commit hooks on all files (includes formatting, linting, and other code quality checks)
48
+
-`pixi run typing` - Run mypy type checking on the codebase
49
+
50
+
**Different environments**
51
+
52
+
VirtualShip 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:
53
+
54
+
-`pixi run -e test-py310 tests` - Run tests using Python 3.10
55
+
-`pixi run -e test-py311 tests` - Run tests using Python 3.11
56
+
-`pixi run -e test-py312 tests` - Run tests using Python 3.12
57
+
58
+
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.
59
+
60
+
**Typical development workflow**
61
+
62
+
1. Make your code changes
63
+
2. Run `pixi run lint` to ensure code formatting and style compliance
64
+
3. Run `pixi run tests` to verify your changes don't break existing functionality
65
+
4. If you've added new features, run `pixi run typing` to check type annotations
66
+
5. If you've modified documentation, run `pixi run docs` to build and verify the docs
67
+
68
+
```{tip}
69
+
You can run `pixi info` to see all available environments and `pixi task list` to see all available tasks across environments.
70
+
```
41
71
42
72
## For maintainers
43
73
@@ -52,5 +82,5 @@ The running of these commands is useful for local development and quick iteratio
52
82
53
83
When adding a dependency, make sure to modify the following files where relevant:
54
84
55
-
-`environment.yml` for core and development dependencies (important for the development environment, and CI)
85
+
-`pixi.toml` for core and development dependencies (important for the development environment, and CI)
56
86
-`pyproject.toml` for core dependencies (important for the pypi package, this should propagate through automatically to `recipe/meta.yml` in the conda-forge feedstock)
0 commit comments