Skip to content

Commit

Permalink
Migrate setuptools to use pyproject.toml (#585)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamchainz committed Oct 26, 2023
1 parent 37bdfd2 commit d80b616
Show file tree
Hide file tree
Showing 10 changed files with 76 additions and 86 deletions.
9 changes: 0 additions & 9 deletions .pre-commit-config.yaml
Expand Up @@ -17,14 +17,6 @@ repos:
rev: 1.2.0
hooks:
- id: pyproject-fmt
- repo: https://github.com/asottile/setup-cfg-fmt
rev: v2.5.0
hooks:
- id: setup-cfg-fmt
args:
- --include-version-classifiers
- --max-py-version
- '3.12'
- repo: https://github.com/tox-dev/tox-ini-fmt
rev: 1.3.1
hooks:
Expand Down Expand Up @@ -68,7 +60,6 @@ repos:
- flake8-bugbear
- flake8-comprehensions
- flake8-tidy-imports
- flake8-typing-imports
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.6.1
hooks:
Expand Down
57 changes: 57 additions & 0 deletions pyproject.toml
Expand Up @@ -4,6 +4,46 @@ requires = [
"setuptools",
]

[project]
name = "pytest-randomly"
version = "3.15.0"
description = "Pytest plugin to randomly order tests and control random.seed."
readme = {file = "README.rst", content-type = "text/x-rst"}
keywords = [
"pytest",
"random",
"randomise",
"randomize",
"randomly",
]
license = {text = "MIT"}
authors = [{name = "Adam Johnson", email = "me@adamj.eu"}]
requires-python = ">=3.8"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Framework :: Pytest",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Typing :: Typed",
]
dependencies = [
'importlib-metadata>=3.6; python_version < "3.10"',
"pytest",
]
[project.urls]
Changelog = "https://github.com/pytest-dev/pytest-randomly/blob/main/CHANGELOG.rst"
Funding = "https://adamj.eu/books/"
Repository = "https://github.com/pytest-dev/pytest-randomly"
[project.entry-points.pytest11]
randomly = "pytest_randomly"

[tool.black]
target-version = ['py38']

Expand All @@ -13,6 +53,23 @@ addopts = """\
--strict-markers
"""

[tool.coverage.run]
branch = true
parallel = true
source = [
"pytest_randomly",
"tests",
]

[tool.coverage.paths]
source = [
"src",
".tox/**/site-packages",
]

[tool.coverage.report]
show_missing = true

