Skip to content

Commit 8763d70

Browse files
committed
fix build docs build
1 parent bc5a09a commit 8763d70

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

docs/source/conf.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from datetime import date
1111
from pathlib import Path
1212

13-
from pkg_resources import get_distribution
13+
from generic_template import __version__
1414

1515
DOCS_DIR = Path(__file__).parent.parent.resolve()
1616
ROOT_DIR = DOCS_DIR.parent
@@ -22,10 +22,10 @@
2222

2323
# -- Project information -----------------------------------------------------
2424
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
25-
project = PYPROJECT_TOML["tool"]["poetry"]["name"]
25+
project = PYPROJECT_TOML["project"]["name"]
2626
copyright = f"{date.today().year}, Kyle Finley" # noqa: A001, DTZ011
27-
author = PYPROJECT_TOML["tool"]["poetry"]["authors"][0]
28-
version = get_distribution(project).version
27+
author = PYPROJECT_TOML["project"]["authors"][0]["name"]
28+
version = __version__
2929
release = ".".join(version.split(".")[:2]) # short X.Y version
3030

3131

@@ -78,13 +78,14 @@
7878
html_show_sphinx = False
7979
html_static_path = ["_static"] # dir with static files relative to this dir
8080
html_theme = "furo" # theme to use for HTML and HTML Help pages
81-
html_theme_options = {
81+
html_theme_options: dict[str, bool | dict[str, str] | list[str] | str] = {
8282
"dark_css_variables": {
8383
"font-stack--monospace": "Inconsolata, monospace",
8484
},
8585
"light_css_variables": {
8686
"font-stack--monospace": "Inconsolata, monospace",
8787
},
88+
"top_of_page_buttons": [],
8889
}
8990
html_title = f"{project} v{release}"
9091

pyproject.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ pytest = "^8.3.4"
3333
pytest-cov = ">=6.0.0"
3434
pytest-mock = ">=3.14.0"
3535

36+
[tool.poetry.requires-plugins]
37+
poetry-dynamic-versioning = {extras = ["plugin"], version = ">=1.6.0,<2.0.0"}
38+
3639
[tool.black]
3740
force-exclude = '''
3841
/(
@@ -130,8 +133,6 @@ target-version = "py311"
130133

131134
[tool.ruff.lint] # https://docs.astral.sh/ruff/settings/#lint
132135
ignore = [
133-
"ANN101", # Missing type annotation for `self` in method
134-
"ANN102", # Missing type annotation for `cls` in classmethod
135136
"COM812", # Trailing comma missing
136137
"D203", # 1 blank line required before class docstring
137138
"D213", # Multi-line docstring summary should start at the second line
@@ -173,8 +174,7 @@ sort_first = ["project", "tool", "tool.poetry"]
173174
spaces_before_inline_comment = 2
174175
trailing_comma_inline_array = true
175176
overrides.project.first = ["name", "version"]
176-
overrides."tool.poetry".first = ["version"]
177177

178178
[build-system]
179179
build-backend = "poetry_dynamic_versioning.backend"
180-
requires = ["poetry-core", "poetry-dynamic-versioning>=1.2.0,<2.0.0"]
180+
requires = ["poetry-core", "poetry-dynamic-versioning>=1.6.0,<2.0.0"]

0 commit comments

Comments
 (0)