Skip to content

Commit f3e4e30

Browse files
committed
build(packaging): tidy pytest/pyproject/MANIFEST, relocate issue template
Coverage flags: - pytest.ini: move all --cov* flags out of addopts into the tox [testenv] commands so a bare `pytest -k foo` runs without coverage instrumentation. CI still enforces the 100% gate through tox (verified: the full suite reaches 100.00% and the gate fires via the explicit-cov command; no workflow consumes coverage.xml directly). python_files: - pytest.ini: restrict python_files to tests/*.py (drop progressbar/*.py). Verified --doctest-modules still collects the same 13 progressbar doctests and total collection is unchanged (586 items). - Removing progressbar modules from test-module collection also stops pytests assertion-rewrite temporaries (@py_assert1/@py_assert2) from leaking into progressbar.utils namespace, which had been captured in the API-surface snapshot. Drop those two bogus entries from tests/api_surface_snapshot.json; they were never real public API. Dependencies / build: - pyproject.toml: drop unused tests extras: flake8 (linting is ruff now), pytest-mypy (mypy is local-only), and sphinx (already provided by the docs extra; nothing under tests/ imports it). - pyproject.toml: KEEP setuptools-scm in build-system.requires. The audit flagged it as unused, but an sdist-parity check proved it provides the git file-finder that ships docs/, tests/ data, tox.ini and .github/; dropping it shrinks the sdist 152 -> 90 files and omits the test harness. Added a comment so it is not removed again. MANIFEST.in: - Drop includes for nonexistent files (AUTHORS.rst, requirements.txt, Makefile) and the malformed `recursive-exclude *.html`. The sdist file list is identical before/after this edit. Issue template: - git mv ISSUE_TEMPLATE -> .github/ISSUE_TEMPLATE.md (canonical GitHub location for the default issue template).
1 parent 2523a93 commit f3e4e30

6 files changed

Lines changed: 11 additions & 17 deletions

File tree

File renamed without changes.

‎MANIFEST.in‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
recursive-exclude *.pyc
22
recursive-exclude *.pyo
3-
recursive-exclude *.html
4-
include AUTHORS.rst
53
include CHANGES.rst
64
include CONTRIBUTING.rst
75
include LICENSE
86
include README.rst
97
include examples.py
10-
include requirements.txt
11-
include Makefile
128
include pytest.ini

‎pyproject.toml‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
[build-system]
22
build-backend = 'setuptools.build_meta'
3+
# setuptools-scm is required at build time: its setuptools file-finder
4+
# entry point is what populates the sdist with the full set of
5+
# git-tracked files (docs/, tests/ data, tox.ini, .github/, ...).
6+
# Dropping it silently shrinks the sdist and omits the test harness, so
7+
# it must stay even though the version itself is static (see
8+
# tool.setuptools.dynamic below).
39
requires = ['setuptools', 'setuptools-scm']
410

511
[project]
@@ -124,12 +130,9 @@ docs = [
124130
]
125131
tests = [
126132
'dill>=0.3.6',
127-
'flake8>=3.7.7',
128133
'freezegun>=0.3.11',
129134
'pytest-cov>=2.6.1',
130-
'pytest-mypy',
131135
'pytest>=4.6.9',
132-
'sphinx>=1.8.5',
133136
'pywin32; sys_platform == "win32"',
134137
]
135138

‎pytest.ini‎

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
[pytest]
22
python_files =
3-
progressbar/*.py
43
tests/*.py
54

5+
# Coverage flags intentionally live in the tox [testenv] commands, not
6+
# here, so a bare `pytest -k foo` stays fast. CI enforces the 100% gate
7+
# via tox. `--doctest-modules` still collects progressbar/*.py doctests
8+
# regardless of `python_files` (which only scopes test-module collection).
69
addopts =
7-
--cov progressbar
8-
--cov-report=html
9-
--cov-report=term-missing
10-
--cov-report=xml
11-
--cov-config=./pyproject.toml
12-
--no-cov-on-fail
1310
--doctest-modules
1411

1512
norecursedirs =

‎tests/api_surface_snapshot.json‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -456,8 +456,6 @@
456456
"annotations": "_Feature"
457457
},
458458
"progressbar.utils": {
459-
"@py_assert1": "NoneType",
460-
"@py_assert2": "NoneType",
461459
"AttributeDict": "classsignature-unavailable",
462460
"Iterable": "re-export",
463461
"Iterator": "re-export",

‎tox.ini‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ deps =
1919
pyright
2020
commands =
2121
pyright
22-
py.test --basetemp="{envtmpdir}" --confcutdir=.. {posargs}
22+
py.test --cov progressbar --cov-report=html --cov-report=term-missing --cov-report=xml --cov-config=./pyproject.toml --no-cov-on-fail --basetemp="{envtmpdir}" --confcutdir=.. {posargs}
2323
skip_install = true
2424

2525
[testenv:mypy]

0 commit comments

Comments
 (0)