httk.core.docs.config

Load the strict docs/versioning.toml site configuration.

The supported shape is:

[site]
slug = "httk-atomistic"
repository-url = "https://github.com/httk/httk-atomistic"
main-branch = "main"
import-roots = ["httk/atomistic", "httk/registry"]

[[internal-dependency]]
distribution = "httk-core"
slug = "httk-core"
repository-url = "https://github.com/httk/httk-core"
main-branch = "main"

Exceptions

ConfigError

Raised when a versioning TOML file is missing, malformed, or unsafe.

Classes

InternalDependency

Describe one internal httk distribution used by a documentation site.

VersioningConfig

Configure one versioned documentation site.

Functions

load_versioning_config(path)

Read and validate a versioning TOML file, rejecting unknown keys.

Module Contents

exception httk.core.docs.config.ConfigError[source]

Bases: ValueError

Raised when a versioning TOML file is missing, malformed, or unsafe.

class httk.core.docs.config.InternalDependency[source]

Describe one internal httk distribution used by a documentation site.

Parameters:
  • distribution – Distribution name used by dependency metadata.

  • slug – Documentation-site slug for the dependency.

  • repository_url – Repository URL for the dependency.

  • main_branch – Branch containing the dependency’s development docs.

distribution: str[source]
slug: str[source]
repository_url: str[source]
main_branch: str = 'main'[source]
class httk.core.docs.config.VersioningConfig[source]

Configure one versioned documentation site.

Parameters:
  • slug – Documentation-site slug.

  • repository_url – Repository URL for the site.

  • main_branch – Branch containing the site’s development docs.

  • import_roots – Import roots whose documentation is generated.

  • internal_dependencies – Internal distributions documented alongside the site.

slug: str[source]
repository_url: str[source]
main_branch: str = 'main'[source]
import_roots: tuple[str, Ellipsis] = ()[source]
internal_dependencies: tuple[InternalDependency, Ellipsis] = ()[source]
httk.core.docs.config.load_versioning_config(path)[source]

Read and validate a versioning TOML file, rejecting unknown keys.

Parameters:

path (str | pathlib.Path) – Versioning TOML file to read.

Returns:

Validated documentation-site configuration.

Raises:

ConfigError – If the file cannot be read or contains invalid configuration.

Return type:

VersioningConfig