1
- .. highlight :: shell
2
1
3
- ============
4
- Contributing
5
- ============
2
+ # Contributing
6
3
7
4
Contributions are welcome, and they are greatly appreciated! Every little bit
8
5
helps, and credit will always be given.
9
6
10
7
You can contribute in many ways:
11
8
12
- Types of Contributions
13
- ----------------------
9
+ ## Types of Contributions
10
+
11
+ ### Report Bugs
14
12
15
- Report Bugs
16
- ~~~~~~~~~~~
17
13
18
14
Report bugs at https://github.com/chrishavlin/yt_xarray/issues .
19
15
@@ -23,27 +19,23 @@ If you are reporting a bug, please include:
23
19
* Any details about your local setup that might be helpful in troubleshooting.
24
20
* Detailed steps to reproduce the bug.
25
21
26
- Fix Bugs
27
- ~~~~~~~~
22
+ ### Fix Bugs
28
23
29
24
Look through the GitHub issues for bugs. Anything tagged with "bug" and "help
30
25
wanted" is open to whoever wants to implement it.
31
26
32
- Implement Features
33
- ~~~~~~~~~~~~~~~~~~
27
+ ### Implement Features
34
28
35
29
Look through the GitHub issues for features. Anything tagged with "enhancement"
36
30
and "help wanted" is open to whoever wants to implement it.
37
31
38
- Write Documentation
39
- ~~~~~~~~~~~~~~~~~~~
32
+ ### Write Documentation
40
33
41
34
yt_xarray could always use more documentation, whether as part of the
42
35
official yt_xarray docs, in docstrings, or even on the web in blog posts,
43
36
articles, and such.
44
37
45
- Submit Feedback
46
- ~~~~~~~~~~~~~~~
38
+ ### Submit Feedback
47
39
48
40
The best way to send feedback is to file an issue at https://github.com/chrishavlin/yt_xarray/issues .
49
41
@@ -54,75 +46,91 @@ If you are proposing a feature:
54
46
* Remember that this is a volunteer-driven project, and that contributions
55
47
are welcome :)
56
48
57
- Get Started!
58
- ------------
49
+ ## Get Started!
59
50
60
51
Ready to contribute? Here's how to set up ` yt_xarray ` for local development.
61
52
62
53
1 . Fork the ` yt_xarray ` repo on GitHub.
63
- 2. Clone your fork locally::
64
-
65
- $ git clone git@github.com:your_name_here/yt_xarray.git
54
+ 2 . Clone your fork locally:
55
+ ```
56
+ $ git clone git@github.com:your_name_here/yt_xarray.git
57
+ ```
66
58
67
59
3 . Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development::
60
+ ```
61
+ $ mkvirtualenv yt_xarray
62
+ $ cd yt_xarray/
63
+ $ python -m pip install -e .
64
+ $ python -m pip install -r requirements_dev.txt
65
+ ```
66
+ 4 . (optional) Setup pre-commit
67
+ ```
68
+ $ pre-commit install
69
+ ```
68
70
69
- $ mkvirtualenv yt_xarray
70
- $ cd yt_xarray/
71
- $ python setup.py develop
71
+ 5 . Create a branch for local development::
72
72
73
- 4. Create a branch for local development::
73
+ ```
74
+ $ git checkout -b name-of-your-bugfix-or-feature
75
+ ```
76
+ Now you can make your changes locally.
74
77
75
- $ git checkout -b name-of-your-bugfix-or-feature
78
+ 6 . When you're done making changes, check that your changes pass the
79
+ tests:
76
80
77
- Now you can make your changes locally.
81
+ ```
82
+ $ pytest
83
+ ```
84
+ To test multiple python versions, you can use ` tox ` :
78
85
79
- 5. When you're done making changes, check that your changes pass flake8 and the
80
- tests, including testing other Python versions with tox::
86
+ ```
87
+ $ tox
88
+ ```
81
89
82
- $ flake8 yt_xarray tests
83
- $ python setup.py test or pytest
84
- $ tox
85
90
86
- To get flake8 and tox, just pip install them into your virtualenv.
91
+ 7 . Commit your changes and push your branch to GitHub:
87
92
88
- 6. Commit your changes and push your branch to GitHub::
93
+ ```
94
+ $ git add .
95
+ $ git commit -m "Your detailed description of your changes."
96
+ ```
97
+ If you've installed pre-commit, then pre-commit will run your changes through
98
+ some style checks. It will try to fix files if needed. If it finds errors, you
99
+ will need to re-add those files (after fixing it if pre-commit could not do so
100
+ automatically) and then commit again.
89
101
90
- $ git add .
91
- $ git commit -m "Your detailed description of your changes."
92
- $ git push origin name-of-your-bugfix-or-feature
102
+ Now your branch is ready to push:
93
103
94
- 7. Submit a pull request through the GitHub website.
104
+ ```
105
+ $ git push origin name-of-your-bugfix-or-feature
106
+ ```
95
107
96
- Pull Request Guidelines
97
- -----------------------
108
+ 8 . Submit a pull request through the GitHub website.
109
+
110
+ ## Pull Request Guidelines
98
111
99
112
Before you submit a pull request, check that it meets these guidelines:
100
113
101
114
1 . The pull request should include tests.
102
115
2 . If the pull request adds functionality, the docs should be updated. Put
103
- your new functionality into a function with a docstring, and add the
104
- feature to the list in README.rst.
105
- 3. The pull request should work for Python 3.5, 3.6, 3.7 and 3.8, and for PyPy. Check
106
- https://travis-ci.com/chrishavlin/yt_xarray/pull_requests
107
- and make sure that the tests pass for all supported Python versions.
116
+ your new functionality into a function with a docstring.
117
+ 3 . The pull request should pass all automated tests.
108
118
109
- Tips
110
- ----
119
+ ## Tips
111
120
112
- To run a subset of tests::
121
+ To run a subset of tests:
113
122
114
123
$ pytest tests.test_yt_xarray
115
124
116
125
117
- Deploying
118
- ---------
126
+ ## Deploying
119
127
120
128
A reminder for the maintainers on how to deploy.
121
- Make sure all your changes are committed (including an entry in HISTORY.rst).
122
- Then run::
129
+ Make sure all your changes are committed (including an entry in HISTORY.md).
123
130
131
+ ```
124
132
$ bump2version patch # possible: major / minor / patch
125
133
$ git push
126
134
$ git push --tags
127
-
128
- Travis will then deploy to PyPI if tests pass.
135
+ ```
136
+ github will then push to PyPI if tests pass.
0 commit comments