httk.workflow.projects

Expose workflow project policy over the project anchor owned by httk.core.project.

The project anchor — the httk_project directory, project.json and its validation, upward discovery, the identity key, and key pinning and trust — moved to httk-core as httk.core.project so a core-only installation has projects. This module re-exports that API unchanged (this is an internal move, so no deprecation is warranted and every public name keeps working) and keeps the pieces that are workflow policy rather than anchor:

Attributes

Functions

initialize_project(root, *, name[, description, ...])

Initialize the project anchor without creating a workspace.

import_v1_project(root, *[, source, name])

Create v2 project metadata from a legacy ht.project directory.

project_exclusions(metadata)

Return default and configured manifest exclusions.

Module Contents

httk.workflow.projects.DEFAULT_MANIFEST_EXCLUSIONS[source]
httk.workflow.projects.initialize_project(root, *, name, description='', manifest_exclusions=())[source]

Initialize the project anchor without creating a workspace.

Parameters:
  • root (str | os.PathLike[str]) – Directory in which to create the project anchor.

  • name (str) – Project name.

  • description (str) – Optional project description.

  • manifest_exclusions (collections.abc.Iterable[str]) – Relative paths excluded from the manifest.

Returns:

Created project metadata.

Return type:

dict[str, object]

httk.workflow.projects.import_v1_project(root, *, source=None, name=None)[source]

Create v2 project metadata from a legacy ht.project directory.

Parameters:
  • root (str | os.PathLike[str]) – Directory in which to create the project anchor.

  • source (str | os.PathLike[str] | None) – Legacy project directory, or the default legacy location.

  • name (str | None) – Replacement project name, or the legacy name.

Returns:

Created project metadata.

Return type:

dict[str, object]

httk.workflow.projects.project_exclusions(metadata)[source]

Return default and configured manifest exclusions.

Parameters:

metadata (dict[str, object]) – Project metadata containing optional exclusions.

Returns:

Exclusion patterns applied to the signed manifest.

Raises:

ValueError – If configured exclusions are not strings in an array.

Return type:

tuple[str, Ellipsis]