[tool.mypy]
mypy_path = "src/"
namespace_packages = false
Expand Down
6 changes: 4 additions & 2 deletions requirements/py310.txt
Expand Up @@ -8,7 +8,7 @@ asgiref==3.7.2 \
--hash=sha256:89b2ef2247e3b562a16eef663bc0e2e703ec6468e2fa8a5cd61cd449786d4f6e \
--hash=sha256:9e0ce3aa93a819ba5b45120216b23878cf6e8525eb3848653452b4192b92afed
# via django
coverage==7.3.2 \
coverage[toml]==7.3.2 \
--hash=sha256:0cbf38419fb1a347aaf63481c00f0bdc86889d9fbf3f25109cf96c26b403fda1 \
--hash=sha256:12d15ab5833a997716d76f2ac1e4b4d536814fc213c85ca72756c19e5a6b3d63 \
--hash=sha256:149de1d2401ae4655c436a3dced6dd153f4c3309f599c3d4bd97ab172eaf02d9 \
Expand Down Expand Up @@ -159,7 +159,9 @@ sqlparse==0.4.4 \
tomli==2.0.1 \
--hash=sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc \
--hash=sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f
# via pytest
# via
# coverage
# pytest
typing-extensions==4.8.0 \
--hash=sha256:8f92fc8806f9a6b641eaa5318da32b44d401efaac0f6678c9bc448ba3605faa0 \
--hash=sha256:df8e4339e9cb77357558cbdbceca33c303714cf861d1eef15e1070055ae8b7ef
Expand Down
2 changes: 1 addition & 1 deletion requirements/py311.txt
Expand Up @@ -8,7 +8,7 @@ asgiref==3.7.2 \
--hash=sha256:89b2ef2247e3b562a16eef663bc0e2e703ec6468e2fa8a5cd61cd449786d4f6e \
--hash=sha256:9e0ce3aa93a819ba5b45120216b23878cf6e8525eb3848653452b4192b92afed
# via django
coverage==7.3.2 \
coverage[toml]==7.3.2 \
--hash=sha256:0cbf38419fb1a347aaf63481c00f0bdc86889d9fbf3f25109cf96c26b403fda1 \
--hash=sha256:12d15ab5833a997716d76f2ac1e4b4d536814fc213c85ca72756c19e5a6b3d63 \
--hash=sha256:149de1d2401ae4655c436a3dced6dd153f4c3309f599c3d4bd97ab172eaf02d9 \
Expand Down
2 changes: 1 addition & 1 deletion requirements/py312.txt
Expand Up @@ -8,7 +8,7 @@ asgiref==3.7.2 \
--hash=sha256:89b2ef2247e3b562a16eef663bc0e2e703ec6468e2fa8a5cd61cd449786d4f6e \
--hash=sha256:9e0ce3aa93a819ba5b45120216b23878cf6e8525eb3848653452b4192b92afed
# via django
coverage==7.3.2 \
coverage[toml]==7.3.2 \
--hash=sha256:0cbf38419fb1a347aaf63481c00f0bdc86889d9fbf3f25109cf96c26b403fda1 \
--hash=sha256:12d15ab5833a997716d76f2ac1e4b4d536814fc213c85ca72756c19e5a6b3d63 \
--hash=sha256:149de1d2401ae4655c436a3dced6dd153f4c3309f599c3d4bd97ab172eaf02d9 \
Expand Down
6 changes: 4 additions & 2 deletions requirements/py38.txt
Expand Up @@ -26,7 +26,7 @@ backports-zoneinfo==0.2.1 \
--hash=sha256:f04e857b59d9d1ccc39ce2da1021d196e47234873820cbeaad210724b1ee28ac \
--hash=sha256:fadbfe37f74051d024037f223b8e001611eac868b5c5b06144ef4d8b799862f2
# via django
coverage==7.3.2 \
coverage[toml]==7.3.2 \
--hash=sha256:0cbf38419fb1a347aaf63481c00f0bdc86889d9fbf3f25109cf96c26b403fda1 \
--hash=sha256:12d15ab5833a997716d76f2ac1e4b4d536814fc213c85ca72756c19e5a6b3d63 \
--hash=sha256:149de1d2401ae4655c436a3dced6dd153f4c3309f599c3d4bd97ab172eaf02d9 \
Expand Down Expand Up @@ -177,7 +177,9 @@ sqlparse==0.4.4 \
tomli==2.0.1 \
--hash=sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc \
--hash=sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f
# via pytest
# via
# coverage
# pytest
typing-extensions==4.8.0 \
--hash=sha256:8f92fc8806f9a6b641eaa5318da32b44d401efaac0f6678c9bc448ba3605faa0 \
--hash=sha256:df8e4339e9cb77357558cbdbceca33c303714cf861d1eef15e1070055ae8b7ef
Expand Down
6 changes: 4 additions & 2 deletions requirements/py39.txt
Expand Up @@ -8,7 +8,7 @@ asgiref==3.7.2 \
--hash=sha256:89b2ef2247e3b562a16eef663bc0e2e703ec6468e2fa8a5cd61cd449786d4f6e \
--hash=sha256:9e0ce3aa93a819ba5b45120216b23878cf6e8525eb3848653452b4192b92afed
# via django
coverage==7.3.2 \
coverage[toml]==7.3.2 \
--hash=sha256:0cbf38419fb1a347aaf63481c00f0bdc86889d9fbf3f25109cf96c26b403fda1 \
--hash=sha256:12d15ab5833a997716d76f2ac1e4b4d536814fc213c85ca72756c19e5a6b3d63 \
--hash=sha256:149de1d2401ae4655c436a3dced6dd153f4c3309f599c3d4bd97ab172eaf02d9 \
Expand Down Expand Up @@ -163,7 +163,9 @@ sqlparse==0.4.4 \
tomli==2.0.1 \
--hash=sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc \
--hash=sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f
# via pytest
# via
# coverage
# pytest
typing-extensions==4.8.0 \
--hash=sha256:8f92fc8806f9a6b641eaa5318da32b44d401efaac0f6678c9bc448ba3605faa0 \
--hash=sha256:df8e4339e9cb77357558cbdbceca33c303714cf861d1eef15e1070055ae8b7ef
Expand Down
2 changes: 1 addition & 1 deletion requirements/requirements.in
@@ -1,4 +1,4 @@
coverage
coverage[toml]
factory_boy
faker
importlib-metadata >= 3.6.0 ; python_version < "3.10"
Expand Down
68 changes: 0 additions & 68 deletions setup.cfg

This file was deleted.

4 changes: 4 additions & 0 deletions tox.ini
Expand Up @@ -19,3 +19,7 @@ commands =
-W ignore:'datetime.datetime.utcfromtimestamp() is deprecated':DeprecationWarning \
-m coverage run \
-m pytest -p no:randomly {posargs:tests}

[flake8]
max-line-length = 88
extend-ignore = E203

0 comments on commit d80b616

Please sign in to comment.