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

test: the sphinx 7.3.7 with sphinx_autoapi #121

Closed
wants to merge 3 commits into from
Closed
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 doc/source/_autoapi_templates/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
API reference
=============

This section describes PyMeilisearch API endpoints, their capabilities,
This section describes {{ project_name }} API endpoints, their capabilities,
and how to interact with them programmatically.

.. toctree::
Expand Down
13 changes: 13 additions & 0 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,18 @@
# Excluded documentation files
exclude_patterns = ["_autoapi_templates/index.rst"]


def prepare_jinja_env(jinja_env) -> None:
"""
Customize the jinja env.

Notes
-----
See https://jinja.palletsprojects.com/en/3.0.x/api/#jinja2.Environment
"""
jinja_env.globals["project_name"] = project


# -- Configure Sphinx autoapi ------------------------------------------------
BUILD_API = True if os.environ.get("BUILD_API", "true") == "true" else False
if BUILD_API:
Expand All @@ -115,6 +127,7 @@
suppress_warnings = ["autoapi"]
autoapi_python_use_implicit_namespaces = True
autoapi_python_class_content = "both"
autoapi_prepare_jinja_env = prepare_jinja_env

# -- Configure the examples
BUILD_EXAMPLES = True if os.environ.get("BUILD_EXAMPLES", "true") == "true" else False
Expand Down
1 change: 1 addition & 0 deletions doc/styles/config/vocabularies/ANSYS/accept.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ shasum
subcommand
(?i)subcommands
(?i)api
project_name
5 changes: 2 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,12 @@ tests = [
doc = [
"ansys-sphinx-theme==0.15.2",
"numpydoc==1.7.0",
"Sphinx==6.2.1",
"Sphinx==7.3.7",
"sphinx-design==0.5.0",
"sphinx-jinja==2.0.2",
"sphinx-autoapi==3.0.0",
"sphinx-autoapi==3.1.0",
"sphinx-copybutton==0.5.2",
"sphinx-notfound-page==1.0.0",
"sphinx-jinja==2.0.2",
]

[tool.flit.module]
Expand Down
Loading