Application¶
Configured application API for project build and execution workflows.
Uptimely
¶
Entry point for an analytics project at a fixed filesystem path.
config_path
instance-attribute
¶
create_engine
¶
Create an engine with this project's configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
build
|
BuildBundle
|
Build bundle belonging to this project. |
required |
Returns:
| Type | Description |
|---|---|
Engine
|
Engine configured for the build. |
Raises:
| Type | Description |
|---|---|
ValueError
|
The bundle belongs to a different project. |
build
¶
build(*, python_spec: str | None = None, json_spec: JsonSourceInput = None, yaml_spec: YamlSourceInput = None, features: FeatureSelection = None, src_path: Path | None = None, requirements_file: str | Path | None = None) -> models.BuildBundle
Build and publish the project's spec, plan, and Explorer snapshot.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
python_spec
|
str | None
|
Optional |
None
|
json_spec
|
JsonSourceInput
|
Optional explicit spec JSON path, relative to the project root unless absolute. Defaults to the configured source or standard discovery. |
None
|
yaml_spec
|
YamlSourceInput
|
Optional YAML file or directory, relative to the project root unless absolute. Defaults to the configured source or standard discovery. |
None
|
features
|
FeatureSelection
|
Optional output features to compile with their dependencies. |
None
|
src_path
|
Path | None
|
Optional source directory, relative to the project root unless absolute.
Defaults to the configured |
None
|
requirements_file
|
str | Path | None
|
Requirements definition file, relative to the project root unless
absolute. Defaults to the configured |
None
|
Returns:
| Type | Description |
|---|---|
BuildBundle
|
The validated newly published bundle. |
Raises:
| Type | Description |
|---|---|
BuildLockError
|
Another builder or active bundle reader holds the lock. |
ProjectBuildError
|
Loading, compilation, generation, or publication fails. |
run
¶
run(*, validate: bool = False, preview_rows: int | None = None, operator: tuple[str, str] | None = None, src_path: Path | None = None) -> engine.ExecutionResult
Run the saved build without rebuilding it.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
validate
|
bool
|
Validate inputs and dataframe contracts at every step. |
False
|
preview_rows
|
int | None
|
Positive maximum sample size per profile. Defaults to the Engine config value. |
None
|
operator
|
tuple[str, str] | None
|
Optional profile and operator IDs selecting an operator and its saved prerequisites. |
None
|
src_path
|
Path | None
|
Optional Python source directory, relative to the project root unless absolute. Overrides the source bundled with the build. |
None
|
Returns:
| Type | Description |
|---|---|
ExecutionResult
|
Execution results, including any invocation failures. |
Raises:
| Type | Description |
|---|---|
BuildError
|
The saved build is missing, incomplete, or invalid. |
BuildLockError
|
A builder holds the project build lock. |
OSError
|
Run artifacts cannot be persisted. |
ValueError
|
The preview row limit or requested operator is invalid. |
load_build_bundle
¶
Load the saved build without holding a reader lock after loading.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
validate
|
bool
|
Run Spec semantic checks in addition to artifact and plan checks. |
True
|
Returns:
| Type | Description |
|---|---|
BuildBundle
|
The validated saved build bundle. |
Raises:
| Type | Description |
|---|---|
BuildError
|
The saved build is missing, incomplete, or invalid. |
read_build_bundle
¶
read_build_bundle(*, validate: bool = True) -> contextlib.AbstractContextManager[models.BuildBundle]
Return a context manager holding a reader lock while using the build.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
validate
|
bool
|
Run Spec semantic checks in addition to artifact and plan checks. |
True
|
Returns:
| Type | Description |
|---|---|
AbstractContextManager[BuildBundle]
|
A context manager yielding the validated saved build bundle. |