Skip to content

Commit

Permalink
Add coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
george0st committed Dec 1, 2023
1 parent 6829e7f commit 9cfd743
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# .coveragerc to control coverage.py
[run]
source = ./
parallel = True
concurrency = multiprocessing,thread

[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
raise CoverageWarning

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

omit:
./tests/*
setup.py
dependencies.py
main.py
7 changes: 7 additions & 0 deletions cover.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
rem Setting based on 'https://coverage.readthedocs.io/en/7.3.2/'

coverage erase
coverage run -m unittest discover
coverage combine
coverage report -m
coverage-badge -f -o coverage.svg
5 changes: 5 additions & 0 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
mlrun>=1.3.0, <=1.5.1
python-dotenv~=0.17.0
jinja2~=3.1
coverage>=7
coverage-badge>=1

0 comments on commit 9cfd743

Please sign in to comment.