-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #109 from nvictus/develop
Switch to pytest and add coverage reporting
- Loading branch information
Showing
12 changed files
with
104 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,47 @@ | ||
COMMANDS | ||
old | ||
npm-debug.log | ||
.DS_Store | ||
clodius/fast.cpython-35m-darwin.so | ||
clodius/fast.so | ||
tmp | ||
checkpoint | ||
*.py[cod] | ||
__pycache__ | ||
*~ | ||
*.swn | ||
*.swo | ||
*.swp | ||
*.tiles | ||
*.pyc | ||
/data | ||
|
||
# setup and build artifacts | ||
*.egg-info/ | ||
.eggs/ | ||
dist/ | ||
build/ | ||
MANIFEST | ||
docs/_templates | ||
docs/_static | ||
docs/_build | ||
clodius/*.c | ||
*.so | ||
|
||
# test and coverage artifacts | ||
.cache | ||
.pytest_cache | ||
.coverage | ||
coverage.xml | ||
htmlcov/ | ||
|
||
# OS-generated files | ||
.DS_Store | ||
.Spotlight-V100 | ||
.Trashes | ||
ehthumbs.db | ||
Thumbs.db | ||
|
||
.ipynb_checkpoints/ | ||
.idea/ | ||
old | ||
tmp | ||
checkpoint | ||
data/ | ||
output/ | ||
COMMANDS | ||
npm-debug.log | ||
output.tar | ||
profile.dat | ||
profile.png | ||
output/ | ||
aws_keys.py | ||
.ipynb_checkpoints/ | ||
/build | ||
/dist | ||
.idea/ | ||
clodius.egg-info | ||
.eggs | ||
clodius/*.c | ||
*.so | ||
docs/_templates | ||
docs/_static | ||
docs/_build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
-r requirements.txt | ||
flake8 | ||
nose==1.3.7 | ||
pytest | ||
pytest-cov | ||
autopep8 | ||
bumpversion |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
#!/bin/bash | ||
# https://github.com/martinxyz/config/blob/master/scripts/pyprof | ||
set - e # exit on error | ||
rm - f profile.png profile.dat | ||
python - m cProfile - o profile.dat $@ | ||
gprof2dot.py - f pstats profile.dat | dot - Tpng - o profile.png | ||
open profile.png | ||
#https://github.com/martinxyz/config/blob/master/scripts/pyprof | ||
set -e # exit on error | ||
rm -f profile.png profile.dat | ||
python -m cProfile -o profile.dat $@ | ||
gprof2dot.py -f pstats profile.dat | dot -Tpng -o profile.png | ||
eog profile.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
[wheel] | ||
universal = 1 | ||
|
||
[flake8] | ||
exclude = | ||
__init__.py | ||
src/* # src directory is generated during build, and then cleared. | ||
src/**/* | ||
|
||
max-line-length = 80 | ||
|
||
ignore = | ||
E501 # Line too long | ||
E722 # do not use bare 'except' | ||
W503 # line break before binary operator | ||
W504 # line break after binary operator | ||
|
||
select = | ||
C # mccabe code complexity | ||
E # pycodestyle error | ||
W # pycodestyle warning | ||
F # pyflakes fatals | ||
# B # bugbear default checks | ||
# B950 # bugbear opinonated warning (Line too long: max-line-length + 10%) | ||
|
||
[tool:pytest] | ||
addopts = --cov=clodius --cov-report=term-missing --cov-report=html --cov-report=xml | ||
testpaths = | ||
test | ||
|
||
[coverage:run] | ||
source = | ||
clodius/ | ||
|
||
[coverage:report] | ||
exclude_lines = | ||
pragma: no cover | ||
return NotImplemented | ||
raise NotImplementedError |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,5 +16,5 @@ start download | |
end download | ||
|
||
start test | ||
nosetests test | ||
pytest | ||
end test |