Skip to content

Commit d7b7d58

Browse files
committed
fill in contrib docs from cookiecutter
1 parent a2fc33b commit d7b7d58

File tree

2 files changed

+149
-9
lines changed

2 files changed

+149
-9
lines changed

CONTRIBUTING.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

CONTRIBUTING.rst

Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
.. highlight:: shell
2+
3+
============
4+
Contributing
5+
============
6+
7+
Contributions are welcome, and they are greatly appreciated! Every
8+
little bit helps, and credit will always be given.
9+
10+
You can contribute in many ways:
11+
12+
Types of Contributions
13+
----------------------
14+
15+
Report Bugs
16+
~~~~~~~~~~~
17+
18+
Report bugs at https://github.com/phobson/probscale/issues.
19+
20+
If you are reporting a bug, please include:
21+
22+
* Your operating system name and version.
23+
* Any details about your local setup that might be helpful in troubleshooting.
24+
* Detailed steps to reproduce the bug.
25+
26+
Fix Bugs
27+
~~~~~~~~
28+
29+
Look through the GitHub issues for bugs. Anything tagged with "bug"
30+
and "help wanted" is open to whoever wants to implement it.
31+
32+
Implement Features
33+
~~~~~~~~~~~~~~~~~~
34+
35+
Look through the GitHub issues for features. Anything tagged with "enhancement"
36+
and "help wanted" is open to whoever wants to implement it.
37+
38+
Write Documentation
39+
~~~~~~~~~~~~~~~~~~~
40+
41+
mpl-probscale could always use more documentation, whether as part of the
42+
official mpl-probscale docs, in docstrings, or even on the web in blog posts,
43+
articles, and such.
44+
45+
Submit Feedback
46+
~~~~~~~~~~~~~~~
47+
48+
The best way to send feedback is to file an issue at https://github.com/phobson/probscale/issues.
49+
50+
If you are proposing a feature:
51+
52+
* Explain in detail how it would work.
53+
* Keep the scope as narrow as possible, to make it easier to implement.
54+
* Remember that this is a volunteer-driven project, and that contributions
55+
are welcome :)
56+
57+
Get Started!
58+
------------
59+
60+
Ready to contribute? Here's how to set up `probscale` for local development.
61+
62+
1. Fork the `probscale` repo on GitHub.
63+
2. Clone your fork locally::
64+
65+
$ git clone git@github.com:your_name_here/probscale.git
66+
67+
3. Install your local copy into a conda environment. Assuming you have conda installed, this is how you set up your fork for local development::
68+
69+
$ conda config --add channels conda-forge
70+
$ conda create --name=probscale python=3.5 numpy matplotlib pytest pytest-cov pytest-pep8 pytest-mpl
71+
$ cd probscale/
72+
$ pip install -e .
73+
74+
4. Create a branch for local development::
75+
76+
$ git checkout -b name-of-your-bugfix-or-feature
77+
78+
Now you can make your changes locally.
79+
80+
5. When you're done making changes, check that your changes pass flake8 and the tests, including testing other Python versions with tox::
81+
82+
$ python check_probscale.py --mpl --pep8 --cov
83+
84+
6. Commit your changes and push your branch to GitHub::
85+
86+
$ git add <files you want to stage>
87+
$ git commit -m "Your detailed description of your changes."
88+
$ git push origin name-of-your-bugfix-or-feature
89+
90+
7. Submit a pull request through the GitHub website.
91+
92+
Matplotlib has good info on working with `source code`_ using `git and GitHub`_.
93+
94+
.. _source code: http://matplotlib.org/devel/coding_guide.html`
95+
.. _git and GitHub: http://matplotlib.org/devel/gitwash/development_workflow.html
96+
97+
Pull Request Guidelines
98+
-----------------------
99+
100+
Before you submit a pull request, check that it meets these guidelines:
101+
102+
1. The pull request should include tests.
103+
2. If the pull request adds functionality, the docs should be updated. Put
104+
your new functionality into a function with a docstring, and add the
105+
feature to the list in README.rst.
106+
3. The pull request should work for Python 3.4 and higher. Check
107+
https://travis-ci.org/phobson/probscale/pull_requests
108+
and make sure that the tests pass for all supported Python versions.
109+
110+
Tips
111+
----
112+
113+
To run a subset of tests::
114+
115+
$ py.test tests.test_probscale
116+
117+
118+
Configuring Sublime Text 3 to run the tests
119+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
120+
121+
In Sublime, got to Tools -> Build System -> New Build System.
122+
Then add the following configuration and save as "wqio.sublime-build"::
123+
124+
{
125+
"working_dir": "<path to the git repository>",
126+
"cmd": "<full path of the python executable> check_probscale.py --verbose <other pytest options>",
127+
}
128+
129+
130+
Configuring Atom to run the tests
131+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
132+
133+
In Atom, install the build_ package, create a new file called ".atom-build.yml" in the
134+
top level of the project directory, and add the following contents::
135+
136+
cmd: "<full path of the python executable>"
137+
name: "wqio"
138+
args:
139+
- check_probscale.py
140+
- --verbose
141+
- <other pytest options ...>
142+
cwd: <path to the git repository>
143+
sh: false
144+
keymap: ctrl-b
145+
atomCommandName: namespace:testprobscale
146+
147+
After this, hitting ctrl+b in either text editor will run the test suite.
148+
149+
.. _build: https://atom.io/packages/build

0 commit comments

Comments
 (0)