Skip to content

Commit

Permalink
Update contribution instructions and move to CONTRIBUTING.md
Browse files Browse the repository at this point in the history
  • Loading branch information
havocp committed Jun 5, 2017
1 parent e04f216 commit ce0ffd7
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 17 deletions.
25 changes: 25 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Mechanics

Here's how to work on the code:

* `python setup.py test` is configured to run all the checks that
have to pass before you commit or push. It also reformats the
code with yapf if necessary. Continuous integration runs this
command so you should run it and make it pass before you push
to the repo.
* To only run the formatter and linter, use `python setup.py test
--format-only`.
* If you have added but uncommitted changes, you can use use `python setup.py test
--format-only --git-staged-only` to lint only the added files.
* To only run the tests, use `python -m pytest -vv anaconda_project`
* To only run a single file of tests use `python -m pytest
-vv anaconda_project/test/test_foo.py`
* To only run a single test function `python -m pytest
-vv anaconda_project/test/test_foo.py::test_something`
* To run only "fast" tests, use `python -m pytest -vv -k-slow
anaconda_project` which skips slow tests. Slow tests have to
pass in CI, but often it's helfpul to get all the fast tests
working before debugging the slow ones.
* There's a script `build_and_upload.sh` that should be used to
manually make a release. The checked-out revision should have
a version tag prior to running the script.
18 changes: 1 addition & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,20 +112,4 @@ Please report issues right here on GitHub.

# Contributing

Here's how to work on the code:

* `python setup.py test` is configured to run all the checks that
have to pass before you commit or push. It also reformats the
code with yapf if necessary. Continuous integration runs this
command so you should run it and make it pass before you push
to the repo.
* To only run the formatter and linter, use `python setup.py test
--format-only`.
* To only run the tests, use `python -m pytest -vv anaconda_project`
* To only run a single file of tests use `python -m pytest
-vv anaconda_project/test/test_foo.py`
* To only run a single test function `python -m pytest
-vv anaconda_project/test/test_foo.py::test_something`
* There's a script `build_and_upload.sh` that should be used to
manually make a release. The checked-out revision should have
a version tag prior to running the script.
Please see CONTRIBUTING.md in this directory.

0 comments on commit ce0ffd7

Please sign in to comment.