Add sphinx config#50
Merged
Merged
Conversation
…tails and extensions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new
SphinxConfigPydantic model to centralize and simplify Sphinx documentation configuration. The model encapsulates project metadata and Sphinx settings, and is now used throughout the documentation build process. Related refactoring updates theconf.pyconfig file to use this model, and new tests ensure the model and its integration work as expected. The pull request also updates some dependencies.Sphinx documentation configuration refactor:
SphinxConfigPydantic model intemplate_python/models.pyto encapsulate Sphinx configuration and project metadata, with properties for project name, package name, copyright, and RST prolog substitutions.get_sphinx_config()function intemplate_python/workflows.pyto construct and return aSphinxConfiginstance using values frompyproject.toml.docs/source/conf.pyto use the newSphinxConfigmodel for all project and Sphinx settings, replacing previous direct function calls and constants. [1] [2]Testing improvements:
SphinxConfigmodel intests/test_models.pyand for theget_sphinx_config()integration intests/test_workflows.py. [1] [2] [3]Dependency updates:
pydantic>=2.13.0to main dependencies and bumped versions formypyandsphinx-autodoc-typehintsinpyproject.toml. [1] [2]