simdb.cli.manifest module

class simdb.cli.manifest.DataObject(*, uri: Annotated[SimDBUrl, UrlConstraints(max_length=None, allowed_schemes=['file', 'imas'], host_required=None, default_host=None, default_port=None, default_path=None, preserve_empty_path=None)])[source]

Bases: BaseModel

model_config = {'extra': 'forbid', 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_post_init(context: Any, /) None

This function is meant to behave like a BaseModel method to initialize private attributes.

It takes context as an argument since that’s what pydantic-core passes when calling it.

Args:

self: The BaseModel instance. context: The context.

property name : str
property type
uri : Annotated[SimDBUrl, UrlConstraints(max_length=None, allowed_schemes=['file', 'imas'], host_required=None, default_host=None, default_port=None, default_path=None, preserve_empty_path=None)]
classmethod validate_uri(v: Annotated[SimDBUrl, UrlConstraints(max_length=None, allowed_schemes=['file', 'imas'], host_required=None, default_host=None, default_port=None, default_path=None, preserve_empty_path=None)], info)[source]
class simdb.cli.manifest.DataType(value)[source]

Bases: Enum

FILE = 3
IMAS = 4
UNKNOWN = 1
UUID = 2
class simdb.cli.manifest.Manifest(*, manifest_version: 2 = 2, alias: str | None = None, responsible_name: str | None = None, inputs: list[Source] = <factory>, outputs: list[Sink] = <factory>, metadata: Dict[str, ~typing.Any]]=<factory>)[source]

Bases: BaseModel

alias : str | None
classmethod check_deprecated_version(data: Any) Any[source]
classmethod from_template() Manifest[source]
property inputs : Iterable[Source]
inputs_raw : List[Source]
classmethod load_from_file(file_path: Path, overrides: dict | None = None) Manifest[source]
manifest_version : Literal[2]
property metadata : dict[str, Any]
metadata_raw : List[Dict[str, Any]]
model_config = {'extra': 'forbid', 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_post_init(context: Any, /) None

This function is meant to behave like a BaseModel method to initialize private attributes.

It takes context as an argument since that’s what pydantic-core passes when calling it.

Args:

self: The BaseModel instance. context: The context.

property outputs : Iterable[Sink]
outputs_raw : List[Sink]
resolve_inputs_and_outputs(info) Manifest[source]
resolve_metadata(info) Manifest[source]
responsible_name : str | None
save(out_file: TextIO) None[source]
classmethod validate_alias(v: str | None) str | None[source]
classmethod validate_metadata(v: list[dict[str, Any]]) list[dict[str, Any]][source]
classmethod validate_uris(v: list[DataObject], info) list[DataObject][source]
property version : int
class simdb.cli.manifest.ManifestV1(*, manifest_version: 1 = 1, alias: str | None = None, responsible_name: str | None = None, inputs: Dict[str, ~typing.Any]]=<factory>, outputs: Dict[str, ~typing.Any]]=<factory>, metadata: Dict[str, ~typing.Any]]=<factory>)[source]

Bases: BaseModel

Manifest schema for version 1.

Only kept around to load legacy manifests and convert them to the current (version 2) format via to_v2_data(). Inputs and outputs are carried through unchanged (both versions use the uri form) and are validated by Manifest; only the metadata layout differs between versions.

alias : str | None
inputs : List[Dict[str, Any]]
manifest_version : Literal[1]
metadata : List[Dict[str, Any]]
model_config = {'extra': 'forbid', 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

outputs : List[Dict[str, Any]]
responsible_name : str | None
to_v2_data() dict[str, Any][source]

Return the manifest as raw version 2 data ready for Manifest.

class simdb.cli.manifest.Sink(*, uri: Annotated[SimDBUrl, UrlConstraints(max_length=None, allowed_schemes=['file', 'imas'], host_required=None, default_host=None, default_port=None, default_path=None, preserve_empty_path=None)])[source]

Bases: DataObject

model_config = {'extra': 'forbid', 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_post_init(context: Any, /) None

This function is meant to behave like a BaseModel method to initialize private attributes.

It takes context as an argument since that’s what pydantic-core passes when calling it.

Args:

self: The BaseModel instance. context: The context.

class simdb.cli.manifest.Source(*, uri: Annotated[SimDBUrl, UrlConstraints(max_length=None, allowed_schemes=['file', 'imas'], host_required=None, default_host=None, default_port=None, default_path=None, preserve_empty_path=None)])[source]

Bases: DataObject

model_config = {'extra': 'forbid', 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_post_init(context: Any, /) None

This function is meant to behave like a BaseModel method to initialize private attributes.

It takes context as an argument since that’s what pydantic-core passes when calling it.

Args:

self: The BaseModel instance. context: The context.