When tests finish, a report should be printed that shows the code coverage of timm. This should give us a better idea where we should work on test coverage. I have tested this locally (on a subset of tests) and it worked. Since the number of test dependencies was getting quite high, I created a requirements-dev.txt and moved them there. GH action and CONTRIBUTING.md are adjusted accordingly. Furthermore, instead of extending the pytest invocation, I created a pyproject.toml and added the coverage options there. For completeness, I also added the black settings that come closest to the style of timm. LMK if this is not desired. For now, the coverage is only reported but not enforced. I.e. when a PR is created that adds uncovered lines, CI will still succeed. We could think about adding codecov or something like that, but it can be annoying sometimes and the service was flaky for me in the past.pull/1688/head
parent
a5b01ec04e
commit
1a934d2a5e
@ -0,0 +1,12 @@
|
|||||||
|
[tool.pytest.ini_options]
|
||||||
|
addopts = "--cov=timm --cov-report=term-missing"
|
||||||
|
|
||||||
|
[tool.coverage.run]
|
||||||
|
omit = [
|
||||||
|
"tests/test_*.py",
|
||||||
|
]
|
||||||
|
|
||||||
|
[tool.black]
|
||||||
|
line-length = 120
|
||||||
|
target-version = ['py37', 'py38', 'py39', 'py310', 'py311']
|
||||||
|
skip-string-normalization = true
|
@ -0,0 +1,6 @@
|
|||||||
|
pytest
|
||||||
|
pytest-timeout
|
||||||
|
pytest-xdist
|
||||||
|
pytest-forked
|
||||||
|
expecttest
|
||||||
|
pytest-cov
|
Loading…
Reference in new issue