diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3242d29..7290b4b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,7 +23,7 @@ jobs: fail-fast: false matrix: os: ["ubuntu-latest"] - python-version: ["3.9", "3.12"] + python-version: ["3.9", "3.13"] env: OS: ${{ matrix.os }} diff --git a/.readthedocs.yml b/.readthedocs.yml index 7555657..cef98d4 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -15,3 +15,4 @@ python: sphinx: builder: html fail_on_warning: true + configuration: docs/conf.py diff --git a/pyproject.toml b/pyproject.toml index b104762..f30b8da 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,10 +5,6 @@ requires = [ "versioningit<4", ] -[tool.versioningit.vcs] -method = "git" -default-tag = "0.0.0" - [project] name = "linksmith" description = "A program for processing Hyperlinks, Sphinx references, and inventories." @@ -56,6 +52,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Programming Language :: Python :: Implementation :: CPython", "Topic :: Documentation", "Topic :: Documentation :: Sphinx", @@ -88,57 +85,119 @@ dependencies = [ "tabulate<0.10", "verlib2==0.2.0", ] -[project.optional-dependencies] -develop = [ +optional-dependencies.develop = [ "black<25", "mypy<1.15", - "poethepoet<0.31", - "pyproject-fmt<2.3", + "poethepoet<1", + "pyproject-fmt<3", "ruff<0.9", "validate-pyproject<0.19", ] -docs = [ +optional-dependencies.docs = [ "furo==2024.8.6", "sphinx<8.1", "sphinx-autobuild==2024.2.4", "sphinx-copybutton<0.6", "sphinx-design-elements<0.5", ] -release = [ +optional-dependencies.release = [ "build<2", "keyring", "twine<7", ] -test = [ +optional-dependencies.test = [ "pytest<9", "pytest-cov<7", - "sphinx_pytest<0.3", + "sphinx-pytest<0.3", ] -[project.urls] -changelog = "https://github.com/tech-writing/linksmith/blob/main/CHANGES.md" -documentation = "https://linksmith.readthedocs.io/" -homepage = "https://linksmith.readthedocs.io/" -repository = "https://github.com/tech-writing/linksmith" -[project.scripts] -anansi = "linksmith.sphinx.community.anansi:cli" -linksmith = "linksmith.cli:cli" +urls.changelog = "https://github.com/tech-writing/linksmith/blob/main/CHANGES.md" +urls.documentation = "https://linksmith.readthedocs.io/" +urls.homepage = "https://linksmith.readthedocs.io/" +urls.repository = "https://github.com/tech-writing/linksmith" +scripts.anansi = "linksmith.sphinx.community.anansi:cli" +scripts.linksmith = "linksmith.cli:cli" + +[tool.setuptools.packages.find] +namespaces = false [tool.black] line-length = 120 +[tool.ruff] +line-length = 120 + +lint.select = [ + # flake8-unused-arguments + "ARG", + # pyupgrade + # "UP", + # flake8-commas + "COM", + # Pycodestyle + "E", + # eradicate + "ERA", + # Pyflakes + "F", + # isort + "I", + # flake8-quotes + "Q", + # return + "RET", + # Bandit + "S", + # print + "T20", + # future-annotations + # "FA", + # flake8-type-checking + "TCH", + "W", + # flake8-2020 + "YTT", + # flake8-use-pathlib + # "PTH" +] + +lint.extend-ignore = [ + # Unnecessary variable assignment before `return` statement + "RET504", + # Unnecessary `elif` after `return` statement + "RET505", +] + +lint.per-file-ignores."docs/conf.py" = [ "ERA001" ] # Allow commented-out code. +lint.per-file-ignores."linksmith/cli.py" = [ "T201" ] # Allow `print`. +lint.per-file-ignores."tests/*" = [ "S101" ] # Allow use of `assert`. + +[tool.pytest.ini_options] +addopts = "-rA --verbosity=3 --cov --cov-report=term-missing --cov-report=xml" +minversion = "2.0" +log_level = "DEBUG" +log_cli_level = "DEBUG" +log_format = "%(asctime)-15s [%(name)-36s] %(levelname)-8s: %(message)s" +testpaths = [ + "linksmith", + "tests", +] +xfail_strict = true +markers = [ +] + [tool.coverage.run] branch = false omit = [ "tests/*", ] -source = ["linksmith"] +source = [ "linksmith" ] [tool.coverage.report] fail_under = 0 show_missing = true [tool.mypy] -packages = ["linksmith"] +packages = [ "linksmith" ] exclude = [ ] ignore_missing_imports = true @@ -152,73 +211,9 @@ strict_equality = true warn_unused_ignores = true warn_redundant_casts = true -[tool.pytest.ini_options] -addopts = "-rA --verbosity=3 --cov --cov-report=term-missing --cov-report=xml" -minversion = "2.0" -log_level = "DEBUG" -log_cli_level = "DEBUG" -log_format = "%(asctime)-15s [%(name)-36s] %(levelname)-8s: %(message)s" -testpaths = [ - "linksmith", - "tests", -] -xfail_strict = true -markers = [ -] - -[tool.ruff] -line-length = 120 - -lint.select = [ - # Pycodestyle - "E", - "W", - # Pyflakes - "F", - # isort - "I", - # Bandit - "S", - # flake8-quotes - "Q", - # eradicate - "ERA", - # flake8-2020 - "YTT", - # print - "T20", - # return - "RET", - # pyupgrade - # "UP", - # flake8-commas - "COM", - # future-annotations - # "FA", - # flake8-type-checking - "TCH", - # flake8-unused-arguments - "ARG", - # flake8-use-pathlib - # "PTH" -] - -lint.extend-ignore = [ - # Unnecessary variable assignment before `return` statement - "RET504", - # Unnecessary `elif` after `return` statement - "RET505", -] - - -[tool.ruff.lint.per-file-ignores] -"tests/*" = ["S101"] # Allow use of `assert`. -"docs/conf.py" = ["ERA001"] # Allow commented-out code. -"linksmith/cli.py" = ["T201"] # Allow `print`. - -[tool.setuptools.packages.find] -namespaces = false - +[tool.versioningit.vcs] +method = "git" +default-tag = "0.0.0" # =================== # Tasks configuration @@ -232,10 +227,10 @@ check = [ ] docs-autobuild = [ - { cmd = "sphinx-autobuild --open-browser --watch=docs docs docs/_build" } + { cmd = "sphinx-autobuild --open-browser --watch=docs docs docs/_build" }, ] docs-html = [ - { cmd = "sphinx-build -W --keep-going docs docs/_build" } + { cmd = "sphinx-build -W --keep-going docs docs/_build" }, ] format = [