Required
_type| Type: | type | ABCMeta |
| Description: | The type to find corresponding entity string for. Allowed to be subtype of defined entity types. |
entity_type string as used in Salvus'
entity component.def type_to_entity_string(_type: type | ABCMeta) -> str: ...| Type: | type | ABCMeta |
| Description: | The type to find corresponding entity string for. Allowed to be subtype of defined entity types. |
strclass EntityComponent(builtins.object):
def __init__(
self, project: salvus.project.project.Project, path: pathlib.Path
): ...| Type: | salvus.project.project.Project |
| Description: | The project. |
| Type: | pathlib.Path |
| Description: | The path where the entities are stored within the project. |
def add(
self,
entity: typing.Any,
overwrite: bool = False,
skip_validation: bool = True,
timer: Timer | None = None,
log_to_logger: bool = False,
comm: int | None = None,
) -> None: ...| Type: | typing.Any |
| Description: | The entity to add. |
| Type: | bool |
| Default value: | False |
| Description: | Potentially overwrite an existing thing in project if it already exists. |
| Type: | bool |
| Default value: | True |
| Description: | If set to true, any validation steps are skipped. This currently only affects mesh QC. |
| Type: | Timer | None |
| Default value: | None |
| Description: | Execution timer. |
| Type: | bool |
| Default value: | False |
| Description: | Log timings to the logger. |
| Type: | int | None |
| Default value: | None |
| Description: | MPI communicator, if any. |
def delete(self, entity_type: str, entity_name: str) -> None: ...| Type: | str |
| Description: | The type of entity to delete. |
| Type: | str |
| Description: | The name of the entity. |
def get(
self,
entity_type: str,
entity_name: str,
comm: int | None = None,
max_wait_time_if_mpi_in_seconds: float = 5.0,
) -> typing.Any: ...| Type: | str |
| Description: | The type of entity to get. |
| Type: | str |
| Description: | The name of the entity. |
| Type: | int | None |
| Default value: | None |
| Description: | MPI communicator for distributed meshes and models, if any. |
| Type: | float |
| Default value: | 5.0 |
| Description: | If the file for an entity is not found and a communicator is passed, wait for up to this long for the filesystem to catch up. |
def get_all(self, entity_type: str) -> dict[str, typing.Any]: ...| Type: | str |
| Description: | The type of entities to get. |
def get_inverse_problem_configurations(
self, inversions: typing.Sequence[str] | None = None
) -> dict[str, InverseProblemConfiguration]: ...| Type: | typing.Sequence[str] | None |
| Default value: | None |
| Description: | Inversions to return the objects for. Omitting this parameter returns all inversion problem configurations related to the project. |
def has(self, entity_type: str, entity_name: str) -> bool: ...| Type: | str |
| Description: | The type of entity to get. |
| Type: | str |
| Description: | The name of the entity. |
def list(self, entity_type: str) -> list[str]: ...| Type: | str |
| Description: | The type of the entities to list. |