forked from venetoarpa/arpav-cline-backend
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added bootstrap command for observation series configurations
- Loading branch information
1 parent
5797509
commit 150b4ea
Showing
19 changed files
with
959 additions
and
800 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
78 changes: 78 additions & 0 deletions
78
arpav_ppcv/bootstrapper/observation_series_configurations.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
from ..schemas.climaticindicators import ClimaticIndicator | ||
from ..schemas.observations import ObservationSeriesConfigurationCreate | ||
from ..schemas.static import ( | ||
MeasurementAggregationType, | ||
ObservationStationManager, | ||
) | ||
|
||
|
||
def generate_observation_series_configurations( | ||
indicators: dict[str, ClimaticIndicator], | ||
) -> list[ObservationSeriesConfigurationCreate]: | ||
return [ | ||
ObservationSeriesConfigurationCreate( | ||
climatic_indicator_id=indicators["hdds-absolute-annual"].id, | ||
measurement_aggregation_type=MeasurementAggregationType.YEARLY, | ||
station_managers=[ObservationStationManager.ARPAV], | ||
), | ||
ObservationSeriesConfigurationCreate( | ||
climatic_indicator_id=indicators["cdds-absolute-annual"].id, | ||
measurement_aggregation_type=MeasurementAggregationType.YEARLY, | ||
station_managers=[ObservationStationManager.ARPAV], | ||
), | ||
ObservationSeriesConfigurationCreate( | ||
climatic_indicator_id=indicators["tas-absolute-annual"].id, | ||
measurement_aggregation_type=MeasurementAggregationType.SEASONAL, | ||
station_managers=[ObservationStationManager.ARPAV], | ||
), | ||
ObservationSeriesConfigurationCreate( | ||
climatic_indicator_id=indicators["tas-absolute-annual"].id, | ||
measurement_aggregation_type=MeasurementAggregationType.YEARLY, | ||
station_managers=[ObservationStationManager.ARPAV], | ||
), | ||
ObservationSeriesConfigurationCreate( | ||
climatic_indicator_id=indicators["tasmax-absolute-annual"].id, | ||
measurement_aggregation_type=MeasurementAggregationType.SEASONAL, | ||
station_managers=[ObservationStationManager.ARPAV], | ||
), | ||
ObservationSeriesConfigurationCreate( | ||
climatic_indicator_id=indicators["tasmax-absolute-annual"].id, | ||
measurement_aggregation_type=MeasurementAggregationType.YEARLY, | ||
station_managers=[ObservationStationManager.ARPAV], | ||
), | ||
ObservationSeriesConfigurationCreate( | ||
climatic_indicator_id=indicators["tasmin-absolute-annual"].id, | ||
measurement_aggregation_type=MeasurementAggregationType.SEASONAL, | ||
station_managers=[ObservationStationManager.ARPAV], | ||
), | ||
ObservationSeriesConfigurationCreate( | ||
climatic_indicator_id=indicators["tasmin-absolute-annual"].id, | ||
measurement_aggregation_type=MeasurementAggregationType.YEARLY, | ||
station_managers=[ObservationStationManager.ARPAV], | ||
), | ||
ObservationSeriesConfigurationCreate( | ||
climatic_indicator_id=indicators["pr-absolute-annual"].id, | ||
measurement_aggregation_type=MeasurementAggregationType.SEASONAL, | ||
station_managers=[ObservationStationManager.ARPAV], | ||
), | ||
ObservationSeriesConfigurationCreate( | ||
climatic_indicator_id=indicators["pr-absolute-annual"].id, | ||
measurement_aggregation_type=MeasurementAggregationType.YEARLY, | ||
station_managers=[ObservationStationManager.ARPAV], | ||
), | ||
ObservationSeriesConfigurationCreate( | ||
climatic_indicator_id=indicators["tr-absolute-annual"].id, | ||
measurement_aggregation_type=MeasurementAggregationType.YEARLY, | ||
station_managers=[ObservationStationManager.ARPAV], | ||
), | ||
ObservationSeriesConfigurationCreate( | ||
climatic_indicator_id=indicators["su30-absolute-annual"].id, | ||
measurement_aggregation_type=MeasurementAggregationType.YEARLY, | ||
station_managers=[ObservationStationManager.ARPAV], | ||
), | ||
ObservationSeriesConfigurationCreate( | ||
climatic_indicator_id=indicators["fd-absolute-annual"].id, | ||
measurement_aggregation_type=MeasurementAggregationType.YEARLY, | ||
station_managers=[ObservationStationManager.ARPAV], | ||
), | ||
] |
Oops, something went wrong.