Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
5 changes: 0 additions & 5 deletions .coveragerc

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/generate-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
- name: Install dpctl dependencies
shell: bash -l {0}
run: |
pip install numpy cython setuptools pytest pytest-cov coverage
pip install numpy cython setuptools pytest pytest-cov coverage[toml]

- name: Build dpctl with coverage
shell: bash -l {0}
Expand Down
4 changes: 4 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,10 @@ these steps:
To generate the coverage data for dpctl's Python sources, you only need to
install `coverage`.

```bash
python -m pip install coverage[toml]
```

3. Build dpctl with code coverage support.

```bash
Expand Down
29 changes: 29 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,32 @@ use_parentheses = true
ensure_newline_before_comments = true
line_length = 80
skip = ["versioneer.py", "dpctl/_version.py"]

[tool.coverage.run]
plugins = [
"Cython.Coverage"
]
branch = true
source = [
"dpctl"
]
omit = [
"dpctl/tests/*",
"dpctl/_version.py",
]

[tool.pytest.ini.options]
minversion = "6.0"
norecursedirs= [
".*", "*.egg*", "build", "dist", "conda.recipe",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you mean "conda-recipe"?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

arg! sorry for merging

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The typo was there always in our config. I copy-pasted without noticing.

]
addopts = [
"--junitxml=junit.xml",
"--ignore setup.py",
"--ignore run_test.py",
"--cov-report term-missing",
"--tb native",
"--strict",
"--durations=20",
"-q -ra",
]
15 changes: 0 additions & 15 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,18 +1,3 @@
[tool:pytest]
norecursedirs= .* *.egg* build dist conda.recipe
addopts =
--junitxml=junit.xml
--ignore setup.py
--ignore run_test.py
--cov-report term-missing
--tb native
--strict
--durations=20
env =
PYTHONHASHSEED=0
markers =
serial: execute test serially (to avoid race conditions)

[versioneer]
VCS = git
versionfile_source = dpctl/_version.py
Expand Down