API

Package emcdproj

Utilities for managing projects generated from the emcd/python-project-common Copier template.

Module emcdproj.website

Static website maintenance utilities for projects.

class emcdproj.website.CommandDispatcher(*, command: ~emcdproj.website.Annotated[~emcdproj.website.SurveyCommand, ~tyro.conf._confstruct._SubcommandConfig(name=survey, default=<NonpropagatingMissingType id='140505692701792'>, description=None, prefix_name=False, constructor_factory=None)] | ~emcdproj.website.Annotated[~emcdproj.website.UpdateCommand, ~tyro.conf._confstruct._SubcommandConfig(name=update, default=<NonpropagatingMissingType id='140505692701792'>, description=None, prefix_name=False, constructor_factory=None)])

Bases: CliCommand

Dispatches commands for static website maintenance.

command: _SubcommandConfig(name=update, default=<NonpropagatingMissingType id='140505692701792'>, description=None, prefix_name=False, constructor_factory=None)]
class emcdproj.website.Locations(*, project: Path, auxiliary: Path, publications: Path, archive: Path, artifacts: Path, website: Path, coverage: Path, index: Path, versions: Path, templates: Path)

Bases: object

Locations associated with website maintenance.

classmethod from_project_anchor(auxdata: Globals, anchor: Path | AbsentSingleton = absence.absent) Self

Produces locations from project anchor, if provided.

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

archive: Path
artifacts: Path
auxiliary: Path
coverage: Path
index: Path
project: Path
publications: Path
templates: Path
versions: Path
website: Path
class emcdproj.website.SurveyCommand

Bases: CliCommand

Surveys release versions published in static website.

class emcdproj.website.UpdateCommand(*, version: Annotated[str, Doc(' Release version to update. '), Positional])

Bases: CliCommand

Updates static website for particular release version.

version: Annotated[str, Doc(' Release version to update. '), Positional]
emcdproj.website.update(auxdata: Globals, version: str, *, project_anchor: Path | AbsentSingleton = absence.absent) None

Updates project website with latest documentation and coverage.

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

Module emcdproj.filesystem

Filesystem operations and utilities.

emcdproj.filesystem.chdir(directory: Path) Iterator[Path]

Temporarily changes working directory.

Not thread-safe or async-safe.

Module emcdproj.interfaces

Abstract bases and interfaces.

class emcdproj.interfaces.CliCommand(*args, **kwargs)

Bases: Protocol

CLI command.

class emcdproj.interfaces.ConsoleDisplay(*, silence: "__.typx.Annotated[bool, __.tyro.conf.arg(aliases=('--quiet', '--silent'), prefix_name=False)]" = False, file: "__.typx.Annotated[__.typx.Optional[__.Path], __.tyro.conf.arg(name='console-capture-file', prefix_name=False)]" = None, stream: "__.typx.Annotated[DisplayStreams, __.tyro.conf.arg(name='console-stream', prefix_name=False)]" = <DisplayStreams.Stderr: 'stderr'>)

Bases: object

async provide_stream() TextIOWrapper

Provides output stream for display.

file: _ArgConfig(name=console-capture-file, metavar=None, help=None, help_behavior_hint=None, aliases=None, prefix_name=False, constructor_factory=None, default=<NonpropagatingMissingType id='140505692701792'>)]
silence: _ArgConfig(name=None, metavar=None, help=None, help_behavior_hint=None, aliases=('--quiet', '--silent'), prefix_name=False, constructor_factory=None, default=<NonpropagatingMissingType id='140505692701792'>)]
stream: _ArgConfig(name=console-stream, metavar=None, help=None, help_behavior_hint=None, aliases=None, prefix_name=False, constructor_factory=None, default=<NonpropagatingMissingType id='140505692701792'>)]
class emcdproj.interfaces.DisplayStreams(value)

Bases: Enum

Stream upon which to place output.

Stderr = 'stderr'
Stdout = 'stdout'

Module emcdproj.exceptions

Family of exceptions for package API.

exception emcdproj.exceptions.DataAwol(source: str, label: str)

Bases: Omnierror, AssertionError

Unexpected data absence.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

args
exception emcdproj.exceptions.FileAwol(file: str | Path)

Bases: Omnierror, AssertionError

Unexpected file absence.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

args
exception emcdproj.exceptions.FileDataAwol(file: str | Path, label: str)

Bases: DataAwol

Unexpected data absence from file.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

args
exception emcdproj.exceptions.FileEmpty(file: str | Path)

Bases: Omnierror, AssertionError

Unexpectedly empty file.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

args
exception emcdproj.exceptions.Omnierror(*posargs: Any, **nomargs: Any)

Bases: Omniexception, Exception

Base for error exceptions raised by package API.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

args
exception emcdproj.exceptions.Omniexception(*posargs: Any, **nomargs: Any)

Bases: BaseException

Base for all exceptions raised by package API.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

args