Python API reference#

technote Package#

Rubin Observatory’s framework for Sphinx-based technote documents.

Functions#

setup(app)

Sphinx entrypoint for technote.

Variables#

__version__

The version string of technote (PEP 440 compatible).

technote.config Module#

Technote configuration models (for technote.toml).

technote.toml is used both for setting document metadata and also configuring the Sphinx build. Users of Technote can also add tables to technote.toml to support their technote plugins and build infrastructure.

Classes#

TechnoteToml

A model of a technote.toml configuration file.

TechnoteTable

The root table for technote configuration, [technote] in technote.toml (TechnoteToml).

LicenseTable

A model for [technote.license] in technote.toml, which describes the content's license.

TechnoteStatus

A model for the technote's status.

TechnoteState(value[, names, module, ...])

Standardized states for a technote.

Organization

Model for describing an organization (often as an affiliation).

PersonName

A person's name.

Person

Model for describing a person related to the technote.

Contributor

Data about a contributor.

SphinxTable

The [technote.sphinx] table permits Sphinx project configuration.

IntersphinxTable

Intersphinx configuration in the [technote.sphinx] table.

LinkcheckTable

Linkcheck builder configurations in the [technote.sphinx] table.

TechnoteSphinxConfig(toml)

A wrapper around TechnoteToml that assists in setting Sphinx configurations in a conf.py file (via technote.sphinxconf).

TechnoteJinjaContext(toml)

A class available to the Jinja context in HTML templates and provides access to technote.toml-based metadata.

Class Inheritance Diagram#

Inheritance diagram of technote.config.TechnoteToml, technote.config.TechnoteTable, technote.config.LicenseTable, technote.config.TechnoteStatus, technote.config.TechnoteState, technote.config.Organization, technote.config.PersonName, technote.config.Person, technote.config.Contributor, technote.config.SphinxTable, technote.config.IntersphinxTable, technote.config.LinkcheckTable, technote.config.TechnoteSphinxConfig, technote.config.TechnoteJinjaContext

technote.ext Package#

Sphinx extensions for Technote documents.

Functions#

setup(app)

Set up Technote's own Sphinx extensions; these are automatically loaded in all technotes by default.

technote.ext.abstract Module#

Support for abstracts in technotes.

Functions#

visit_abstract_node_html(self, node)

Add HTML content before the AbstractNode.

depart_abstract_node_html(self, node)

Add HTML content after the AbstractNode.

Classes#

AbstractDirective(name, arguments, options, ...)

The abstract directive for marking up a technote's summary.

AbstractNode([rawsource])

A docutils node for the abstract content section.

Class Inheritance Diagram#

Inheritance diagram of technote.ext.abstract.AbstractDirective, technote.ext.abstract.AbstractNode

technote.ext.metadata Module#

Sphinx extension for introspecting and exporting technote metadata.

Functions#

process_html_page_context_for_metadata(app, ...)

Process the HTML page to prepare the context for the HTML templates.

get_abstract(*, app, context, doctree, config)

Get the abstract as plain text from the abstract directive.

get_title(*, app, context, doctree, config)

Get the H1 title to use as the technote title.

set_html_title(*, context)

Set the html_title and project metadata based on the title metadata, resolved from either technote.toml or the content's top-level heading.

technote.metadata Package#

Bibliographic metadata interfaces.

technote.metadata.orcid Module#

The ORCiD identifier.

Functions#

validate_orcid_url(value)

Check an ORCiD URL for validity.

technote.metadata.ror Module#

Support for ROR (Research Organization Registry) identifiers.

Functions#

validate_ror_url(value)

Check a ROR URL for validity.

technote.metadata.spdx Module#

Interface to SPDX license metadata.

Classes#

SpdxLicense

A license item as contained in a SpdxFile.

SpdxFile

Representation of a SPDX license database file as a Pydantic model.

Licenses(licenses)

License database, with access by license ID.

Class Inheritance Diagram#

Inheritance diagram of technote.metadata.spdx.SpdxLicense, technote.metadata.spdx.SpdxFile, technote.metadata.spdx.Licenses

technote.metadata.zenodo Module#

Zenodo API support and controlled vocabularies.

Classes#

ZenodoRole(value[, names, module, qualname, ...])

The role of a contributor in a Zenodo record.

Class Inheritance Diagram#

Inheritance diagram of technote.metadata.zenodo.ZenodoRole