Update README.md
[cached-property.git] / CONTRIBUTING.md
1 # Contributing
2
3 Contributions are welcome, and they are greatly appreciated! Every
4 little bit helps, and credit will always be given.
5
6 You can contribute in many ways:
7
8 ## Types of Contributions
9
10 ### Report Bugs
11
12 Report bugs at https://github.com/pydanny/cached-property/issues.
13
14 If you are reporting a bug, please include:
15
16 * Your operating system name and version.
17 * Any details about your local setup that might be helpful in troubleshooting.
18 * Detailed steps to reproduce the bug.
19
20 ### Fix Bugs
21
22 Look through the GitHub issues for bugs. Anything tagged with "bug"
23 is open to whoever wants to implement it.
24
25 ### Implement features
26
27 Look through the GitHub issues for features. Anything tagged with "feature"
28 is open to whoever wants to implement it.
29
30 ### Write Documentation
31
32 cached-property could always use more documentation, whether as part of the
33 official cached-property docs, in docstrings, or even on the web in blog posts,
34 articles, and such.
35
36 ### Submit Feedback
37
38 The best way to send feedback is to file an issue at https://github.com/pydanny/cached-property/issues.
39
40 If you are proposing a feature:
41
42 * Explain in detail how it would work.
43 * Keep the scope as narrow as possible, to make it easier to implement.
44 * Remember that this is a volunteer-driven project, and that contributions are welcome :)
45
46 ## Get started!
47
48 Ready to contribute? Here's how to set up `cached-property` for local development.
49
50 1. Fork the `cached-property` repo on GitHub.
51 2. Clone your fork locally::
52
53 ```bash
54 $ git clone git@github.com:your_name_here/cached-property.git
55 ```
56
57 3. Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development:
58
59 ```bash
60 $ mkvirtualenv cached-property
61 $ cd cached-property/
62 $ python setup.py develop
63 ```
64
65 4. Create a branch for local development:
66
67 ```bash
68 $ git checkout -b name-of-your-bugfix-or-feature
69 ```
70
71 Now you can make your changes locally.
72
73 5. Clean up the formatting (must be running at least Python 3.6):
74
75 ```bash
76 $ pip install -U black
77 $ black .
78 ```
79
80 6. When you're done making changes, check that your changes pass the tests, including testing other Python versions with tox:
81
82 ```bash
83 $ pytest tests/
84 $ tox
85 ```
86
87 To get tox, just pip install it into your virtualenv.
88
89 7. Commit your changes and push your branch to GitHub::
90
91 ```bash
92 $ git add .
93 $ git commit -m "Your detailed description of your changes."
94 $ git push origin name-of-your-bugfix-or-feature
95 ```
96
97 8. Submit a pull request through the GitHub website.
98
99 ## Pull Request Guidelines
100
101 Before you submit a pull request, check that it meets these guidelines:
102
103 1. The pull request should include tests.
104 2. If the pull request adds functionality, the docs should be updated. Put
105 your new functionality into a function with a docstring, and add the
106 feature to the list in README.rst.
107 3. The pull request should work for Python 2.7, and 3.3, 3.4, 3.5, 3.6 and for PyPy. Check https://travis-ci.org/pydanny/cached-property/pull_requests and make sure that the tests pass for all supported Python versions.
108
109 ## Tips
110
111 To run a subset of tests:
112
113 ```bash
114 $ python -m unittest tests.test_cached-property
115 ```