@@ -5,21 +5,22 @@ sections on how to contribute code and bug reports.
5
5
6
6
Before submitting a question or bug report, please take a moment of your time
7
7
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 .
10
10
11
11
Assuming that you have identified a previously unknown problem or an important
12
12
question, it's essential that you submit a self-contained and minimal piece of
13
13
code that reproduces the problem. In other words: no external dependencies,
14
14
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.
16
18
17
19
## Pull requests
18
20
19
21
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:
23
24
24
25
* Make a new branch for every feature you're working on.
25
26
* 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:
33
34
* This project has a strong focus on providing general solutions using a
34
35
minimal amount of code, thus small pull requests are greatly preferred.
35
36
36
- [ pre-commit ] : https://pre-commit.com
37
-
38
37
### Licensing of contributions
39
38
40
39
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.
55
54
## Development of pybind11
56
55
57
56
To setup an ideal development environment, run the following commands on a
58
- system with CMake 3.14+.
57
+ system with CMake 3.14+:
59
58
60
59
``` bash
61
60
python3 -m venv venv
@@ -121,7 +120,8 @@ To run the tests, you can "build" the check target:
121
120
cmake --build build --target check
122
121
```
123
122
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:
125
125
126
126
* ` pytest ` : Python tests only
127
127
* ` cpptest ` : C++ tests only
@@ -133,8 +133,7 @@ empty, all tests will be built.
133
133
134
134
### Formatting
135
135
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.
138
137
139
138
Install with brew (macOS) or pip (any OS):
140
139
@@ -146,17 +145,24 @@ python3 -m pip install pre-commit
146
145
brew install pre-commit
147
146
```
148
147
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:
150
150
151
151
``` bash
152
152
pre-commit run
153
153
# OR
154
154
pre-commit run --all-files
155
155
```
156
156
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):
159
159
160
160
``` bash
161
161
pre-commit install
162
162
```
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