tisserande.tracking

Submodules

Attributes

ArrayArg

ConfigDict

ConfigFile

DataFile

ObjectArg

Param

Untracked

Functions

configure(→ None)

Configure the tracking system.

track(…)

Decorator to track execution provenance of a sync function.

track_async(…)

Decorator to track execution provenance of an async function.

track_shell(→ subprocess.CompletedProcess[str])

Execute and track a shell command.

Package Contents

tisserande.tracking.ArrayArg[source]
tisserande.tracking.ConfigDict[source]
tisserande.tracking.ConfigFile[source]
tisserande.tracking.DataFile[source]
tisserande.tracking.ObjectArg[source]
tisserande.tracking.Param[source]
tisserande.tracking.Untracked[source]
tisserande.tracking.configure(*, backend: tisserande.tracking.backends.TrackingBackend | None = None, db_url: str | None = None) None[source]

Configure the tracking system.

Must be called before @track is used (unless a backend is passed directly to the decorator). If neither backend nor db_url is provided, creates a LocalSyncBackend with the default DB URL from config.

tisserande.tracking.track(func: F) F[source]
tisserande.tracking.track(*, backend: tisserande.tracking.backends.TrackingBackend | None = None, track_inputs: bool = True, track_outputs: bool = True) collections.abc.Callable[[F], F]

Decorator to track execution provenance of a sync function.

Can be used with or without arguments:

@track def my_func(…): …

@track(track_outputs=False) def my_func(…): …

tisserande.tracking.track_async(func: F) F[source]
tisserande.tracking.track_async(*, backend: tisserande.tracking.backends.TrackingBackend | None = None, track_inputs: bool = True, track_outputs: bool = True) collections.abc.Callable[[F], F]

Decorator to track execution provenance of an async function.

tisserande.tracking.track_shell(command: str | list[str], *, inputs: dict[str, Any] | None = None, outputs: dict[str, Any] | None = None, backend: tisserande.tracking.backends.TrackingBackend | None = None) subprocess.CompletedProcess[str][source]

Execute and track a shell command.

Parameters:
  • command – Shell command to execute

  • inputs – Dict mapping arg names to values (tracked as input data nodes)

  • outputs – Dict mapping output names to values (tracked as output data nodes)