doot.workflow.structs.artifact
Classes
A Location, but specialized to represent artifacts/files |
Module Contents
- class doot.workflow.structs.artifact.TaskArtifact(*args: Any, **kwargs: Any)[source]
Bases:
jgdv.structs.locator.Location- A Location, but specialized to represent artifacts/files
An concrete or abstract artifact a task can produce or consume.
Tasks can depend on both concrete and abstract: depends_on=[‘file:>/a/file.txt’, ‘file:>*.txt’, ‘file:>?.txt’] and can be a requirement for concrete or solo abstract artifacts: required_for=[‘file:>a/file.txt’, ‘file:>?.txt’]
- Parameters:
args (Any)
kwargs (Any)
- property parent: pathlib.Path[source]
- Return type:
- is_stale(
- *,
- delta: jgdv.Maybe[jgdv.TimeDelta] = None,
whether the artifact itself is stale delta defaults to 1 day
- Parameters:
delta (jgdv.Maybe[jgdv.TimeDelta])
- Return type:
- reify(
- other: pathlib.Path | jgdv.structs.locator.Location,
Apply a more concrete path onto this location
- Parameters:
other (pathlib.Path | jgdv.structs.locator.Location)
- Return type:
jgdv.Maybe[TaskArtifact]
- get_status() doot.workflow._interface.ArtifactStatus_e[source]
Get the status of the artifact, To start, either declared, or exists. TODO: add a stale check TODO: add a to-clean check
- Return type: