Skip to content

Commit 3b9ad82

Browse files
authored
Merge pull request #251 from Borda/refactor/pyptoject.toml
refactor: migrate `setup.cfg` to `pyproject.toml`
2 parents e1f4252 + da8dcda commit 3b9ad82

File tree

8 files changed

+67
-54
lines changed

8 files changed

+67
-54
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,4 +97,4 @@ jobs:
9797
python -m pip install -e .
9898
9999
- name: Tests
100-
run: pytest
100+
run: pytest tests/

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
*.pyc
2-
pytest_rerunfailures.egg-info/
2+
*.egg-info
33
.DS_Store
44
.Python
55
.cache/
@@ -8,7 +8,7 @@ pytest_rerunfailures.egg-info/
88
.python-version
99
.tox*
1010
bin/
11-
build/*
11+
build/
1212
dist/
1313
include/
1414
lib/

.pre-commit-config.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,12 @@ repos:
2222
hooks:
2323
- id: sphinx-lint
2424
args: [--enable=default-role]
25+
- repo: https://github.com/tox-dev/pyproject-fmt
26+
rev: 1.7.0
27+
hooks:
28+
- id: pyproject-fmt
29+
additional_dependencies: [ tox ]
30+
- repo: https://github.com/abravalheri/validate-pyproject
31+
rev: v0.16
32+
hooks:
33+
- id: validate-pyproject

pyproject.toml

Lines changed: 54 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,62 @@
11
[build-system]
2+
build-backend = "setuptools.build_meta"
23
requires = [
3-
"setuptools >= 40.0",
4+
"setuptools>=40",
45
]
5-
build-backend = "setuptools.build_meta"
66

7+
[tool.check-manifest]
8+
ignore = [".pre-commit-config.yaml"]
9+
10+
[project]
11+
name = "pytest-rerunfailures"
12+
version = "13.1.dev0"
13+
description = "pytest plugin to re-run tests to eliminate flaky failures"
14+
dynamic = [
15+
"readme",
16+
]
17+
keywords = [
18+
"failures",
19+
"flaky",
20+
"pytest",
21+
"pytest",
22+
"rerun",
23+
]
24+
license = {text = "Mozilla Public License 2.0 (MPL 2.0)"}
25+
authors = [{name = "Leah Klearman", email = "[email protected]"}]
26+
requires-python = ">=3.8"
27+
classifiers = [
28+
"Development Status :: 5 - Production/Stable",
29+
"Framework :: Pytest",
30+
"Intended Audience :: Developers",
31+
"License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)",
32+
"Operating System :: MacOS :: MacOS X",
33+
"Operating System :: Microsoft :: Windows",
34+
"Operating System :: POSIX",
35+
"Programming Language :: Python :: 3 :: Only",
36+
"Programming Language :: Python :: 3.8",
37+
"Programming Language :: Python :: 3.9",
38+
"Programming Language :: Python :: 3.10",
39+
"Programming Language :: Python :: 3.11",
40+
"Programming Language :: Python :: 3.12",
41+
"Programming Language :: Python :: Implementation :: CPython",
42+
"Programming Language :: Python :: Implementation :: PyPy",
43+
"Topic :: Software Development :: Quality Assurance",
44+
"Topic :: Software Development :: Testing",
45+
"Topic :: Utilities",
46+
]
47+
dependencies = [
48+
"packaging>=17.1",
49+
"pytest>=7",
50+
]
51+
urls = {Homepage = "https://github.com/pytest-dev/pytest-rerunfailures"}
752

53+
[tool.setuptools.dynamic]
54+
readme = {file = ["HEADER.rst", "README.rst", "CHANGES.rst"]}
855

56+
[project.entry-points.pytest11]
57+
rerunfailures = "pytest_rerunfailures"
958
[tool.ruff]
1059
fix = true
11-
# todo: drop when migrated project metadata from setup.cfg
12-
target-version = "py38"
1360
lint.select = [
1461
"E", # https://pypi.org/project/pyflakes/
1562
"W", # https://pypi.org/project/pycodestyle/
@@ -19,6 +66,9 @@ lint.select = [
1966
"UP", # https://pypi.org/project/upgrade-checker/
2067
]
2168

69+
[tool.ruff.lint.isort]
70+
known-first-party = ["pytest_rerunfailures"]
71+
2272
[tool.ruff.lint.per-file-ignores]
2373
"test_*.py" = ["S101", "S311"]
2474

setup.cfg

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

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ envlist =
1515
minversion = 4.0
1616

1717
[testenv]
18-
commands = pytest test_pytest_rerunfailures.py {posargs}
18+
commands = pytest tests/ {posargs}
1919
deps =
2020
pytest-xdist
2121
pytest70: pytest==7.0.*

0 commit comments

Comments
 (0)