Skip to content

Commit a26d5c0

Browse files
committed
docs: more touchup, review changes
1 parent e79a590 commit a26d5c0

File tree

1 file changed

+21
-15
lines changed

1 file changed

+21
-15
lines changed

CONTRIBUTING.md

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,22 @@ sections on how to contribute code and bug reports.
55

66
Before submitting a question or bug report, please take a moment of your time
77
and ensure that your issue isn't already discussed in the project documentation
8-
provided at
9-
[http://pybind11.readthedocs.org/en/latest](http://pybind11.readthedocs.org/en/latest).
8+
provided at [pybind11.readthedocs.org][] or in the [issue tracker][]. You can
9+
also check [gitter][] to see if it came up before.
1010

1111
Assuming that you have identified a previously unknown problem or an important
1212
question, it's essential that you submit a self-contained and minimal piece of
1313
code that reproduces the problem. In other words: no external dependencies,
1414
isolate the function(s) that cause breakage, submit matched and complete C++
15-
and Python snippets that can be easily compiled and run on my end.
15+
and Python snippets that can be easily compiled and run in isolation; or
16+
ideally make a small PR with a failing test case that can be used as a starting
17+
point.
1618

1719
## Pull requests
1820

1921
Contributions are submitted, reviewed, and accepted using GitHub pull requests.
20-
Please refer to [this
21-
article](https://help.github.com/articles/using-pull-requests) for details and
22-
adhere to the following rules to make the process as smooth as possible:
22+
Please refer to [this article][using pull requests] for details and adhere to
23+
the following rules to make the process as smooth as possible:
2324

2425
* Make a new branch for every feature you're working on.
2526
* Make small and clean pull requests that are easy to review but make sure they
@@ -33,8 +34,6 @@ adhere to the following rules to make the process as smooth as possible:
3334
* This project has a strong focus on providing general solutions using a
3435
minimal amount of code, thus small pull requests are greatly preferred.
3536

36-
[pre-commit]: https://pre-commit.com
37-
3837
### Licensing of contributions
3938

4039
pybind11 is provided under a BSD-style license that can be found in the
@@ -55,7 +54,7 @@ derivative works thereof, in binary and source code form.
5554
## Development of pybind11
5655

5756
To setup an ideal development environment, run the following commands on a
58-
system with CMake 3.14+.
57+
system with CMake 3.14+:
5958

6059
```bash
6160
python3 -m venv venv
@@ -121,7 +120,8 @@ To run the tests, you can "build" the check target:
121120
cmake --build build --target check
122121
```
123122

124-
`--target` can be spelled `-t` in CMake 3.15+. You can also run individual tests with these targets:
123+
`--target` can be spelled `-t` in CMake 3.15+. You can also run individual
124+
tests with these targets:
125125

126126
* `pytest`: Python tests only
127127
* `cpptest`: C++ tests only
@@ -133,8 +133,7 @@ empty, all tests will be built.
133133

134134
### Formatting
135135

136-
All formatting is handled by pre-commit. You will need docker installed as well
137-
for pre-commit to run the clang-format step in a consistent environment.
136+
All formatting is handled by pre-commit.
138137

139138
Install with brew (macOS) or pip (any OS):
140139

@@ -146,17 +145,24 @@ python3 -m pip install pre-commit
146145
brew install pre-commit
147146
```
148147

149-
Then, you can run it on the items you've added to your staging area, or all files:
148+
Then, you can run it on the items you've added to your staging area, or all
149+
files:
150150

151151
```bash
152152
pre-commit run
153153
# OR
154154
pre-commit run --all-files
155155
```
156156

157-
158-
And, if you want to always use it, you can install it as a git hook (hence the name, pre-commit):
157+
And, if you want to always use it, you can install it as a git hook (hence the
158+
name, pre-commit):
159159

160160
```bash
161161
pre-commit install
162162
```
163+
164+
[pre-commit]: https://pre-commit.com
165+
[pybind11.readthedocs.org]: http://pybind11.readthedocs.org/en/latest
166+
[issue tracker]: https://github.com/pybind/pybind11/issues
167+
[gitter]: https://gitter.im/pybind/Lobby
168+
[using pull requests]: https://help.github.com/articles/using-pull-requests

0 commit comments

Comments
 (0)