From 7dde32afaa29589dadade7e8f4ecfa3f0c709ae0 Mon Sep 17 00:00:00 2001 From: Ricardo Garcia Silva Date: Thu, 18 Jul 2024 15:21:07 +0100 Subject: [PATCH] fix unhashable variable --- arpav_ppcv/operations.py | 17 ----------------- arpav_ppcv/schemas/observations.py | 3 +++ 2 files changed, 3 insertions(+), 17 deletions(-) diff --git a/arpav_ppcv/operations.py b/arpav_ppcv/operations.py index 0dcc3f29..e1bf1be4 100644 --- a/arpav_ppcv/operations.py +++ b/arpav_ppcv/operations.py @@ -607,23 +607,6 @@ def get_coverage_time_series( smoothed_column ].squeeze() - # for cov, data_ in raw_data.items(): - # df = _parse_ncss_dataset( - # data_, - # cov.configuration.netcdf_main_dataset_name, - # start, - # end, - # cov.identifier - # ) - # coverage_result[ - # (cov, base.CoverageDataSmoothingStrategy.NO_SMOOTHING) - # ] = df[cov.identifier].squeeze() - # for smoothing_strategy in additional_coverage_smoothing_strategies: - # df, smoothed_column = _process_coverage_smoothing_strategy( - # df, cov.identifier, smoothing_strategy, - # ignore_warnings=(not settings.debug) - # ) - # coverage_result[(cov, smoothing_strategy)] = df[smoothed_column].squeeze() if not include_coverage_data: del coverage_result[(coverage, base.CoverageDataSmoothingStrategy.NO_SMOOTHING)] for smoothing_strategy in additional_coverage_smoothing_strategies: diff --git a/arpav_ppcv/schemas/observations.py b/arpav_ppcv/schemas/observations.py index fa91b48d..e24947a3 100644 --- a/arpav_ppcv/schemas/observations.py +++ b/arpav_ppcv/schemas/observations.py @@ -194,6 +194,9 @@ class Variable(VariableBase, table=True): }, ) + def __hash__(self): + return hash(self.id) + class VariableCreate(sqlmodel.SQLModel): name: str