From fba3f9c451e373df60bf5204a011e2c7785c981a Mon Sep 17 00:00:00 2001 From: Zeb Engberg Date: Fri, 8 Sep 2023 13:56:12 -0600 Subject: [PATCH] fix test workflow for python < 3.11 --- .github/workflows/test.yaml | 2 +- pycontrails/datalib/ecmwf/common.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 841043b87..825dd83bc 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -87,7 +87,7 @@ jobs: - name: Install pycontrails (dev) run: | pip install -U pip wheel - pip install -e .[dev,docs,ecmwf,gcp,gfs,jupyter,pwlf,vis,zarr] --verbose + pip install -e .[complete] --verbose # In latest-windows, redirecting stdout to a file uses utf-16 encoding # This gives an error when ssh tries to read the key diff --git a/pycontrails/datalib/ecmwf/common.py b/pycontrails/datalib/ecmwf/common.py index d3124ee88..84953dc5c 100644 --- a/pycontrails/datalib/ecmwf/common.py +++ b/pycontrails/datalib/ecmwf/common.py @@ -146,7 +146,7 @@ def cache_dataset(self, dataset: xr.Dataset) -> None: # put each hourly file into cache cache_path = [ self.create_cachepath( - datetime.datetime.fromtimestamp(tg.tolist() / 1e9, datetime.UTC) + datetime.datetime.fromtimestamp(tg.tolist() / 1e9, datetime.timezone.utc) ) for tg in time_group ]