mirror of
https://github.com/TheAlgorithms/Python.git
synced 2026-09-29 05:53:07 +08:00
* docs: configure Sphinx directly and drop unmaintained sphinx-pyproject sphinx-pyproject has no releases supporting Python 3.14/3.15 and pins an old Sphinx, which blocks the docs build on newer interpreters. Move the [tool.sphinx-pyproject] config into a plain docs/conf.py (project name, version and authors single-sourced from pyproject.toml via stdlib tomllib), drop the sphinx-pyproject dependency, and depend on sphinx>=8.2 directly. Also bump beautifulsoup4>=4.15 and pandas>=2.3.3. No changes to uv.lock. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Christian Clauss <cclauss@me.com>
103 lines
2.1 KiB
Python
103 lines
2.1 KiB
Python
# Configuration file for the Sphinx documentation builder.
|
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html
|
|
#
|
|
# Project metadata (name/version/authors) is single-sourced from pyproject.toml
|
|
# so it never drifts from the packaging metadata.
|
|
import tomllib
|
|
from pathlib import Path
|
|
|
|
_pyproject = tomllib.loads(
|
|
(Path(__file__).parent.parent / "pyproject.toml").read_text(encoding="utf-8")
|
|
)
|
|
_project = _pyproject["project"]
|
|
|
|
project = _project["name"]
|
|
author = ", ".join(a["name"] for a in _project.get("authors", []))
|
|
release = version = _project["version"]
|
|
copyright = "2014, TheAlgorithms" # noqa: A001 # Sphinx requires this exact name
|
|
|
|
extensions = [
|
|
"autoapi.extension",
|
|
"myst_parser",
|
|
]
|
|
|
|
autoapi_dirs = [
|
|
"audio_filters",
|
|
"backtracking",
|
|
"bit_manipulation",
|
|
"blockchain",
|
|
"boolean_algebra",
|
|
"cellular_automata",
|
|
"ciphers",
|
|
"computer_vision",
|
|
"conversions",
|
|
"data_compression",
|
|
"data_structures",
|
|
"digital_image_processing",
|
|
"divide_and_conquer",
|
|
"dynamic_programming",
|
|
"electronics",
|
|
"file_transfer",
|
|
"financial",
|
|
"fractals",
|
|
"fuzzy_logic",
|
|
"genetic_algorithm",
|
|
"geodesy",
|
|
"geometry",
|
|
"graphics",
|
|
"graphs",
|
|
"greedy_methods",
|
|
"hashes",
|
|
"knapsack",
|
|
"linear_algebra",
|
|
"linear_programming",
|
|
"machine_learning",
|
|
"maths",
|
|
"matrix",
|
|
"networking_flow",
|
|
"neural_network",
|
|
"other",
|
|
"physics",
|
|
"project_euler",
|
|
"quantum",
|
|
"scheduling",
|
|
"searches",
|
|
"sorts",
|
|
"strings",
|
|
"web_programming",
|
|
]
|
|
autoapi_member_order = "groupwise"
|
|
|
|
exclude_patterns = [
|
|
".*/*",
|
|
"docs/",
|
|
]
|
|
|
|
html_theme = "alabaster"
|
|
html_static_path = ["_static"]
|
|
templates_path = ["_templates"]
|
|
|
|
source_suffix = {
|
|
".rst": "restructuredtext",
|
|
".md": "markdown",
|
|
}
|
|
|
|
myst_enable_extensions = [
|
|
"amsmath",
|
|
"attrs_inline",
|
|
"colon_fence",
|
|
"deflist",
|
|
"dollarmath",
|
|
"fieldlist",
|
|
"html_admonition",
|
|
"html_image",
|
|
"replacements",
|
|
"smartquotes",
|
|
"strikethrough",
|
|
"substitution",
|
|
"tasklist",
|
|
]
|
|
myst_fence_as_directive = [
|
|
"include",
|
|
]
|