-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #38 from pysat/flake8
TST: Add pytest-flake8 to travis tests
- Loading branch information
Showing
12 changed files
with
117 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,18 +2,20 @@ Contributing | |
============ | ||
|
||
Bug reports, feature suggestions and other contributions are greatly | ||
appreciated! pysatModels is a community-driven project and welcomes both feedback and contributions. | ||
appreciated! pysatModels is a community-driven project and welcomes both | ||
feedback and contributions. | ||
|
||
Short version | ||
============= | ||
|
||
* Submit bug reports and feature requests at `GitHub <https://github.com/pysat/pysatModels/issues>`_ | ||
* Submit bug reports and feature requests at | ||
[GitHub Issues](https://github.com/pysat/pysatModels/issues) | ||
* Make pull requests to the ``develop`` branch | ||
|
||
Bug reports | ||
=========== | ||
|
||
When `reporting a bug <https://github.com/pysat/pysatModels/issues>`_ please | ||
When [reporting a bug](https://github.com/pysat/pysatModels/issues) please | ||
include: | ||
|
||
* Your operating system name and version | ||
|
@@ -24,7 +26,7 @@ Feature requests and feedback | |
============================= | ||
|
||
The best way to send feedback is to file an issue at | ||
`GitHub <https://github.com/pysat/pysatModels/issues>`_. | ||
[GitHub Issues](https://github.com/pysat/pysatModels/issues). | ||
|
||
If you are proposing a feature: | ||
|
||
|
@@ -38,40 +40,48 @@ Development | |
|
||
To set up `pysatModels` for local development: | ||
|
||
1. `Fork pysat on GitHub <https://github.com/pysat/pysatModels/fork>`_. | ||
1. Fork pysat on [GitHub](https://github.com/pysat/pysatModels/fork). | ||
2. Clone your fork locally:: | ||
|
||
|
||
git clone [email protected]:your_name_here/pysatModels.git | ||
git clone [email protected]:your_name_here/pysatModels.git | ||
|
||
3. Create a branch for local development:: | ||
|
||
|
||
git checkout -b name-of-your-bugfix-or-feature | ||
git checkout -b name-of-your-bugfix-or-feature | ||
|
||
Now you can make your changes locally. Tests for new instruments are | ||
performed automatically. Tests for custom functions should be added to the | ||
appropriately named file in ``pysatModels/tests``. For example, the averaging routines in avg.py are tested in ``pysatModels/tests/test_avg.py``. If no | ||
test file exists, then you should create one. This testing uses pytest, which | ||
will run tests on any python file in the test directory that starts with | ||
``test_``. | ||
appropriately named file in ``pysatModels/tests``. For example, the | ||
averaging routines in avg.py are tested in | ||
``pysatModels/tests/test_avg.py``. If no test file exists, then you should | ||
create one. This testing uses pytest, which will run tests on any python | ||
file in the test directory that starts with ``test_``. | ||
|
||
4. When you're done making changes, run all the checks to ensure that nothing | ||
is broken on your local system:: | ||
4. When you're done making changes, run all the checks from the | ||
``pysatModels/tests`` directory to ensure that nothing is broken on your | ||
local system. You may need to install | ||
[pytest](https://docs.pytest.org/en/latest/) and | ||
[pytest-flake8](https://pypi.org/project/pytest-flake8/) first. :: | ||
|
||
|
||
pytest -vs | ||
python -m pytest -vs --flake8 | ||
|
||
5. Update/add documentation (in ``docs``), if relevant | ||
5. Update or add documentation (in ``docs``), if relevant. If you have added | ||
a new routine, you will need to add an example in the ``docs/examples`` | ||
folder. | ||
|
||
5. Commit your changes and push your branch to GitHub:: | ||
6. Commit your changes and push your branch to GitHub. Our commit statements | ||
follow the basic rules in the | ||
[Numpy/SciPy workflow](https://docs.scipy.org/doc/numpy-1.15.1/dev/gitwash/development_workflow.html):: | ||
|
||
|
||
git add . | ||
git commit -m "Brief description of your changes" | ||
git push origin name-of-your-bugfix-or-feature | ||
git add . | ||
git commit -m "TYPE: Brief description of your changes" | ||
git push origin name-of-your-bugfix-or-feature | ||
|
||
6. Submit a pull request through the GitHub website. Pull requests should be | ||
7. Submit a pull request through the GitHub website. Pull requests should be | ||
made to the ``develop`` branch. | ||
|
||
Pull Request Guidelines | ||
|
@@ -85,10 +95,10 @@ For merging, you should: | |
1. Include an example for use | ||
2. Add a note to ``CHANGELOG.md`` about the changes | ||
3. Ensure that all checks passed (current checks include Scrutinizer, Travis-CI, | ||
and Coveralls) [1]_ | ||
and Coveralls). | ||
|
||
.. [1] If you don't have all the necessary Python versions available locally or | ||
have trouble building all the testing environments, you can rely on | ||
Travis to run the tests for each change you add in the pull request. | ||
Because testing here will delay tests by other developers, please ensure | ||
that the code passes all tests on your local system first. | ||
If you don't have all the necessary Python versions available locally or | ||
have trouble building all the testing environments, you can rely on | ||
Travis to run the tests for each change you add in the pull request. | ||
Because testing here will delay tests by other developers, please ensure | ||
that the code passes all tests on your local system first. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.