Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ install:
- pip install -U -r test_requirements.txt
- pip install --no-deps -e .
script:
- pytest --cov=gemd --cov-report term-missing --cov-report term:skip-covered --cov-config=tox.ini
--cov-fail-under=100 -s ./gemd
- pytest --cov=gemd --cov-report term-missing:skip-covered --cov-config=tox.ini --no-cov-on-fail --cov-fail-under=100 gemd
- flake8 gemd
- cd docs; make html; cd ..;
- touch ./docs/_build/html/.nojekyll
Expand Down
16 changes: 16 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,25 @@ Changes are gated on:
* Passing unit tests
* 100% unit test coverage
* PEP8 style compliance, with some exceptions in the [tox file](tox.ini)
* Incrementing the package version number in [setup.py](setup.py)

Check out the [.travis.yml](.travis.yml) file for the exact testing procedure.

As it can be easy to forget to verify these prior to pushing, it's possible to use [git hooks](https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks) to enforce compliance during normal workflows.
Consider editing `.git/hooks/pre-commit` or `.git/hooks/pre-push` (or adding them and marking them as executable: `chmod +x <file>`).
For example, you could set your local `.git/hooks/pre-commit` to be
```shell
if [ "`git rev-parse --abbrev-ref HEAD`" == "main" ];
then echo "On main branch";
exit 1;
fi &&
scripts/validate-version-bump.sh &&
flake8 gemd &&
pytest --quiet --cov=gemd --cov-report term-missing:skip-covered \
--cov-config=tox.ini --no-cov-on-fail --cov-fail-under=100 -x .
```
to make sure you're not on the `main` branch, you've incremented the package version, you pass the linter and you have complete, passing tests.

## Coding Style
This project follows [PEP8](https://www.python.org/dev/peps/pep-0008/), with the following exception:
* Maximum line length is 99 characters
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


setup(name='gemd',
version='1.10.0',
version='1.10.1',
url='http://github.com/CitrineInformatics/gemd-python',
description="Python binding for Citrine's GEMD data model",
author='Citrine Informatics',
Expand Down