-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This establishes the basic system for configuring the sphinx build using technote.toml. The technote.sphinxconf module provides the base Sphinx configuration for conf.py. The TechnoteSphinxConfig class contains an instance of the TechnoteTable model representing the technote.toml file, and also provides helper methods for setting variables in the conf.py/technote.sphinxconf context.
- Loading branch information
1 parent
300266a
commit 52351a6
Showing
5 changed files
with
246 additions
and
15 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
project = "Demo technote" | ||
author = "Rubin Observatory" | ||
exclude_patterns = ["_build", "README.rst", "README.md", "Makefile"] | ||
html_theme = "technote" | ||
from technote.sphinxconf import * # noqa: F401 F403 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[technote] | ||
id = "SQR-000" | ||
series_id = "SQR" | ||
title = "The technical note system" | ||
canonical_url = "https://sqr-000.lsst.io" | ||
github_url = "https://github.com/lsst-sqre/sqr-000" | ||
github_default_branch = "master" | ||
date_created = "2015-11-18" | ||
date_updated = "2015-11-23" | ||
|
||
[[technote.authors]] | ||
name = { given_names = "Jonathan", family_names = "Sick" } | ||
orcid = "https://orcid.org/0000-0003-3001-676X" | ||
affiliations = [ | ||
{ name = "Rubin Observatory", ror = "https://ror.org/048g3cy84" } | ||
] |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
"""Sphinx configuration for technotes. | ||
To use this configuration in a Technote project, write a conf.py containing:: | ||
from technote.sphinxconf import * | ||
""" | ||
|
||
from __future__ import annotations | ||
|
||
from typing import Dict, List, Tuple, Union | ||
|
||
from .config import TechnoteSphinxConfig | ||
|
||
# Restrict to only Sphinx configurations | ||
__all__ = [ | ||
# SPHINX | ||
"project", | ||
"author", | ||
"exclude_patterns", | ||
"html_theme", | ||
"extensions", | ||
"nitpicky", | ||
"nitpick_ignore", | ||
"nitpick_ignore_regex", | ||
# INTERSPHINX | ||
"intersphinx_mapping", | ||
"intersphinx_timeout", | ||
"intersphinx_cache_limit", | ||
# LINKCHECK | ||
"linkcheck_retries", | ||
"linkcheck_timeout", | ||
"linkcheck_ignore", | ||
] | ||
|
||
_t = TechnoteSphinxConfig.find_and_load() | ||
|
||
# ============================================================================ | ||
# SPHINX General sphinx settings | ||
# ============================================================================ | ||
|
||
project = _t.title | ||
author = _t.author | ||
exclude_patterns = ["_build", "README.rst", "README.md", "Makefile"] | ||
html_theme = "technote" | ||
|
||
extensions: List[str] = [] | ||
_t.append_extensions(extensions) | ||
|
||
# Nitpicky settings and ignored errors | ||
nitpicky = _t.nitpicky | ||
|
||
nitpick_ignore: List[Tuple[str, str]] = [] | ||
_t.append_nitpick_ignore(nitpick_ignore) | ||
|
||
nitpick_ignore_regex: List[Tuple[str, str]] = [] | ||
_t.append_nitpick_ignore_regex(nitpick_ignore_regex) | ||
|
||
# ============================================================================ | ||
# INTERSPHINX Intersphinx settings | ||
# ============================================================================ | ||
|
||
intersphinx_mapping: Dict[str, Tuple[str, Union[str, None]]] = {} | ||
_t.extend_intersphinx_mapping(intersphinx_mapping) | ||
|
||
intersphinx_timeout = 10.0 # seconds | ||
|
||
intersphinx_cache_limit = 5 # days | ||
|
||
|
||
# ============================================================================ | ||
# LINKCHECK Link check builder settings | ||
# ============================================================================ | ||
|
||
linkcheck_retries = 2 | ||
linkcheck_timeout = 15 | ||
linkcheck_ignore: List[str] = [] | ||
_t.append_linkcheck_ignore(linkcheck_ignore) |
This file contains 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