.. _doot.workflow.structs.artifact: ============================== doot.workflow.structs.artifact ============================== .. py:module:: doot.workflow.structs.artifact Classes ------- .. autoapisummary:: doot.workflow.structs.artifact.TaskArtifact Module Contents =============== .. _doot.workflow.structs.artifact.TaskArtifact: .. py:class:: TaskArtifact(*args: Any, **kwargs: Any) Bases: :py:obj:`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'] .. py:attribute:: priority :type: int .. py:property:: parent :type: pathlib.Path .. py:method:: is_stale(*, delta: jgdv.Maybe[jgdv.TimeDelta] = None) -> bool whether the artifact itself is stale delta defaults to 1 day .. py:method:: reify(other: pathlib.Path | jgdv.structs.locator.Location) -> jgdv.Maybe[TaskArtifact] Apply a more concrete path onto this location .. py:method:: exists() -> bool .. py:method:: is_concrete() -> bool .. py:method:: get_status() -> doot.workflow._interface.ArtifactStatus_e Get the status of the artifact, To start, either declared, or exists. TODO: add a stale check TODO: add a to-clean check