Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up coverage writing #84

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[run]
data_file = coverage/.coverage
branch = true

[paths]
source = fairtally/

[html]
directory = coverage/htmlcov/

[xml]
output = coverage/coverage.xml

[report]
omit =
venv*
tests/*
jspaaks marked this conversation as resolved.
Show resolved Hide resolved
31 changes: 31 additions & 0 deletions coverage/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Coverage reporting

The coverage reports will be written in this directory. After running `pytest`, the directory should look more or less like this:

```text
coverage/
├── .coverage
├── coverage.xml
├── htmlcov
│   ├── coverage_html.js
│   ├── fairtally_check_py.html
│   ├── fairtally_cli_py.html
│   ├── fairtally___init___py.html
│   ├── fairtally_redirect_stdout_stderr_py.html
│   ├── fairtally_utils_py.html
│   ├── fairtally___version___py.html
│   ├── favicon_32.png
│   ├── index.html
│   ├── jquery.ba-throttle-debounce.min.js
│   ├── jquery.hotkeys.js
│   ├── jquery.isonscreen.js
│   ├── jquery.min.js
│   ├── jquery.tablesorter.min.js
│   ├── keybd_closed.png
│   ├── keybd_open.png
│   ├── status.json
│   └── style.css
└── README.md
```

Everything except the README is generated (see configuration in `/.coveragerc`).
6 changes: 1 addition & 5 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,12 @@ build-dir = docs/_build
all_files = 1
builder = html

[coverage:run]
branch = True
source = fairtally

[metadata]
description-file = README.rst

[tool:pytest]
testpaths = tests
addopts = --cov --cov-report xml --cov-report term --cov-report html
addopts = --cov --cov-config=.coveragerc --cov-report html --cov-report term --cov-report xml

[tool:isort]
lines_after_imports = 2
Expand Down