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.factory Module

The factory creates classes based on configuration.

Classes

Factory()

A factory for creating classes based on configuration.

Class Inheritance Diagram

Inheritance diagram of technote.factory.Factory

technote.main 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

TechnoteSphinxConfig(factory, toml, ...)

A class that configures Sphinx in conf.py to build a technote.

Class Inheritance Diagram

Inheritance diagram of technote.main.TechnoteSphinxConfig

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.insertposttitle Module

Inserts the status of the technote below thte h1.

Functions

insert_post_title(app, exceptions)

Insert a html templates directly below the title.

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.ext.pygmentscss Module

A build-finished Sphinx hook that overwrites the ppygments.css file.

Functions

overwrite_pygments_css(app[, exceptions])

Overwrite the pygments CSS file with a version that enables toggling between light and dark themes.

technote.ext.toc Module

Sphinx extension for creating a cleaner toc (table of contents) of the page’s sections that doesn’t include the page title, like the default toc context variable.

Functions

process_html_page_context_for_toc(app, ...)

Process the HTML page context to add a new technote-toc context variable.

technote.ext.wraptables Module

The wraptables extension wraps HTML tables in figures.

Functions

wrap_html_tables(app[, exceptions])

Wrap the HTML tables in a figure tag.

Variables

annotations

technote.metadata.model Module

The domain model for metadata about a technote.

Classes

Organization(*, name[, internal_id, ror, ...])

The domain model for an organization (e.g. an institution).

Person(*, name[, email, affiliations, ...])

The domain model for a person (e.g. an author).

Contributor(*, name[, email, affiliations, ...])

The domain model for a contributor.

SourceRepository(*, url[, path, branch, commit])

The domain model for the technote's source code repository.

TechnoteMetadata(*, title, status[, ...])

The domain model for metadata about a technote.

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

Standardized states for a technote.

Status(*, state, note[, supersceding_urls])

The domain model for the technote's content status.

Citation(*[, doi, ads_bibcode])

Additional information for building a citation to the technote.

Link(*, url[, title])

A link to a webpage.

StructuredName(*, family, given)

The domain model for a structured name (e.g. a person's name).

Class Inheritance Diagram

Inheritance diagram of technote.metadata.model.Organization, technote.metadata.model.Person, technote.metadata.model.Contributor, technote.metadata.model.SourceRepository, technote.metadata.model.TechnoteMetadata, technote.metadata.model.TechnoteState, technote.metadata.model.Status, technote.metadata.model.Citation, technote.metadata.model.Link, technote.metadata.model.StructuredName

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

technote.sources.tomlsettings Module

Models for the technote.toml configuration file.

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.

Class Inheritance Diagram

Inheritance diagram of technote.sources.tomlsettings.TechnoteToml, technote.sources.tomlsettings.TechnoteTable, technote.sources.tomlsettings.LicenseTable, technote.sources.tomlsettings.TechnoteStatus, technote.sources.tomlsettings.Organization, technote.sources.tomlsettings.PersonName, technote.sources.tomlsettings.Person, technote.sources.tomlsettings.Contributor, technote.sources.tomlsettings.SphinxTable, technote.sources.tomlsettings.IntersphinxTable, technote.sources.tomlsettings.LinkcheckTable