Skip to content

Commit d80b616

Browse files
authored
Migrate setuptools to use pyproject.toml (#585)
1 parent 37bdfd2 commit d80b616

File tree

10 files changed

+76
-86
lines changed

10 files changed

+76
-86
lines changed

.pre-commit-config.yaml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,6 @@ repos:
1717
rev: 1.2.0
1818
hooks:
1919
- id: pyproject-fmt
20-
- repo: https://github.com/asottile/setup-cfg-fmt
21-
rev: v2.5.0
22-
hooks:
23-
- id: setup-cfg-fmt
24-
args:
25-
- --include-version-classifiers
26-
- --max-py-version
27-
- '3.12'
2820
- repo: https://github.com/tox-dev/tox-ini-fmt
2921
rev: 1.3.1
3022
hooks:
@@ -68,7 +60,6 @@ repos:
6860
- flake8-bugbear
6961
- flake8-comprehensions
7062
- flake8-tidy-imports
71-
- flake8-typing-imports
7263
- repo: https://github.com/pre-commit/mirrors-mypy
7364
rev: v1.6.1
7465
hooks:

pyproject.toml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,46 @@ requires = [
44
"setuptools",
55
]
66

7+
[project]
8+
name = "pytest-randomly"
9+
version = "3.15.0"
10+
description = "Pytest plugin to randomly order tests and control random.seed."
11+
readme = {file = "README.rst", content-type = "text/x-rst"}
12+
keywords = [
13+
"pytest",
14+
"random",
15+
"randomise",
16+
"randomize",
17+
"randomly",
18+
]
19+
license = {text = "MIT"}
20+
authors = [{name = "Adam Johnson", email = "[email protected]"}]
21+
requires-python = ">=3.8"
22+
classifiers = [
23+
"Development Status :: 5 - Production/Stable",
24+
"Framework :: Pytest",
25+
"Intended Audience :: Developers",
26+
"License :: OSI Approved :: MIT License",
27+
"Natural Language :: English",
28+
"Programming Language :: Python :: 3 :: Only",
29+
"Programming Language :: Python :: 3.8",
30+
"Programming Language :: Python :: 3.9",
31+
"Programming Language :: Python :: 3.10",
32+
"Programming Language :: Python :: 3.11",
33+
"Programming Language :: Python :: 3.12",
34+
"Typing :: Typed",
35+
]
36+
dependencies = [
37+
'importlib-metadata>=3.6; python_version < "3.10"',
38+
"pytest",
39+
]
40+
[project.urls]
41+
Changelog = "https://github.com/pytest-dev/pytest-randomly/blob/main/CHANGELOG.rst"
42+
Funding = "https://adamj.eu/books/"
43+
Repository = "https://github.com/pytest-dev/pytest-randomly"
44+
[project.entry-points.pytest11]
45+
randomly = "pytest_randomly"
46+
747
[tool.black]
848
target-version = ['py38']
949

@@ -13,6 +53,23 @@ addopts = """\
1353
--strict-markers
1454
"""
1555

56+
[tool.coverage.run]
57+
branch = true
58+
parallel = true
59+
source = [
60+
"pytest_randomly",
61+
"tests",
62+
]
63+
64+
[tool.coverage.paths]
65+
source = [
66+
"src",
67+
".tox/**/site-packages",
68+
]
69+
70+
[tool.coverage.report]
71+
show_missing = true
72+
1673
[tool.mypy]
1774
mypy_path = "src/"
1875
namespace_packages = false

requirements/py310.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ asgiref==3.7.2 \
88
--hash=sha256:89b2ef2247e3b562a16eef663bc0e2e703ec6468e2fa8a5cd61cd449786d4f6e \
99
--hash=sha256:9e0ce3aa93a819ba5b45120216b23878cf6e8525eb3848653452b4192b92afed
1010
# via django
11-
coverage==7.3.2 \
11+
coverage[toml]==7.3.2 \
1212
--hash=sha256:0cbf38419fb1a347aaf63481c00f0bdc86889d9fbf3f25109cf96c26b403fda1 \
1313
--hash=sha256:12d15ab5833a997716d76f2ac1e4b4d536814fc213c85ca72756c19e5a6b3d63 \
1414
--hash=sha256:149de1d2401ae4655c436a3dced6dd153f4c3309f599c3d4bd97ab172eaf02d9 \
@@ -159,7 +159,9 @@ sqlparse==0.4.4 \
159159
tomli==2.0.1 \
160160
--hash=sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc \
161161
--hash=sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f
162-
# via pytest
162+
# via
163+
# coverage
164+
# pytest
163165
typing-extensions==4.8.0 \
164166
--hash=sha256:8f92fc8806f9a6b641eaa5318da32b44d401efaac0f6678c9bc448ba3605faa0 \
165167
--hash=sha256:df8e4339e9cb77357558cbdbceca33c303714cf861d1eef15e1070055ae8b7ef

requirements/py311.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ asgiref==3.7.2 \
88
--hash=sha256:89b2ef2247e3b562a16eef663bc0e2e703ec6468e2fa8a5cd61cd449786d4f6e \
99
--hash=sha256:9e0ce3aa93a819ba5b45120216b23878cf6e8525eb3848653452b4192b92afed
1010
# via django
11-
coverage==7.3.2 \
11+
coverage[toml]==7.3.2 \
1212
--hash=sha256:0cbf38419fb1a347aaf63481c00f0bdc86889d9fbf3f25109cf96c26b403fda1 \
1313
--hash=sha256:12d15ab5833a997716d76f2ac1e4b4d536814fc213c85ca72756c19e5a6b3d63 \
1414
--hash=sha256:149de1d2401ae4655c436a3dced6dd153f4c3309f599c3d4bd97ab172eaf02d9 \

requirements/py312.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ asgiref==3.7.2 \
88
--hash=sha256:89b2ef2247e3b562a16eef663bc0e2e703ec6468e2fa8a5cd61cd449786d4f6e \
99
--hash=sha256:9e0ce3aa93a819ba5b45120216b23878cf6e8525eb3848653452b4192b92afed
1010
# via django
11-
coverage==7.3.2 \
11+
coverage[toml]==7.3.2 \
1212
--hash=sha256:0cbf38419fb1a347aaf63481c00f0bdc86889d9fbf3f25109cf96c26b403fda1 \
1313
--hash=sha256:12d15ab5833a997716d76f2ac1e4b4d536814fc213c85ca72756c19e5a6b3d63 \
1414
--hash=sha256:149de1d2401ae4655c436a3dced6dd153f4c3309f599c3d4bd97ab172eaf02d9 \

requirements/py38.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ backports-zoneinfo==0.2.1 \
2626
--hash=sha256:f04e857b59d9d1ccc39ce2da1021d196e47234873820cbeaad210724b1ee28ac \
2727
--hash=sha256:fadbfe37f74051d024037f223b8e001611eac868b5c5b06144ef4d8b799862f2
2828
# via django
29-
coverage==7.3.2 \
29+
coverage[toml]==7.3.2 \
3030
--hash=sha256:0cbf38419fb1a347aaf63481c00f0bdc86889d9fbf3f25109cf96c26b403fda1 \
3131
--hash=sha256:12d15ab5833a997716d76f2ac1e4b4d536814fc213c85ca72756c19e5a6b3d63 \
3232
--hash=sha256:149de1d2401ae4655c436a3dced6dd153f4c3309f599c3d4bd97ab172eaf02d9 \
@@ -177,7 +177,9 @@ sqlparse==0.4.4 \
177177
tomli==2.0.1 \
178178
--hash=sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc \
179179
--hash=sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f
180-
# via pytest
180+
# via
181+
# coverage
182+
# pytest
181183
typing-extensions==4.8.0 \
182184
--hash=sha256:8f92fc8806f9a6b641eaa5318da32b44d401efaac0f6678c9bc448ba3605faa0 \
183185
--hash=sha256:df8e4339e9cb77357558cbdbceca33c303714cf861d1eef15e1070055ae8b7ef

requirements/py39.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ asgiref==3.7.2 \
88
--hash=sha256:89b2ef2247e3b562a16eef663bc0e2e703ec6468e2fa8a5cd61cd449786d4f6e \
99
--hash=sha256:9e0ce3aa93a819ba5b45120216b23878cf6e8525eb3848653452b4192b92afed
1010
# via django
11-
coverage==7.3.2 \
11+
coverage[toml]==7.3.2 \
1212
--hash=sha256:0cbf38419fb1a347aaf63481c00f0bdc86889d9fbf3f25109cf96c26b403fda1 \
1313
--hash=sha256:12d15ab5833a997716d76f2ac1e4b4d536814fc213c85ca72756c19e5a6b3d63 \
1414
--hash=sha256:149de1d2401ae4655c436a3dced6dd153f4c3309f599c3d4bd97ab172eaf02d9 \
@@ -163,7 +163,9 @@ sqlparse==0.4.4 \
163163
tomli==2.0.1 \
164164
--hash=sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc \
165165
--hash=sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f
166-
# via pytest
166+
# via
167+
# coverage
168+
# pytest
167169
typing-extensions==4.8.0 \
168170
--hash=sha256:8f92fc8806f9a6b641eaa5318da32b44d401efaac0f6678c9bc448ba3605faa0 \
169171
--hash=sha256:df8e4339e9cb77357558cbdbceca33c303714cf861d1eef15e1070055ae8b7ef

requirements/requirements.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
coverage
1+
coverage[toml]
22
factory_boy
33
faker
44
importlib-metadata >= 3.6.0 ; python_version < "3.10"

setup.cfg

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

tox.ini

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,7 @@ commands =
1919
-W ignore:'datetime.datetime.utcfromtimestamp() is deprecated':DeprecationWarning \
2020
-m coverage run \
2121
-m pytest -p no:randomly {posargs:tests}
22+
23+
[flake8]
24+
max-line-length = 88
25+
extend-ignore = E203

0 commit comments

Comments
 (0)