configure_technote¶
-
documenteer.sphinxconfig.technoteconf.
configure_technote
(meta_stream)¶ Builds a
dict
of Sphinx configuration variables given a central configuration for LSST Design Documents and a metadata YAML file.This function refactors the common Sphinx
conf.py
script so that basic configurations are managed centrally in this module, while author-updatable metadata is stored in ametadata.yaml
file in the document’s repository. To use this function, aconf.py
need only look likeimport os from documenteer.sphinxconfig.technoteconf import configure_technote metadata_path = os.path.join(os.path.dirname(__file__), 'metadata.yaml') with open(metadata_path, 'r') as f: confs = configure_technote(f) _g = global() _g.update(confs)
And
metadata.yaml
looks like:doc_id: 'LDM-152' doc_title: 'Data Management Middleware Design' copyright: '2015, AURA/LSST' authors: - 'Kian-Tat Lim' - 'Ray Plante' - 'Gregory Dubois-Felsmann' # Current document version last_revised: 'October 10, 2013' version: '10.0' # dev_version_suffix: None # e.g. 'alpha'/'beta'/'rc' if necessary
Parameters: - meta_stream : file handle
A file stream (e.g., from
open()
) for themetadata.yaml
document in a design document’s repository.
Returns: - confs :
dict
Dictionary of configurations that should be added to the
conf.py
global namespace.