Skip to content

Commit cce1ccb

Browse files
committed
Merge pull request #9639 from rockg/contributing-docs
Rearrange into logical sections and add relevant links
2 parents 09ea608 + 2a5ee25 commit cce1ccb

File tree

1 file changed

+33
-26
lines changed

1 file changed

+33
-26
lines changed

CONTRIBUTING.md

+33-26
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
###Guidelines
1+
### Guidelines
22

33
All contributions, bug reports, bug fixes, documentation improvements,
44
enhancements and ideas are welcome.
@@ -14,8 +14,9 @@ looking for a quick way to help out.
1414

1515
```python
1616

17-
print("I ♥ pandas!")
18-
17+
>>> from pandas import DataFrame
18+
>>> df = DataFrame(...)
19+
...
1920
```
2021

2122
- Include the full version string of pandas and it's dependencies. In recent (>0.12) versions
@@ -30,22 +31,21 @@ looking for a quick way to help out.
3031
```python
3132
>>> pd.show_versions()
3233
```
33-
3434
- Explain what the expected behavior was, and what you saw instead.
3535

3636
#### Pull Requests
3737

38-
- **Make sure the test suite passes** on your box, Use the provided `test_*.sh` scripts or tox.
39-
- Use [proper commit messages](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html):
40-
- a subject line with `< 80` chars.
41-
- One blank line.
42-
- Optionally, a commit message body.
43-
- Please reference relevant Github issues in your commit message using `GH1234`
44-
or `#1234`. Either style is fine but the '#' style generates noise when your rebase your PR.
45-
- `doc/source/vx.y.z.txt` contains an ongoing
46-
changelog for each release. Add an entry to this file
47-
as needed in your PR: document the fix, enhancement,
48-
or (unavoidable) breaking change.
38+
##### Testing:
39+
- Every addition to the codebase whether it be a bug or new feature should have associated tests. The can be placed in the `tests` directory where your code change occurs.
40+
- When writing tests, use 2.6 compatible `self.assertFoo` methods. Some polyfills such as `assertRaises`
41+
can be found in `pandas.util.testing`.
42+
- Do not attach doctrings to tests. Make the test itself readable and use comments if needed.
43+
- **Make sure the test suite passes** on your box, use the provided `test_*.sh` scripts or tox. Pandas tests a variety of platforms and Python versions so be cognizant of cross-platorm considerations.
44+
- Performance matters. Make sure your PR hasn't introduced performance regressions by using `test_perf.sh`. See [vbench performance tests](https://github.com/pydata/pandas/wiki/Performance-Testing) wiki for more information on running these tests.
45+
- For more information on testing see [Testing advice and best practices in `pandas`](https://github.com/pydata/pandas/wiki/Testing)
46+
47+
##### Documentation / Commit Messages:
48+
- Docstrings follow the [numpydoc](https://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt) format.
4949
- Keep style fixes to a separate commit to make your PR more readable.
5050
- An informal commit message format is in effect for the project. Please try
5151
and adhere to it. Check `git log` for examples. Here are some common prefixes
@@ -57,18 +57,24 @@ looking for a quick way to help out.
5757
- **BLD**: Updates to the build process/scripts
5858
- **PERF**: Performance improvement
5959
- **CLN**: Code cleanup
60+
- Use [proper commit messages](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html):
61+
- a subject line with `< 80` chars.
62+
- One blank line.
63+
- Optionally, a commit message body.
64+
- Please reference relevant Github issues in your commit message using `GH1234`
65+
or `#1234`. Either style is fine but the '#' style generates noise when your rebase your PR.
66+
- `doc/source/vx.y.z.txt` contains an ongoing
67+
changelog for each release. Add an entry to this file
68+
as needed in your PR: document the fix, enhancement,
69+
or (unavoidable) breaking change.
6070
- Maintain backward-compatibility. Pandas has lots of users with lots of existing code. Don't break it.
6171
- If you think breakage is required clearly state why as part of the PR.
6272
- Be careful when changing method signatures.
6373
- Add deprecation warnings where needed.
64-
- Performance matters. Make sure your PR hasn't introduced perf regressions by using `test_perf.sh`.
65-
- Docstrings follow the [numpydoc](https://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt) format.
66-
- Write tests.
67-
- When writing tests, use 2.6 compatible `self.assertFoo` methods. Some polyfills such as `assertRaises`
68-
can be found in `pandas.util.testing`.
69-
- Do not attach doctrings to tests. Make the test itself readable and use comments if needed.
7074
- Generally, pandas source files should not contain attributions. You can include a "thanks to..."
7175
in the release changelog. The rest is `git blame`/`git log`.
76+
77+
##### Workflow/Git
7278
- When you start working on a PR, start by creating a new branch pointing at the latest
7379
commit on github master.
7480
- **Do not** merge upstream into a branch you're going to submit as a PR.
@@ -78,21 +84,22 @@ looking for a quick way to help out.
7884
- Use `raise AssertionError` over `assert` unless you want the assertion stripped by `python -o`.
7985
- The pandas copyright policy is detailed in the pandas [LICENSE](https://github.com/pydata/pandas/blob/master/LICENSE).
8086
- On the subject of [PEP8](http://www.python.org/dev/peps/pep-0008/): yes.
87+
- [Git tips and tricks](https://github.com/pydata/pandas/wiki/Using-Git)
88+
89+
##### Code standards:
8190
- We've written a tool to check that your commits are PEP8 great,
8291
[`pip install pep8radius`](https://github.com/hayd/pep8radius). Look at PEP8 fixes in your branch
8392
vs master with `pep8radius master --diff` and make these changes with
8493
`pep8radius master --diff --in-place`.
8594
- On the subject of a massive PEP8-storm touching everything: not too often (once per release works).
95+
- Additional standards are outlined on the [code style wiki page](https://github.com/pydata/pandas/wiki/Code-Style-and-Conventions)
8696

8797
### Notes on plotting function conventions
8898

8999
https://groups.google.com/forum/#!topic/pystatsmodels/biNlCvJPNNY/discussion
90100

91-
####More developer docs
92-
101+
#### More developer docs
93102
* See the [developers](http://pandas.pydata.org/developers.html) page on the
94103
project website for more details.
95-
* [`pandas` wiki](https://github.com/pydata/pandas/wiki)
104+
* [`pandas` wiki](https://github.com/pydata/pandas/wiki) constains useful pages for development and general pandas usage
96105
* [Tips and tricks](https://github.com/pydata/pandas/wiki/Tips-&-Tricks)
97-
* [Git tips and tricks](https://github.com/pydata/pandas/wiki/Using-Git)
98-
* [Testing advice and best practices in `pandas`](https://github.com/pydata/pandas/wiki/Testing)

0 commit comments

Comments
 (0)