Skip to content

Commit 1a4ba8b

Browse files
committed
updating docs
1 parent 88e8cbe commit 1a4ba8b

File tree

6 files changed

+65
-63
lines changed

6 files changed

+65
-63
lines changed

AUTHORS.rst renamed to AUTHORS.md

File renamed without changes.
Lines changed: 62 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,15 @@
1-
.. highlight:: shell
21

3-
============
4-
Contributing
5-
============
2+
# Contributing
63

74
Contributions are welcome, and they are greatly appreciated! Every little bit
85
helps, and credit will always be given.
96

107
You can contribute in many ways:
118

12-
Types of Contributions
13-
----------------------
9+
## Types of Contributions
10+
11+
### Report Bugs
1412

15-
Report Bugs
16-
~~~~~~~~~~~
1713

1814
Report bugs at https://github.com/chrishavlin/yt_xarray/issues.
1915

@@ -23,27 +19,23 @@ If you are reporting a bug, please include:
2319
* Any details about your local setup that might be helpful in troubleshooting.
2420
* Detailed steps to reproduce the bug.
2521

26-
Fix Bugs
27-
~~~~~~~~
22+
### Fix Bugs
2823

2924
Look through the GitHub issues for bugs. Anything tagged with "bug" and "help
3025
wanted" is open to whoever wants to implement it.
3126

32-
Implement Features
33-
~~~~~~~~~~~~~~~~~~
27+
### Implement Features
3428

3529
Look through the GitHub issues for features. Anything tagged with "enhancement"
3630
and "help wanted" is open to whoever wants to implement it.
3731

38-
Write Documentation
39-
~~~~~~~~~~~~~~~~~~~
32+
### Write Documentation
4033

4134
yt_xarray could always use more documentation, whether as part of the
4235
official yt_xarray docs, in docstrings, or even on the web in blog posts,
4336
articles, and such.
4437

45-
Submit Feedback
46-
~~~~~~~~~~~~~~~
38+
### Submit Feedback
4739

4840
The best way to send feedback is to file an issue at https://github.com/chrishavlin/yt_xarray/issues.
4941

@@ -54,75 +46,91 @@ If you are proposing a feature:
5446
* Remember that this is a volunteer-driven project, and that contributions
5547
are welcome :)
5648

57-
Get Started!
58-
------------
49+
## Get Started!
5950

6051
Ready to contribute? Here's how to set up `yt_xarray` for local development.
6152

6253
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+
```
6658

6759
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+
```
6870

69-
$ mkvirtualenv yt_xarray
70-
$ cd yt_xarray/
71-
$ python setup.py develop
71+
5. Create a branch for local development::
7272

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.
7477

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:
7680

77-
Now you can make your changes locally.
81+
```
82+
$ pytest
83+
```
84+
To test multiple python versions, you can use `tox`:
7885

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+
```
8189

82-
$ flake8 yt_xarray tests
83-
$ python setup.py test or pytest
84-
$ tox
8590

86-
To get flake8 and tox, just pip install them into your virtualenv.
91+
7. Commit your changes and push your branch to GitHub:
8792

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.
89101

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:
93103

94-
7. Submit a pull request through the GitHub website.
104+
```
105+
$ git push origin name-of-your-bugfix-or-feature
106+
```
95107

96-
Pull Request Guidelines
97-
-----------------------
108+
8. Submit a pull request through the GitHub website.
109+
110+
## Pull Request Guidelines
98111

99112
Before you submit a pull request, check that it meets these guidelines:
100113

101114
1. The pull request should include tests.
102115
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.
108118

109-
Tips
110-
----
119+
## Tips
111120

112-
To run a subset of tests::
121+
To run a subset of tests:
113122

114123
$ pytest tests.test_yt_xarray
115124

116125

117-
Deploying
118-
---------
126+
## Deploying
119127

120128
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).
123130

131+
```
124132
$ bump2version patch # possible: major / minor / patch
125133
$ git push
126134
$ 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.

HISTORY.rst renamed to HISTORY.md

File renamed without changes.

README.rst renamed to README.md

File renamed without changes.

requirements_dev.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@ tox==3.14.0
66
coverage==4.5.4
77
Sphinx==1.8.5
88
twine==1.14.0
9+
pre-commit
910

1011
pytest==6.2.4

setup.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,6 @@
44

55
from setuptools import find_packages, setup
66

7-
with open("README.rst") as readme_file:
8-
readme = readme_file.read()
9-
10-
with open("HISTORY.rst") as history_file:
11-
history = history_file.read()
12-
13-
147
with open("requirements.txt") as reqs_file:
158
requirements = reqs_file.read().strip().split("\n")
169

@@ -33,10 +26,10 @@
3326
"Programming Language :: Python :: 3.9",
3427
"Programming Language :: Python :: 3.10",
3528
],
36-
description="interfaces between yt and xarray",
29+
description="interface between yt and xarray",
3730
install_requires=requirements,
3831
license="MIT license",
39-
long_description=readme + "\n\n" + history,
32+
long_description="tools for connecting yt and xarray",
4033
include_package_data=True,
4134
keywords="yt_xarray",
4235
name="yt_xarray",

0 commit comments

Comments
 (0)