Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Nov 2, 2023
1 parent 8812ca3 commit f5f4e10
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions recipes/mursst/recipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,18 +67,14 @@ class Preprocess(beam.PTransform):

@staticmethod
def _preproc(item: Indexed[T]) -> Indexed[T]:
SELECTED_VARS = {
'analysed_sst',
'analysis_error',
'mask',
'sea_ice_fraction'
}
SELECTED_VARS = {'analysed_sst', 'analysis_error', 'mask', 'sea_ice_fraction'}
index, ds = item
return index, ds.drop([k for k in ds.data_vars.keys() if k not in SELECTED_VARS])

def expand(self, pcoll: beam.PCollection) -> beam.PCollection:
return pcoll | beam.Map(self._preproc)


# use HTTP_REL if S3 access is not possible. S3_REL is faster.
selected_rel = S3_REL
pattern = pattern_from_file_sequence(
Expand Down

0 comments on commit f5f4e10

Please sign in to comment.