diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 81579cb..ef3b2be 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,5 +1,15 @@ version: 2 updates: + - package-ecosystem: pip + directory: / + schedule: + interval: weekly + commit-message: + prefix: "[python]" + labels: + - dependencies + - d:python + - package-ecosystem: github-actions directory: / schedule: diff --git a/.gitignore b/.gitignore index 9eaf843..350c421 100644 --- a/.gitignore +++ b/.gitignore @@ -1,16 +1,7 @@ -*.egg -*.egg-info/ -*.pyc -.cache/ .coverage* -.eggs/ .mypy_cache/ .nox/ -.pytest_cache/ .tox/ __pycache__/ -build/ dist/ -docs/.doctrees/ docs/_build/ -venv/ diff --git a/CHANGELOG.md b/CHANGELOG.md index 88d36f5..e566fe2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ v0.5.0 (in development) ----------------------- +- Migrated from setuptools to hatch v0.4.0 (2023-10-21) ------------------- diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index 7a2cb7d..0000000 --- a/MANIFEST.in +++ /dev/null @@ -1,6 +0,0 @@ -include CHANGELOG.* CONTRIBUTORS.* LICENSE tox.ini -graft src -graft docs -prune docs/_build -graft test -global-exclude *.py[cod] diff --git a/pyproject.toml b/pyproject.toml index b3491a3..c07b698 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,66 @@ [build-system] -requires = ["setuptools >= 46.4.0"] -build-backend = "setuptools.build_meta" +requires = ["hatchling"] +build-backend = "hatchling.build" + +[project] +name = "pytest-fail-slow" +dynamic = ["version"] +description = "Fail tests that take too long to run" +readme = "README.rst" +requires-python = ">=3.7" +license = "MIT" +license-files = { paths = ["LICENSE"] } +authors = [ + { name = "John Thorvald Wodder II", email = "pytest-fail-slow@varonathe.org" } +] + +keywords = [ + "pytest", + "slow tests", + "timeout", +] + +classifiers = [ + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "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", + "License :: OSI Approved :: MIT License", + "Environment :: Plugins", + "Framework :: Pytest", + "Intended Audience :: Developers", + "Topic :: Software Development :: Testing", +] + +dependencies = [ + "pytest >= 6.0", +] + +[project.entry-points."pytest11"] +fail-slow = "pytest_fail_slow" + +[project.urls] +"Source Code" = "https://github.com/jwodder/pytest-fail-slow" +"Bug Tracker" = "https://github.com/jwodder/pytest-fail-slow/issues" + +[tool.hatch.version] +path = "pytest_fail_slow.py" + +[tool.hatch.build.targets.sdist] +include = [ + "/docs", + "/pytest_fail_slow.py", + "/test", + "CHANGELOG.*", + "CONTRIBUTORS.*", + "tox.ini", +] + +[tool.hatch.envs.default] +python = "3" diff --git a/src/pytest_fail_slow.py b/pytest_fail_slow.py similarity index 100% rename from src/pytest_fail_slow.py rename to pytest_fail_slow.py diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 7a5afa6..0000000 --- a/setup.cfg +++ /dev/null @@ -1,50 +0,0 @@ -[metadata] -name = pytest-fail-slow -version = attr:pytest_fail_slow.__version__ -description = Fail tests that take too long to run -long_description = file:README.rst -long_description_content_type = text/x-rst -author = John Thorvald Wodder II -author_email = pytest-fail-slow@varonathe.org -license = MIT -license_files = LICENSE -url = https://github.com/jwodder/pytest-fail-slow - -keywords = - pytest - slow tests - timeout - -classifiers = - Programming Language :: Python :: 3 :: Only - Programming Language :: Python :: 3 - Programming Language :: Python :: 3.7 - 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 - License :: OSI Approved :: MIT License - Environment :: Plugins - Framework :: Pytest - Intended Audience :: Developers - Topic :: Software Development :: Testing - -project_urls = - Source Code = https://github.com/jwodder/pytest-fail-slow - Bug Tracker = https://github.com/jwodder/pytest-fail-slow/issues - -[options] -py_modules = pytest_fail_slow -package_dir = - =src -include_package_data = True -python_requires = >=3.7 -install_requires = - pytest >= 6.0 - -[options.entry_points] -pytest11 = - fail-slow = pytest_fail_slow diff --git a/tox.ini b/tox.ini index b19adff..72ec248 100644 --- a/tox.ini +++ b/tox.ini @@ -25,7 +25,7 @@ deps = flake8-builtins flake8-unused-arguments commands = - flake8 src test + flake8 pytest_fail_slow.py test [pytest] filterwarnings = @@ -41,8 +41,8 @@ source = pytest_fail_slow [coverage:paths] source = - src - .tox/**/site-packages + pytest_fail_slow.py + .tox/**/site-packages/pytest_fail_slow.py [coverage:report] precision = 2 @@ -69,4 +69,3 @@ lines_between_sections = 0 profile = black reverse_relative = True sort_relative_in_force_sorted_sections = True -src_paths = src