Skip to content

Commit

Permalink
Merge pull request #251 from Borda/refactor/pyptoject.toml
Browse files Browse the repository at this point in the history
refactor: migrate `setup.cfg` to `pyproject.toml`
  • Loading branch information
hugovk authored Feb 23, 2024
2 parents e1f4252 + da8dcda commit 3b9ad82
Show file tree
Hide file tree
Showing 8 changed files with 67 additions and 54 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,4 @@ jobs:
python -m pip install -e .
- name: Tests
run: pytest
run: pytest tests/
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
*.pyc
pytest_rerunfailures.egg-info/
*.egg-info
.DS_Store
.Python
.cache/
Expand All @@ -8,7 +8,7 @@ pytest_rerunfailures.egg-info/
.python-version
.tox*
bin/
build/*
build/
dist/
include/
lib/
Expand Down
9 changes: 9 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,12 @@ repos:
hooks:
- id: sphinx-lint
args: [--enable=default-role]
- repo: https://github.com/tox-dev/pyproject-fmt
rev: 1.7.0
hooks:
- id: pyproject-fmt
additional_dependencies: [ tox ]
- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.16
hooks:
- id: validate-pyproject
58 changes: 54 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,62 @@
[build-system]
build-backend = "setuptools.build_meta"
requires = [
"setuptools >= 40.0",
"setuptools>=40",
]
build-backend = "setuptools.build_meta"

[tool.check-manifest]
ignore = [".pre-commit-config.yaml"]

[project]
name = "pytest-rerunfailures"
version = "13.1.dev0"
description = "pytest plugin to re-run tests to eliminate flaky failures"
dynamic = [
"readme",
]
keywords = [
"failures",
"flaky",
"pytest",
"pytest",
"rerun",
]
license = {text = "Mozilla Public License 2.0 (MPL 2.0)"}
authors = [{name = "Leah Klearman", email = "[email protected]"}]
requires-python = ">=3.8"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Framework :: Pytest",
"Intended Audience :: Developers",
"License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"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",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Software Development :: Quality Assurance",
"Topic :: Software Development :: Testing",
"Topic :: Utilities",
]
dependencies = [
"packaging>=17.1",
"pytest>=7",
]
urls = {Homepage = "https://github.com/pytest-dev/pytest-rerunfailures"}

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

[project.entry-points.pytest11]
rerunfailures = "pytest_rerunfailures"
[tool.ruff]
fix = true
# todo: drop when migrated project metadata from setup.cfg
target-version = "py38"
lint.select = [
"E", # https://pypi.org/project/pyflakes/
"W", # https://pypi.org/project/pycodestyle/
Expand All @@ -19,6 +66,9 @@ lint.select = [
"UP", # https://pypi.org/project/upgrade-checker/
]

[tool.ruff.lint.isort]
known-first-party = ["pytest_rerunfailures"]

[tool.ruff.lint.per-file-ignores]
"test_*.py" = ["S101", "S311"]

Expand Down
46 changes: 0 additions & 46 deletions setup.cfg

This file was deleted.

File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ envlist =
minversion = 4.0

[testenv]
commands = pytest test_pytest_rerunfailures.py {posargs}
commands = pytest tests/ {posargs}
deps =
pytest-xdist
pytest70: pytest==7.0.*
Expand Down

0 comments on commit 3b9ad82

Please sign in to comment.