Skip to content

Commit

Permalink
Extend SensorDataContext type
Browse files Browse the repository at this point in the history
  • Loading branch information
dostuffthatmatters committed Aug 11, 2023
1 parent f4d3df8 commit b359251
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "tum_esm_em27_metadata"
version = "2.0.0-rc.7"
version = "2.0.0-rc.8"
description = "Single source of truth for ESM's EM27 measurement logistics"
readme = "README.md"
authors = [
Expand Down
5 changes: 5 additions & 0 deletions tum_esm_em27_metadata/interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,9 +253,14 @@ def _get_segment_property(property_list: list[T]) -> T:
output_calibration_factors_xch4=ocf.factors_xch4,
output_calibration_factors_xco=ocf.factors_xco,
output_calibration_scheme=ocf.calibration_scheme,
multiple_ctx_on_this_date=False,
)
)

if len(sensor_data_contexts) > 1:
for ctx in sensor_data_contexts:
ctx.multiple_ctx_on_this_date = True

return sensor_data_contexts


Expand Down
2 changes: 2 additions & 0 deletions tum_esm_em27_metadata/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,3 +158,5 @@ class SensorDataContext(pydantic.BaseModel):
output_calibration_factors_xch4: list[float]
output_calibration_factors_xco: list[float]
output_calibration_scheme: Optional[str]

multiple_ctx_on_this_date: bool

0 comments on commit b359251

Please sign in to comment.