docs: Make contributing.md slightly more clear for newer contributors (#4080)

* docs: Make contributing.md slightly more clear for newer contributors

* Remove accidental backticks

Rearrange overview of commands

* Placed on wrong line

* Add extra overview command
This commit is contained in:
David Matos 2024-04-16 10:17:41 +02:00 committed by GitHub
parent a5201c04af
commit 2ad2a3f208
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 20 additions and 4 deletions

View File

@ -8,6 +8,6 @@ Please consider adding the following to your pull request:
- docs to all new functions and / or detail in the guide
- tests for all new or changed functions
PyO3's CI pipeline will check your pull request. To run its tests
PyO3's CI pipeline will check your pull request, thus make sure you have checked the `Contributing.md` guidelines. To run most of its tests
locally, you can run ```nox```. See ```nox --list-sessions```
for a list of supported actions.

View File

@ -92,9 +92,7 @@ Here are a few things to note when you are writing PRs.
### Continuous Integration
The PyO3 repo uses GitHub Actions. PRs are blocked from merging if CI is not successful.
Formatting, linting and tests are checked for all Rust and Python code. In addition, all warnings in Rust code are disallowed (using `RUSTFLAGS="-D warnings"`).
The PyO3 repo uses GitHub Actions. PRs are blocked from merging if CI is not successful. Formatting, linting and tests are checked for all Rust and Python code. In addition, all warnings in Rust code are disallowed (using `RUSTFLAGS="-D warnings"`).
Tests run with all supported Python versions with the latest stable Rust compiler, as well as for Python 3.9 with the minimum supported Rust version.
@ -103,6 +101,24 @@ If you are adding a new feature, you should add it to the `full` feature in our
You can run these tests yourself with
`nox`. Use `nox -l` to list the full set of subcommands you can run.
#### Linting Python code
`nox -s ruff`
#### Linting Rust code
`nox -s rustfmt`
#### Semver checks
`cargo semver-checks check-release`
#### Clippy
`nox -s clippy-all`
#### Tests
`cargo test --features full`
#### Check all conditional compilation
`nox -s check-feature-powerset`
#### UI Tests
PyO3 uses [`trybuild`][trybuild] to develop UI tests to capture error messages from the Rust compiler for some of the macro functionality.