Skip to content

Commit 91e0e61

Browse files
authored
Ensure we test coverage uploading (#246)
1 parent ee510b9 commit 91e0e61

File tree

14 files changed

+197
-33
lines changed

14 files changed

+197
-33
lines changed

.config/requirements-docs.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
argparse-manpage
2+
mkdocs-ansible>=24.12.0 # do not use lock extra because it would break dependabot updates
3+
mkdocs-exclude

.config/requirements-test.in

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
coverage>=7.6.9
2+
# pytest-cov
3+
pytest-instafail
4+
pytest-plus
5+
pytest>=8

.config/requirements.in

Whitespace-only changes.

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
uses: ./.github/workflows/tox.yml
1414
with:
1515
default_python: "3.10"
16-
jobs_producing_coverage: 0
16+
jobs_producing_coverage: 6
1717
max_python: "3.13"
1818
min_python: "3.10"
1919
run_post: echo 'Running post'

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,3 +132,4 @@ dmypy.json
132132
.vault
133133

134134
_readthedocs/
135+
src/team_devtools/_version.py

.readthedocs.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ python:
1616
install:
1717
- method: pip
1818
path: tox
19+
- method: pip
20+
path: .
21+
extra_requirements:
22+
- docs
1923
submodules:
2024
include: all
2125
recursive: true

codecov.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
comment: false
3+
coverage:
4+
status:
5+
patch: true
6+
project:
7+
default:
8+
threshold: 0.5%

pyproject.toml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
[build-system]
2+
build-backend = "setuptools.build_meta"
3+
requires = [
4+
"setuptools >= 65.3.0", # required by pyproject+setuptools_scm integration and editable installs
5+
"setuptools_scm[toml] >= 7.0.5" # required for "no-local-version" scheme
6+
]
7+
8+
[project]
9+
description = "..."
10+
dynamic = ["version", "dependencies", "optional-dependencies"]
11+
name = "team-devtools"
12+
readme = "README.md"
13+
# https://peps.python.org/pep-0621/#readme
14+
requires-python = ">=3.10"
15+
# Keep this default because xml/report do not know to use load it from config file:
16+
# data_file = ".coverage"
17+
[tool.coverage.paths]
18+
source = ["src", "test", ".tox/*/site-packages"]
19+
20+
[tool.coverage.report]
21+
exclude_also = ["pragma: no cover", "if TYPE_CHECKING:"]
22+
# Increase it just so it would pass on any single-python run
23+
fail_under = 100
24+
omit = ["test/*"]
25+
show_missing = true
26+
skip_covered = true
27+
skip_empty = true
28+
29+
[tool.coverage.run]
30+
concurrency = ["multiprocessing", "thread"]
31+
# Do not use branch until bug is fixes:
32+
# https://github.com/nedbat/coveragepy/issues/605
33+
# branch = true
34+
parallel = true
35+
source = ["src"]
36+
[tool.pytest.ini_options]
37+
addopts = "-p no:pytest_cov --durations=10 --failed-first"
38+
norecursedirs = [
39+
"*.egg",
40+
".cache",
41+
".config",
42+
".eggs",
43+
".git",
44+
".github",
45+
".mypy_cache",
46+
".projects",
47+
".eggs",
48+
".tox",
49+
"__pycache__",
50+
"build",
51+
"collections",
52+
"dist",
53+
"docs",
54+
"site",
55+
"src/*.egg-info"
56+
]
57+
58+
[tool.setuptools.dynamic]
59+
dependencies = {file = [".config/requirements.in"]}
60+
optional-dependencies.docs = {file = [".config/requirements-docs.in"]}
61+
optional-dependencies.test = {file = [".config/requirements-test.in"]}
62+
[tool.setuptools_scm]
63+
# To prevent accidental pick of mobile version tags such 'v6'
64+
git_describe_command = [
65+
"git",
66+
"describe",
67+
"--dirty",
68+
"--long",
69+
"--tags",
70+
"--match",
71+
"v*.*"
72+
]
73+
local_scheme = "no-local-version"
74+
tag_regex = "^(?P<prefix>v)?(?P<version>[0-9.]+)(?P<suffix>.*)?$"
75+
write_to = "src/team_devtools/_version.py"
76+
77+
[tool.tomlsort]
78+
in_place = true
79+
sort_inline_tables = true
80+
sort_table_keys = true
81+
82+
[tool.uv.pip]
83+
annotation-style = "line"
84+
custom-compile-command = "tox run deps"
85+
no-emit-package = ["ansible-core", "pip", "resolvelib", "typing_extensions", "uv"]

readthedocs.yml

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

requirements.in

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

0 commit comments

Comments
 (0)