Skip to content

Commit 6072cd6

Browse files
committed
Make contributing notes much more helpful
1 parent 11b6bac commit 6072cd6

File tree

2 files changed

+59
-9
lines changed

2 files changed

+59
-9
lines changed

Contributing.md

+57-9
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,62 @@
11
# Contributing
22

3-
Thank you for contributing to pyo3!
3+
Thank you for your interest in contributing to PyO3! All are welcome - please consider reading our [Code of Conduct](Code-of-Conduct.md) to keep our community positive and inclusive.
44

5-
Here are some things you should check for submitting your pull request:
5+
This guide contains suggestions on how to join in with the development of PyO3.
66

7-
- Run `cargo fmt` (This is checked by travis ci)
8-
- Run `cargo clippy` and check there are no hard errors (There are a bunch of existing warnings; This is also checked by travis)
9-
- If applicable, add an entry in the changelog
10-
- If applicable, add documentation to all new items and extend the guide
11-
- If applicable, add tests for all new or fixed functions
12-
- Run `cargo test`
7+
## Getting started contributing
138

14-
You might want to run `tox` (`pip install tox`) locally to check compatibility with all supported python versions. If you're using linux or mac you might find the Makefile helpful for testing.
9+
All development activity is coordinated through the Github issue tracker. You may have already looked there searching for an item to work on.
10+
11+
You're welcome to volunteer on any part of PyO3 which strikes your interest. The following sections contain ideas on where to start.
12+
13+
### Help users identify bugs
14+
15+
The [PyO3 Gitter channel](https://gitter.im/PyO3/Lobby) is very active with users who are new to PyO3, and often completely new to Rust. Helping them debug their solutions is a great way to get to the nuts and bolts of PyO3.
16+
17+
Often this activity leads to discoveries of bugs, documentation weaknesses, and missing APIs. It's good practice to open Github issues for these discoveries immediately so the resolution can be planned and implemented!
18+
19+
### Dive straight into the implementation
20+
21+
We use the [needs-implementer](https://github.com/PyO3/pyo3/issues?q=is%3Aissue+is%3Aopen+label%3Aneeds-implemeter) label to mark issues where the solution is reasonably clear and nobody has yet claimed responsibility for its enaction.
22+
23+
Feel free to introduce yourself directly on any issue which strikes your interest and volunteer to take it on!
24+
25+
Don't be afraid if the full solution is not clear to you! The core PyO3 contributors will be happy to mentor you through any questions you have to help you write the solution.
26+
27+
### Help write great docs
28+
29+
Perhaps even more important than implementing features is ensuring users know how to leverage them!
30+
31+
PyO3 aims to have an extensive user guide as well as exhaustive API docs. Pull requests to fix typos, change wording, add examples, or any other improvement you spot are always welcome.
32+
33+
There's a few particular initiatives you can look for when helping with documentation:
34+
- Areas where we know the documentation could be improved are tracked with the [documentation](https://github.com/PyO3/pyo3/issues?q=is%3Aissue+is%3Aopen+label%3Adocumentation) label.
35+
- Not all APIs had docs or examples written when they were originally created. We'd like to one day have docstrings on all functions ([#306](https://github.com/PyO3/pyo3/issues/306)). If you see a function lacking a good doc, please write one and open a PR!
36+
- Not all `unsafe` APIs had safety notes written when they were originally created. We'd like to one day ensure all `unsafe` usage is carefully guided ([#698](https://github.com/PyO3/pyo3/issues/698)). If you see an `unsafe` function missing safety notes, please write one and open a PR!
37+
38+
### Help design the future PyO3
39+
40+
For issues which don't yet have enough detail for a complete solution, we use the [needs-design](https://github.com/PyO3/pyo3/issues?q=is%3Aissue+is%3Aopen+label%3Aneeds-design) label.
41+
42+
If any of these issues interest you, please join in with the conversation on the issue! All opinions are valuable, and if you're interested in going further with e.g. draft PRs to experiment with API designs, even better!
43+
44+
## Implementation notes
45+
46+
Here are a few things to bear in mind when you are writing PRs.
47+
48+
### CI
49+
50+
We use a mixture of Github actions and Travis CI to verify pull requests. PRs are blocked from merging if they do not pass our CI infrastructure.
51+
52+
In particular, keep in mind that formatting, linting and tests are checked for all Rust and Python code, for a number of Rust and Python versions.
53+
54+
### Minimum supported Rust version
55+
56+
PyO3 aims to make use of up-to-date Rust language features to keep the implementation as efficient as possible.
57+
58+
That said, the aim is to always have support for at least a few of the most recent Rust compiler versions, so that users have time to update.
59+
60+
If your PR needs to bump the minimum supported Rust version, this is acceptable, with two caveats:
61+
- Any changes which require a more recent version than what is [currently available on stable Red Hat Enterprise Linux](https://access.redhat.com/documentation/en-us/red_hat_developer_tools/1/) will be postponed. (This is a rough measure to allow package managers to update support for newer `rustc` versions; RHEL was arbitrarily picked because their update policy is clear.)
62+
- You might be asked to do extra work to tidy up other parts of the PyO3 codebase which could benefit from the compiler version bump :)

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313

1414
* API Documentation: [stable](https://docs.rs/pyo3/) | [master](https://pyo3.rs/master/doc)
1515

16+
* Contributing Notes: [github](https://github.com/PyO3/pyo3/blob/master/Contributing.md)
17+
1618
A comparison with rust-cpython can be found [in the guide](https://pyo3.rs/master/rust_cpython.html).
1719

1820
## Usage

0 commit comments

Comments
 (0)