Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maintenance 2025-01 #53

Merged
merged 4 commits into from
Jan 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
1 change: 1 addition & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ python:
sphinx:
builder: html
fail_on_warning: true
configuration: docs/conf.py
177 changes: 86 additions & 91 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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 = [
Expand Down
Loading