Skip to content

Commit 6cfc2a6

Browse files
author
Diptorup Deb
authored
Consolidate configurations of tools that support PEP 518 into pyproject.toml (#486)
* Consolidate some of the configs into pyproject.toml * Update github workflow to install coverage with toml support. - Also update CONTRIBUTING.md.
1 parent 4513a1d commit 6cfc2a6

File tree

5 files changed

+34
-21
lines changed

5 files changed

+34
-21
lines changed

.coveragerc

Lines changed: 0 additions & 5 deletions
This file was deleted.

.github/workflows/generate-coverage.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ jobs:
7979
- name: Install dpctl dependencies
8080
shell: bash -l {0}
8181
run: |
82-
pip install numpy cython setuptools pytest pytest-cov coverage
82+
pip install numpy cython setuptools pytest pytest-cov coverage[toml]
8383
8484
- name: Build dpctl with coverage
8585
shell: bash -l {0}

CONTRIBUTING.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,10 @@ these steps:
154154
To generate the coverage data for dpctl's Python sources, you only need to
155155
install `coverage`.
156156

157+
```bash
158+
python -m pip install coverage[toml]
159+
```
160+
157161
3. Build dpctl with code coverage support.
158162

159163
```bash

pyproject.toml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,32 @@ use_parentheses = true
1010
ensure_newline_before_comments = true
1111
line_length = 80
1212
skip = ["versioneer.py", "dpctl/_version.py"]
13+
14+
[tool.coverage.run]
15+
plugins = [
16+
"Cython.Coverage"
17+
]
18+
branch = true
19+
source = [
20+
"dpctl"
21+
]
22+
omit = [
23+
"dpctl/tests/*",
24+
"dpctl/_version.py",
25+
]
26+
27+
[tool.pytest.ini.options]
28+
minversion = "6.0"
29+
norecursedirs= [
30+
".*", "*.egg*", "build", "dist", "conda.recipe",
31+
]
32+
addopts = [
33+
"--junitxml=junit.xml",
34+
"--ignore setup.py",
35+
"--ignore run_test.py",
36+
"--cov-report term-missing",
37+
"--tb native",
38+
"--strict",
39+
"--durations=20",
40+
"-q -ra",
41+
]

setup.cfg

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,3 @@
1-
[tool:pytest]
2-
norecursedirs= .* *.egg* build dist conda.recipe
3-
addopts =
4-
--junitxml=junit.xml
5-
--ignore setup.py
6-
--ignore run_test.py
7-
--cov-report term-missing
8-
--tb native
9-
--strict
10-
--durations=20
11-
env =
12-
PYTHONHASHSEED=0
13-
markers =
14-
serial: execute test serially (to avoid race conditions)
15-
161
[versioneer]
172
VCS = git
183
versionfile_source = dpctl/_version.py

0 commit comments

Comments
 (0)