diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index ffd714b..8f8674e 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -12,9 +12,9 @@ jobs: deploy: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Set up Python 3.9 - uses: actions/setup-python@v2 + - uses: actions/checkout@v3 + - name: Set up Python 3.12 + uses: actions/setup-python@v4 with: python-version: 3.x - name: Install dependencies diff --git a/.github/workflows/testrunner.yml b/.github/workflows/testrunner.yml index 429115a..bd11d57 100644 --- a/.github/workflows/testrunner.yml +++ b/.github/workflows/testrunner.yml @@ -14,13 +14,13 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Github repo with LFS - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: lfs: true - - name: Set up Python 3.9 - uses: actions/setup-python@v2 + - name: Set up Python 3.12 + uses: actions/setup-python@v4 with: - python-version: 3.9 + python-version: 3.12 - name: Install dependencies run: | python -m pip install --upgrade pip diff --git a/setup.cfg b/setup.cfg index 5bd4cfb..94c9b22 100644 --- a/setup.cfg +++ b/setup.cfg @@ -26,10 +26,10 @@ classifiers = #scripts=scripts, scripts = ['create_sidecar_files.py'] [options] packages = find: -python_requires = >=3.7 +python_requires = >=3.12 install_requires = pyhdf>=0.10.5 - numpy>=1.23.1 + numpy>=2.2.1 netCDF4>=1.6.0 xarray>=2022.6.0 pystare>=0.8.9 diff --git a/staremaster/create_sidecar_files.py b/staremaster/create_sidecar_files.py index 555495a..6c4e7fb 100755 --- a/staremaster/create_sidecar_files.py +++ b/staremaster/create_sidecar_files.py @@ -64,7 +64,7 @@ def list_granules(folder, product): if not product: product = '' files = glob.glob(folder + '/*') - pattern = '.*{product}.*[^_stare]\.(nc|hdf|HDF5)'.format(product=product.upper()) + pattern = rf'.*{product}.*[^_stare]\.(nc|hdf|HDF5)'.format(product=product.upper()) granules = list(filter(re.compile(pattern).match, files)) return granules diff --git a/staremaster/find_missing_sidecars.py b/staremaster/find_missing_sidecars.py index d5028c8..ff2a087 100755 --- a/staremaster/find_missing_sidecars.py +++ b/staremaster/find_missing_sidecars.py @@ -10,15 +10,15 @@ def get_granule_paths(folder, granule_pattern): granule_paths = sorted(glob.glob(os.path.expanduser(folder) + '/' + '*' )) - pattern = '.*/{}.*[^_stare]\.(nc|hdf|HDF5)'.format(granule_pattern) - granule_paths = list(filter(re.compile(pattern).match, granule_paths)) + pattern = rf'.*/{granule_pattern}.*[^_stare]\.(nc|hdf|HDF5)' + granule_paths = list(filter(re.compile(pattern).match, granule_paths)) return granule_paths def get_sidecar_paths(folder, granule_pattern): sidecar_paths = sorted(glob.glob(os.path.expanduser(folder) + '/' + '*' )) - pattern = '.*/{}.*_stare\.(nc|hdf|HDF5)'.format(granule_pattern) - sidecar_paths = list(filter(re.compile(pattern).match, sidecar_paths)) + pattern = rf'.*/{granule_pattern}.*_stare\.(nc|hdf|HDF5)' + sidecar_paths = list(filter(re.compile(pattern).match, sidecar_paths)) return sidecar_paths diff --git a/tox.ini b/tox.ini index 54998a1..02012e6 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py36,py37,py38,py39 +envlist = py312,py313 [testenv] changedir = tests