Skip to content

Commit e08e80b

Browse files
authored
Merge pull request #42 from phobson/repo-cleanup
Repo cleanup
2 parents a2fc33b + 50231d9 commit e08e80b

18 files changed

+379
-111
lines changed

.editorconfig

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# http://editorconfig.org
2+
3+
root = true
4+
5+
[*]
6+
indent_style = space
7+
indent_size = 4
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true
10+
charset = utf-8
11+
end_of_line = lf
12+
13+
[*.bat]
14+
indent_style = tab
15+
end_of_line = crlf
16+
17+
[LICENSE]
18+
insert_final_newline = false
19+
20+
[Makefile]
21+
indent_style = tab

.github/ISSUE_TEMPLATE.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
* Python version:
2+
* numpy version:
3+
* matplotlib version:
4+
* mpl-probscale version:
5+
* Operating System:
6+
7+
### Description
8+
9+
Describe what you were trying to get done.
10+
Tell us what happened, what went wrong, and what you expected to happen.
11+
12+
### What I Did
13+
14+
```
15+
Paste the command(s) you ran and the output.
16+
If there was a crash, please include the traceback here.
17+
```

.travis.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,23 @@ matrix:
55
- python: 2.7
66
env:
77
- COVERAGE=false
8-
- TESTERS="conda-forge pytest mock pytest-mpl coverage"
8+
- EXTRATESTERS="mock"
99
- ARGS="--verbose"
1010
- python: 3.4
1111
env:
1212
- COVERAGE=false
13-
- TESTERS="conda-forge pytest pytest-mpl coverage"
13+
- EXTRATESTERS=""
1414
- ARGS="--mpl --verbose"
1515
- python: 3.5
1616
env:
1717
- COVERAGE=false
18-
- TESTERS="conda-forge pytest pytest-mpl coverage"
18+
- EXTRATESTERS=""
1919
- ARGS="--mpl --verbose"
2020
- python: 3.5
2121
env:
2222
- COVERAGE=true
23-
- TESTERS="conda-forge pytest pytest-mpl coverage"
24-
- ARGS="--mpl --verbose"
23+
- EXTRATESTERS=""
24+
- ARGS="--mpl --verbose --pep8"
2525

2626
before_install:
2727

@@ -41,7 +41,7 @@ install:
4141

4242
- conda create --yes -n test python=$TRAVIS_PYTHON_VERSION numpy matplotlib docopt requests pyyaml
4343
- source activate test
44-
- conda install --yes --channel=${TESTERS}
44+
- conda install --yes --channel=conda-forge pytest-mpl pytest-cov pytest-pep8 ${EXTRATESTERS}
4545
- if [ ${COVERAGE} = true ]; then conda install scipy --yes; fi
4646
- pip install codecov
4747
- pip install .

AUTHORS.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
=======
2+
Credits
3+
=======
4+
5+
Development Lead
6+
----------------
7+
8+
* Paul M. Hobson <pmhobson@gmail.com>
9+
10+
Contributors
11+
------------
12+
13+
* Pierre Haessig

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 "probscale.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: "probscale"
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

docs/authors.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.. include:: ../AUTHORS.rst

docs/contributing.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.. include:: ../CONTRIBUTING.rst

docs/installation.rst

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
.. highlight:: shell
2+
3+
============
4+
Installation
5+
============
6+
7+
8+
Stable release
9+
--------------
10+
11+
To install mpl-probscale, run this command in your terminal:
12+
13+
.. code-block:: console
14+
15+
$ pip install probscale
16+
17+
This is the preferred method to install mpl-probscale, as it will always install the most recent stable release.
18+
19+
If you don't have `pip`_ installed, this `Python installation guide`_ can guide
20+
you through the process.
21+
22+
.. _pip: https://pip.pypa.io
23+
.. _Python installation guide: http://docs.python-guide.org/en/latest/starting/installation/
24+
25+
26+
From sources
27+
------------
28+
29+
The sources for mpl-probscale can be downloaded from the `Github repo`_.
30+
31+
You can either clone the public repository:
32+
33+
.. code-block:: console
34+
35+
$ git clone git://github.com/phobson/probscale
36+
37+
Or download the `tarball`_:
38+
39+
.. code-block:: console
40+
41+
$ curl -OL https://github.com/phobson/probscale/tarball/master
42+
43+
Once you have a copy of the source, you can install it with:
44+
45+
.. code-block:: console
46+
47+
$ pip install .
48+
49+
50+
.. _Github repo: https://github.com/phobson/probscale
51+
.. _tarball: https://github.com/phobson/probscale/tarball/master

docs/readme.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.. include:: ../README.md

0 commit comments

Comments
 (0)