Skip to content

Commit

Permalink
Merge pull request #170 from ricardogsilva/169-coverage-time-series-g…
Browse files Browse the repository at this point in the history
…eneration-fails-when-including-variable-data

fix unhashable variable
  • Loading branch information
francbartoli authored Jul 18, 2024
2 parents 6143427 + 7dde32a commit 7e9a1f4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 17 deletions.
17 changes: 0 additions & 17 deletions arpav_ppcv/operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 3 additions & 0 deletions arpav_ppcv/schemas/observations.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,9 @@ class Variable(VariableBase, table=True):
},
)

def __hash__(self):
return hash(self.id)


class VariableCreate(sqlmodel.SQLModel):
name: str
Expand Down

0 comments on commit 7e9a1f4

Please sign in to comment.