Skip to content

Commit

Permalink
Add pixi, update commands in contributing.
Browse files Browse the repository at this point in the history
And corresponding pixi cmds.
Delete environment.yml.
  • Loading branch information
thomasmarwitz committed Dec 17, 2024
1 parent dd51b3d commit 75ca7d9
Show file tree
Hide file tree
Showing 5 changed files with 20,857 additions and 59 deletions.
30 changes: 14 additions & 16 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,12 @@ If you've found a bug, please report it to the issue tracker and

#### Installation using pip

To get started, set up a new virtual environment and install all requirements
To get started, set up a a new environment using [pixi](https://pixi.sh) and install all requirements:

```bash
virtualenv plateau-dev --python=python3.9
source plateau-dev/bin/activate
pip install -e .
pip install -r test-requirements.txt
pixi run pre-commit-install
pixi run postinstall
pixi run test
```

#### Running tests
Expand All @@ -29,37 +28,36 @@ We're using [pytest](https://pytest.org) as a testing framework and make heavy u
To run the tests simply run

```bash
pytest
pixi run test
```

#### Running benchmarks

For performance critical code paths we have [asv](https://pre-commit.com) benchmarks in place in
the subfolder `asv_bench`.
For performance critical code paths we have [asv](https://asv.readthedocs.io/en/latest/) benchmarks in place in the subfolder `asv_bench`.
To run the benchmarks a single time and receive immediate feedback run

```bash
asv run --python=same --show-stderr
pixi run -e benchmark postinstall
pixi run -e benchmark asv run --python=same --show-stderr --config ./asv_bench/asv.conf.json
```

#### Building documentation

```bash
python setup.py docs
pixi run -e docs postinstall
pixi run docs
```

#### Code style

To ensure a consistent code style across the code base we're using `black`, `flake8`,
and `isort` for formatting and linting.
To ensure a consistent code style across the code base we're using `prettier` and `ruff` for formatting and linting.

We have pre-commit hooks for all of these tools which take care of formatting
and checking the code. To set up these hooks, please follow the installation
instructions on the [pre-commit](https://pre-commit.com) homepage.
We have [pre-commit](https://pre-commit.com) hooks for all of these tools which take care of formatting
and checking the code.

If you prefer to perform manual formatting and linting, you can run the necessary
toolchain like this

```bash
pre-commit run -a
pixi run pre-commit-run
```
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,7 @@ can be installed through `pip`:
```bash
pip install plateau
```

## Contributing

Find details on how to contribute [here](CONTRIBUTING.md).
43 changes: 0 additions & 43 deletions environment.yml

This file was deleted.

Loading

0 comments on commit 75ca7d9

Please sign in to comment.