MetadataGenerator#
- class MetadataGenerator(di, **kwargs)#
Bases:
objectGenerate metadata from interface.
Options are stored in an instance of
options_cls.- Parameters:
di (DataInterface) – The parent DataInterface.
kwargs (Any) – Options passed to
options_cls.
- creation_commit = <neba.data.writer.MetadataMethod object>#
Return latest commit hash.
Use the creation_script if present in metadata, or
"."otherwise.- Return type:
- creation_diff = <neba.data.writer.MetadataMethod object>#
Add git diff, only if latest commit hash is present.
creation_diff_short: list of files modified since last commitcreation_diff_long: full diff, truncated atmax_diff_lines
Use the creation_script if present in metadata, or
"."otherwise.
- creation_hostname = <neba.data.writer.MetadataMethod object>#
Return hostname of current running process.
- Return type:
- creation_params = <neba.data.writer.MetadataMethod object>#
Return interface parameters as dictionary or str.
- creation_script = <neba.data.writer.MetadataMethod object>#
Filename of top-level script or notebook.
- Return type:
- options_cls#
alias of
MetadataOptions- methods: List[Unicode] | None#
-
Default value:
None
Manually specify methods to run. If left to None, all methods are run.
- options_defaults: dict[str, Any] = {}#
Replace default options. Will be overridden by arguments passed during initialization.
- postprocess()#
Modify the metadata attribute in place, after generation.
- Return type:
None