API

Package emcdproj

Project management utilities.

emcdproj.main()

Entrypoint.

Module emcdproj.website

Static website maintenance utilities for projects.

class emcdproj.website.CommandDispatcher(*, command)

Bases: CliCommand

Dispatches commands for static website maintenance.

Variables:

command (emcdproj.website.SurveyCommand | emcdproj.website.UpdateCommand)

class emcdproj.website.Locations(*, project, auxiliary, publications, archive, artifacts, website, coverage, index, versions, templates)

Bases: DataclassObject

Locations associated with website maintenance.

Variables:
classmethod from_project_anchor(auxdata, anchor=absence.absent)

Produces locations from project anchor, if provided.

If project anchor is not given, then attempt to discover it.

Parameters:
  • selfclass

  • auxdata (appcore.state.Globals)

  • anchor (pathlib.Path | absence.objects.AbsentSingleton)

Return type:

typing_extensions.Self

class emcdproj.website.SurveyCommand(*, use_extant=False)

Bases: CliCommand

Surveys release versions published in static website.

Variables:

use_extant (bool) – Fetch publication branch and use tarball.

class emcdproj.website.UpdateCommand(*, version, use_extant=False, production=False)

Bases: CliCommand

Updates static website for particular release version.

Variables:
  • version (str) – Release version to update.

  • use_extant (bool) – Fetch publication branch and use tarball.

  • production (bool) – Update publication branch with new tarball. Implies –use-extant to prevent data loss.

emcdproj.website.survey(auxdata, *, project_anchor=absence.absent, use_extant=False)

Surveys release versions published in static website.

Lists all versions from the versions manifest, showing their available documentation types and highlighting the latest version.

emcdproj.website.update(auxdata, version, *, project_anchor=absence.absent, use_extant=False, production=False)

Updates project website with latest documentation and coverage.

Processes the specified version, copies documentation artifacts, updates version information, and generates coverage badges.

Module emcdproj.template

Copier template maintenance and validation.

class emcdproj.template.CommandDispatcher(*, command)

Bases: CliCommand

Dispatches commands for Copier template maintenance.

Variables:

command (emcdproj.template.SurveyCommand | emcdproj.template.ValidateCommand)

class emcdproj.template.SurveyCommand

Bases: CliCommand

Surveys available configuration variants.

class emcdproj.template.ValidateCommand(*, variant, preserve=False)

Bases: CliCommand

Validates template against configuration variant.

Variables:
  • variant (str) – Configuration variant to validate.

  • preserve (bool) – Preserve generated project for inspection?

emcdproj.template.copy_template(answers_file, projectdir)

Copies template to target directory using answers.

emcdproj.template.survey_variants(auxdata)

Surveys available configuration variants.

emcdproj.template.validate_variant(auxdata, variant, preserve)

Validates configuration variant.

emcdproj.template.validate_variant_project(projectdir)

Validates standard project as generated from template.

Module emcdproj.filesystem

Filesystem operations and utilities.

emcdproj.filesystem.chdir(directory)

Temporarily changes working directory.

Not thread-safe or async-safe.

Module emcdproj.interfaces

Abstract bases and interfaces.

class emcdproj.interfaces.CliCommand

Bases: DataclassProtocol, Protocol

CLI command.

class emcdproj.interfaces.ConsoleDisplay(*, silence: typing.Annotated[bool, _ArgConfig(name=None, metavar=None, help=None, help_behavior_hint=None, aliases=('--quiet', '--silent'), prefix_name=False, constructor_factory=None, default=<NonpropagatingMissingType id='140029104743200'>)] = False, file: Annotated[Optional[pathlib.Path], _ArgConfig(name='console-capture-file', metavar=None, help=None, help_behavior_hint=None, aliases=None, prefix_name=False, constructor_factory=None, default=<NonpropagatingMissingType id='140029104743200'>)] = None, stream: typing.Annotated[emcdproj.interfaces.DisplayStreams, _ArgConfig(name='console-stream', metavar=None, help=None, help_behavior_hint=None, aliases=None, prefix_name=False, constructor_factory=None, default=<NonpropagatingMissingType id='140029104743200'>)] = <DisplayStreams.Stderr: 'stderr'>)

Bases: DataclassObject

Variables:
async provide_stream()

Provides output stream for display.

Parameters:

self

Return type:

_io.TextIOWrapper

class emcdproj.interfaces.DisplayStreams(value)

Bases: Enum

Stream upon which to place output.

Module emcdproj.exceptions

Family of exceptions for package API.

exception emcdproj.exceptions.DataAwol(source, label)

Bases: Omnierror, AssertionError

Unexpected data absence.

exception emcdproj.exceptions.FileAwol(file)

Bases: Omnierror, AssertionError

Unexpected file absence.

exception emcdproj.exceptions.FileDataAwol(file, label)

Bases: DataAwol

Unexpected data absence from file.

exception emcdproj.exceptions.FileEmpty(file)

Bases: Omnierror, AssertionError

Unexpectedly empty file.

exception emcdproj.exceptions.Omnierror(*posargs, **nomargs)

Bases: Omniexception, Exception

Base for error exceptions raised by package API.

exception emcdproj.exceptions.Omniexception(*posargs, **nomargs)

Bases: Object, BaseException

Base for all exceptions raised by package API.