Skip to content

provenance

Read PowerFit run arguments and target associations from RO-Crate metadata.

PowerfitRunArguments

Bases: TypedDict

Recorded run fields; unknown values are None.

Attributes:

Name Type Description
used_target str | None

Session-relative target explicitly associated with the run.

options str | None

Shell-quoted arguments following the recorded PowerFit command.

action_id str | None

Identifier of the associated RO-Crate creation action.

powerfit_run_arguments_from_rocrate(session_dir)

Extract recorded fitting runs without guessing targets from filenames.

Parameters:

Name Type Description Default
session_dir Path

Session directory containing RO-Crate metadata.

required

Returns:

Type Description
dict[str, PowerfitRunArguments]

Run IDs mapped to used_target, options, and action_id.

dict[str, PowerfitRunArguments]

The target is the unique input described as the density used for fitting

dict[str, PowerfitRunArguments]

and located directly inside the recorded run directory. Missing or

dict[str, PowerfitRunArguments]

ambiguous targets are None. Options preserve all command arguments after

dict[str, PowerfitRunArguments]

powerfit run, including the original target and session paths.

dict[str, PowerfitRunArguments]

Returns an empty dictionary when no fitting actions or crate exist.

Notes

Only recorded powerfit/<run> Dataset outputs identify runs here. Discovering incomplete, unrecorded directories is the metadata loader's responsibility. This function does not inspect target file contents or require recorded files to still exist. Run directories cannot be reused, so each run has one recorded fitting action.