Results
lume_services.results.generic
Attributes
Classes
Result
Bases: BaseModel
Creates a data model for a result and generates a unique result hash.
Attributes
model_type
class-attribute
model_type: str = Field('generic', alias='collection')
id
class-attribute
id: Optional[str] = Field(alias='_id', exclude=True)
flow_id
class-attribute
flow_id: str
inputs
class-attribute
inputs: dict
outputs
class-attribute
outputs: dict
date_modified
class-attribute
date_modified: datetime = datetime.utcnow()
unique_on
class-attribute
unique_on: List[str] = Field(
["inputs", "outputs", "flow_id"],
alias="index",
exclude=True,
)
unique_hash
class-attribute
unique_hash: str
result_type_string
class-attribute
result_type_string: str
Classes
Config
class-attribute
allow_arbitrary_types = True
class-attribute
json_encoders = JSON_ENCODERS
class-attribute
allow_population_by_field_name = True
class-attribute
extra = Extra.forbid
Functions
validate_all
validate_all(values)
Source code in lume_services/results/generic.py
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
|
get_unique_result_index
get_unique_result_index() -> dict
Source code in lume_services/results/generic.py
78 79 |
|
insert
insert(
results_db_service: ResultsDB = Provide[
Context.results_db_service
],
)
Source code in lume_services/results/generic.py
81 82 83 84 85 86 87 88 |
|
load_from_query
classmethod
load_from_query(
query,
results_db_service: ResultsDB = Provide[
Context.results_db_service
],
)
Source code in lume_services/results/generic.py
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
|
jsonable_dict
jsonable_dict() -> dict
Source code in lume_services/results/generic.py
109 110 |
|
unique_rep
unique_rep() -> dict
Get minimal representation needed to load result object from database.
Source code in lume_services/results/generic.py
112 113 114 115 116 117 |
|
Functions
lume_services.results.impact
Attributes
Classes
ImpactResult
Bases: Result
Extends Result base and implements Impact specific attributes
Attributes
model_type
class-attribute
model_type: str = Field('Impact', alias='collection')
plot_file
class-attribute
plot_file: Optional[ImageFile]
archive
class-attribute
archive: HDF5File
pv_collection_isotime
class-attribute
pv_collection_isotime: datetime
config
class-attribute
config: dict