Skip to content
This repository has been archived by the owner on May 5, 2020. It is now read-only.

Commit

Permalink
Add coverage.
Browse files Browse the repository at this point in the history
  • Loading branch information
shyuep committed Aug 21, 2017
1 parent 3120f48 commit 934c0bc
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 5 deletions.
9 changes: 7 additions & 2 deletions .circleci/config.yml
Expand Up @@ -8,17 +8,22 @@ jobs:
- checkout
- run:
command: |
mkdir coverage_reports
python -m venv venv
. venv/bin/activate
pip install -q numpy
pip install -q -r requirements.txt
pip install -q -r requirements-ci.txt
- run:
command: |
. venv/bin/activate
python setup.py develop
nosetests
nosetests --cover-html --cover-html-dir=coverage_reports
coveralls
no_output_timeout: 3600

- store_artifacts:
path: coverage_reports/
destination: tr1
workflows:
version: 2
build_and_test:
Expand Down
23 changes: 23 additions & 0 deletions .coveragerc
@@ -0,0 +1,23 @@
# .coveragerc to control coverage.py
[run]
source = veidt

[report]
# Regexes for lines to exclude from consideration
exclude_lines =
# Have to re-enable the standard pragma
pragma: no cover

# Don't complain about missing debug-only code:
def __repr__
if self\.debug

# Don't complain if tests don't hit defensive assertion code:
raise AssertionError
raise NotImplementedError

# Don't complain if non-runnable code isn't run:
if 0:
if __name__ == .__main__.:

ignore_errors = True
3 changes: 3 additions & 0 deletions requirements-ci.txt
@@ -0,0 +1,3 @@
nose==1.3.7
coverage==4.4.1
coveralls==1.2.0
5 changes: 2 additions & 3 deletions requirements.txt
@@ -1,11 +1,10 @@
numpy==1.13.1
scipy==0.19.1
pymatgen==2017.8.16
pymatgen==2017.8.21
monty==1.0.1
keras==2.0.6
tabulate==0.7.7
pandas==0.20.3
scikit-learn==0.19.0
tensorflow==1.2.1
six==1.10.0
nose==1.3.7
six==1.10.0

0 comments on commit 934c0bc

Please sign in to comment.