Skip to content

Commit 37b9f43

Browse files
authored
Create CONTRIBUTING.md
1 parent 8d25eaa commit 37b9f43

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

CONTRIBUTING.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Contributing
2+
3+
After cloning this repo, create a [virtualenv](https://virtualenv.pypa.io/en/stable/) and ensure dependencies are installed by running:
4+
5+
```sh
6+
virtualenv venv
7+
source venv/bin/activate
8+
pip install -e ".[test]"
9+
```
10+
11+
Well-written tests and maintaining good test coverage is important to this project. While developing, run new and existing tests with:
12+
13+
```sh
14+
pytest --cov=pyms --cov=tests tests/
15+
```
16+
17+
Add the `-s` flag if you have introduced breakpoints into the code for debugging.
18+
Add the `-v` ("verbose") flag to get more detailed test output. For even more detailed output, use `-vv`.
19+
Check out the [pytest documentation](https://docs.pytest.org/en/latest/) for more options and test running controls.
20+
21+
PyMS supports several versions of Python3. To make sure that changes do not break compatibility with any of those versions, we use `tox` to create virtualenvs for each Python version and run tests with that version. To run against all Python versions defined in the `tox.ini` config file, just run:
22+
23+
```sh
24+
tox
25+
```
26+
27+
If you wish to run against a specific version defined in the `tox.ini` file:
28+
29+
```sh
30+
tox -e py36
31+
```
32+
33+
Tox can only use whatever versions of Python are installed on your system. When you create a pull request, Travis will also be running the same tests and report the results, so there is no need for potential contributors to try to install every single version of Python on their own system ahead of time. We appreciate opening issues and pull requests to make PyMS even more stable & useful!

0 commit comments

Comments
 (0)