Skip to content

Projects

uptimely.project loads project specifications and builds or reads validated active build bundles. read_build_bundle holds a reader lock for the duration of its context; use load_build_bundle when a lock is not needed after loading.

Standard project paths and active build bundle validation.

build_project

build_project(project_root: str | Path, python_spec: str | None = None, json_spec: JsonSourceInput = None, features: FeatureSelection = None) -> BuildBundle

Build and publish a complete spec, execution plan, and Explorer bundle.

Parameters:

Name Type Description Default
project_root str | Path

Root directory of the analytics project.

required
python_spec str | None

Optional module:attribute containing a PythonSpec.

None
json_spec JsonSourceInput

Optional explicit spec JSON path.

None
features FeatureSelection

Optional output features to compile with their dependencies.

None

Returns:

Type Description
BuildBundle

The validated newly published bundle.

Raises:

Type Description
BuildLockError

Another builder or active bundle reader holds the lock.

ProjectBuildError

Source loading, compilation, generation, or publication fails.

load_build_bundle

load_build_bundle(project_root: str | Path) -> models.BuildBundle

Load and validate the active build without compiling or regenerating artifacts.

Parameters:

Name Type Description Default
project_root str | Path

Root directory of the analytics project.

required

Returns:

Type Description
BuildBundle

A validated bundle containing the saved execution plan and artifact paths.

Raises:

Type Description
BuildError

If the bundle is missing, incomplete, or invalid.

read_build_bundle

read_build_bundle(project_root: str | Path) -> typing.Generator[models.BuildBundle]

Load a validated bundle while holding a reader lock for the context lifetime.

load_spec_source

load_spec_source(python_spec: str | None, project_root: Path, json_spec: JsonSourceInput = None) -> spec.Spec

Load an explicit or discovered Python or JSON spec source.