# SPDX-FileCopyrightText: Peter Pentchev # SPDX-License-Identifier: BSD-2-Clause [build-system] requires = [ "hatchling >= 1.26, < 2", ] build-backend = "hatchling.build" [project] name = "pwc-312" description = "Peter Pentchev's solutions to Perl Weekly Challenge 312" license = "BSD-2-Clause" license-files = ["LICENSES/BSD-2-Clause.txt"] requires-python = ">= 3.11" dynamic = ["version"] classifiers = [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.14", "Topic :: Software Development :: Libraries", "Topic :: Software Development :: Libraries :: Python Modules", "Typing :: Typed", ] [[project.authors]] name = "Peter Pentchev" email = "roam@ringlet.net" [project.urls] Homepage = "https://git@github.com/ppentchev/perlweeklychallenge-club" [dependency-groups] testenv-mypy = [ {include-group = "testenv-unit-tests"}, "mypy >= 1, < 2", ] testenv-pyupgrade = [ "pyupgrade >= 3, < 4", ] testenv-ruff = [ "ruff == 0.9.10", ] testenv-reuse = [ "reuse >= 5, < 6", # Transitive; needed for `uv sync --resolution lowest` "six >= 1.4, < 2", ] testenv-unit-tests = [ "pygments >= 2.7, < 3", "pytest >= 8, < 9", ] testenv-uvoxen = [ "uvoxen >= 0.1, < 0.2", ] [tool.hatch.build.targets.wheel] packages = ["src/pwc_312"] [tool.hatch.version] path = "src/pwc_312/defs.py" pattern = '(?x) ^ VERSION \s* (?: : \s* Final \s* )? = \s* " (?P [^\s"]+ ) " \s* $' [tool.mypy] strict = true [tool.ruff] extend = "ruff-base.toml" output-format = "concise" preview = true [tool.ruff.lint] select = ["ALL"] [tool.test-stages] stages = [ "@check and @quick and not @manual", "@check and not @manual", "@tests and not @manual", ] [tool.uvoxen] envlist = [ "ruff", "format", "reuse", "mypy", "uvoxen-sync-check", "unit-tests", ] [tool.uvoxen.format.version] major = 0 minor = 1 [tool.uvoxen.defs] pyfiles = [ "src/pwc_312", "tests/unit", ] [tool.uvoxen.tox] header = """ # SPDX-FileCopyrightText: Peter Pentchev # SPDX-License-Identifier: BSD-2-Clause # Automatically generated by `uvoxen tox generate` """ [tool.uvoxen.env.ruff] tags = [ "check", "ruff", "quick", ] dependency-groups = [ "testenv-ruff", ] commands = [ "ruff check -- {[defs]pyfiles}", ] [tool.uvoxen.env.format] tags = [ "check", "quick", ] dependency-groups = [ "testenv-ruff", ] commands = [ "ruff check --config ruff-base.toml --select=D,I --diff -- {[defs]pyfiles}", "ruff format --check --config ruff-base.toml --diff -- {[defs]pyfiles}", ] [tool.uvoxen.env.reformat] tags = [ "format", "manual", ] dependency-groups = [ "testenv-ruff", ] commands = [ "ruff check --config ruff-base.toml --select=D,I --fix -- {[defs]pyfiles}", "ruff format --config ruff-base.toml -- {[defs]pyfiles}", ] [tool.uvoxen.env.mypy] tags = [ "check", ] dependency-groups = [ "testenv-mypy", ] install-dependencies = true commands = [ "mypy {[defs]pyfiles}", ] [tool.uvoxen.env.reuse] tags = [ "check", "quick", ] dependency-groups = [ "testenv-reuse", ] commands = [ "reuse --root . lint", ] [tool.uvoxen.env.uvoxen-sync-check] tags = [ "check", "quick", ] dependency-groups = [ "testenv-uvoxen", ] commands = [ "uvoxen tox generate --check", ] [tool.uvoxen.env.unit-tests] tags = [ "tests", ] dependency-groups = [ "testenv-unit-tests", ] install-project = true commands = [ "pytest {posargs} tests/unit", ] [tool.uvoxen.env.pyupgrade] tags = [ "check", "manual", ] dependency-groups = [ "testenv-pyupgrade", ] allowlist-externals = [ "sh", ] commands = [ "sh -c 'pyupgrade --py312-plus src/pwc_312/*.py tests/unit/*.py'", ]