diff --git a/.travis.yml b/.travis.yml index 319f2ccc..71dd4dba 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0501c5e6..9efeda99 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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 `). +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 diff --git a/setup.py b/setup.py index 0d3796ca..2f294e55 100644 --- a/setup.py +++ b/setup.py @@ -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',