|
a |
|
b/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/john-p/wsic/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 |
|
|
18 |
troubleshooting. |
|
|
19 |
- Detailed steps to reproduce the bug. |
|
|
20 |
|
|
|
21 |
### Fix Bugs |
|
|
22 |
|
|
|
23 |
Look through the GitHub issues for bugs. Anything tagged with "bug" and |
|
|
24 |
"help wanted" is open to whoever wants to implement it. |
|
|
25 |
|
|
|
26 |
### Implement Features |
|
|
27 |
|
|
|
28 |
Look through the GitHub issues for features. Anything tagged with |
|
|
29 |
"enhancement" and "help wanted" is open to whoever wants to implement |
|
|
30 |
it. |
|
|
31 |
|
|
|
32 |
### Write Documentation |
|
|
33 |
|
|
|
34 |
wsic could always use more documentation, whether as part of the |
|
|
35 |
official wsic docs, in docstrings, or even on the web in blog posts, |
|
|
36 |
articles, and such. |
|
|
37 |
|
|
|
38 |
### Submit Feedback |
|
|
39 |
|
|
|
40 |
The best way to send feedback is to file an issue at |
|
|
41 |
<https://github.com/john-p/wsic/issues>. |
|
|
42 |
|
|
|
43 |
If you are proposing a feature: |
|
|
44 |
|
|
|
45 |
- Explain in detail how it would work. |
|
|
46 |
- Keep the scope as narrow as possible, to make it easier to |
|
|
47 |
implement. |
|
|
48 |
- Remember that this is a volunteer-driven project, and that |
|
|
49 |
contributions are welcome :) |
|
|
50 |
|
|
|
51 |
## Get Started! |
|
|
52 |
|
|
|
53 |
Ready to contribute? Here's how to set up |
|
|
54 |
<span class="title-ref">wsic</span> for local development. |
|
|
55 |
|
|
|
56 |
1. Fork the <span class="title-ref">wsic</span> repo on GitHub. |
|
|
57 |
|
|
|
58 |
1. Clone your fork locally: |
|
|
59 |
|
|
|
60 |
```shell |
|
|
61 |
$ git clone git@github.com:your_name_here/wsic.git |
|
|
62 |
``` |
|
|
63 |
|
|
|
64 |
1. Install your local copy into a virtualenv. Assuming you have |
|
|
65 |
virtualenvwrapper installed, this is how you set up your fork for |
|
|
66 |
local development: |
|
|
67 |
|
|
|
68 |
```shell |
|
|
69 |
$ mkvirtualenv wsic |
|
|
70 |
$ cd wsic/ |
|
|
71 |
$ python setup.py develop |
|
|
72 |
``` |
|
|
73 |
|
|
|
74 |
1. Create a branch for local development: |
|
|
75 |
|
|
|
76 |
```shell |
|
|
77 |
$ git checkout -b name-of-your-bugfix-or-feature |
|
|
78 |
``` |
|
|
79 |
|
|
|
80 |
Now you can make your changes locally. |
|
|
81 |
|
|
|
82 |
1. When you're done making changes, check that your changes pass flake8 |
|
|
83 |
and the tests, including testing other Python versions with tox: |
|
|
84 |
|
|
|
85 |
```shell |
|
|
86 |
$ flake8 wsic tests |
|
|
87 |
$ python setup.py test or pytest |
|
|
88 |
$ tox |
|
|
89 |
``` |
|
|
90 |
|
|
|
91 |
To get flake8 and tox, just pip install them into your virtualenv. |
|
|
92 |
|
|
|
93 |
1. Commit your changes and push your branch to GitHub: |
|
|
94 |
|
|
|
95 |
```shell |
|
|
96 |
$ git add . |
|
|
97 |
$ git commit -m "Your detailed description of your changes." |
|
|
98 |
$ git push origin name-of-your-bugfix-or-feature |
|
|
99 |
``` |
|
|
100 |
|
|
|
101 |
1. Submit a pull request through the GitHub website. |
|
|
102 |
|
|
|
103 |
## Pull Request Guidelines |
|
|
104 |
|
|
|
105 |
Before you submit a pull request, check that it meets these guidelines: |
|
|
106 |
|
|
|
107 |
1. The pull request should include tests. |
|
|
108 |
1. If the pull request adds functionality, the docs should be updated. |
|
|
109 |
Put your new functionality into a function with a docstring, and add |
|
|
110 |
the feature to the list in README.rst. |
|
|
111 |
1. The pull request should work for cPython 3.8, 3.9, 3.10. Check the |
|
|
112 |
GitHib Actions workflow on the pull request and make sure that the |
|
|
113 |
tests pass for all supported Python versions. |
|
|
114 |
|
|
|
115 |
## Tips |
|
|
116 |
|
|
|
117 |
To run a subset of tests: |
|
|
118 |
|
|
|
119 |
```shell |
|
|
120 |
$ pytest tests.test_wsic |
|
|
121 |
``` |
|
|
122 |
|
|
|
123 |
## Deploying |
|
|
124 |
|
|
|
125 |
A reminder for the maintainers on how to deploy. Make sure all your |
|
|
126 |
changes are committed (including an entry in HISTORY.md). Then run: |
|
|
127 |
|
|
|
128 |
```shell |
|
|
129 |
$ bump2version patch # possible: major / minor / patch |
|
|
130 |
$ git push |
|
|
131 |
$ git push --tags |
|
|
132 |
``` |
|
|
133 |
|
|
|
134 |
GitHub Actions will then deploy to PyPI if tests pass. |