Skip to content

Commit

Permalink
docs: Update contributing guidelines
Browse files Browse the repository at this point in the history
  • Loading branch information
nvictus committed Apr 21, 2024
1 parent c8ed644 commit 68bfbe6
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,17 @@ The first time you run `hatch shell` the environment will be created and activat
>
> This will make hatch set up its environments within the current working directory under `.venv`.
Alternatively, if you prefer to manage your virtual environments differently, you can install the package for development using, for example:
Alternatively, if you prefer to manage your virtual environments yourself, you can install the package for development using, for example:
```sh
python -m venv .venv
source ./.venv/bin/activate
pip install -e '.[dev,test,docs]'
```
For all pull requests, linting and unit tests are automatically run using the [GitHub Actions](https://docs.github.com/en/actions) Continuous Integration service. However, you are still encouraged to run these checks locally before pushing code to a PR.
## Linting and formatting
## Linting and Formatting
We use [ruff](https://docs.astral.sh/ruff/) for style checking. Run `ruff check .` or:
Expand All @@ -71,11 +72,7 @@ Ruff can fix a lot of errors itself. Run `ruff check --fix .` or:
hatch run fix
```
Ruff includes a formatter that mimics [black](https://black.readthedocs.io/en/stable/). To automatically reformat your code, you can use `ruff format .` or:
```sh
hatch run format
```
Ruff includes a formatter that mimics [black](https://black.readthedocs.io/en/stable/). To automatically reformat your code, you can use `ruff format {source_file}`.
We use [pre-commit](https://github.com/pre-commit/pre-commit) to make sure the coding style is enforced. You first need to install pre-commit and the corresponding git commit hooks:
Expand Down

0 comments on commit 68bfbe6

Please sign in to comment.