From a9d626486dbde2e5691c2216c0ca77b9e0ab87f7 Mon Sep 17 00:00:00 2001 From: Mark Piper Date: Tue, 22 Oct 2024 10:54:54 -0600 Subject: [PATCH 1/7] Make pretty --- docs/conf.py | 14 +++++++------- examples/pymt_geotiff-bmi_ex.py | 1 + examples/pymt_geotiff-pymt_ex.py | 1 + setup.py | 2 +- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 49670d7..cd7b141 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -48,9 +48,9 @@ master_doc = "index" # General information about the project. -project = u"pymt_geotiff" -copyright = u"2021, Mark Piper" -author = u"Mark Piper" +project = "pymt_geotiff" +copyright = "2021, Mark Piper" +author = "Mark Piper" # The version info for the project you're documenting, acts as replacement # for |version| and |release|, also used in various other places throughout @@ -149,8 +149,8 @@ ( master_doc, "pymt_geotiff.tex", - u"pymt_geotiff Documentation", - u"Mark Piper", + "pymt_geotiff Documentation", + "Mark Piper", "manual", ), ] @@ -160,7 +160,7 @@ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). -man_pages = [(master_doc, "pymt_geotiff", u"pymt_geotiff Documentation", [author], 1)] +man_pages = [(master_doc, "pymt_geotiff", "pymt_geotiff Documentation", [author], 1)] # -- Options for Texinfo output ---------------------------------------- @@ -172,7 +172,7 @@ ( master_doc, "pymt_geotiff", - u"pymt_geotiff Documentation", + "pymt_geotiff Documentation", author, "pymt_geotiff", "One line description of project.", diff --git a/examples/pymt_geotiff-bmi_ex.py b/examples/pymt_geotiff-bmi_ex.py index dcd3590..2821fff 100644 --- a/examples/pymt_geotiff-bmi_ex.py +++ b/examples/pymt_geotiff-bmi_ex.py @@ -1,4 +1,5 @@ """An example of running the babelized GeoTiff library through its BMI.""" + import numpy as np from pymt_geotiff import GeoTiff diff --git a/examples/pymt_geotiff-pymt_ex.py b/examples/pymt_geotiff-pymt_ex.py index b278827..33298d7 100644 --- a/examples/pymt_geotiff-pymt_ex.py +++ b/examples/pymt_geotiff-pymt_ex.py @@ -1,4 +1,5 @@ """Run the GeoTiff library in pymt.""" + import numpy as np from pymt.models import GeoTiff diff --git a/setup.py b/setup.py index 9748e44..7529684 100644 --- a/setup.py +++ b/setup.py @@ -16,7 +16,7 @@ def read(filename): return fp.read() -long_description = u"\n\n".join( +long_description = "\n\n".join( [read("README.rst"), read("CREDITS.rst"), read("CHANGES.rst")] ) From eaed8e7653ffaad6cd7f9890fdc58d02253b9d1a Mon Sep 17 00:00:00 2001 From: Mark Piper Date: Tue, 22 Oct 2024 10:58:42 -0600 Subject: [PATCH 2/7] Remove units from string type parameter --- meta/GeoTiff/parameters.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/meta/GeoTiff/parameters.yaml b/meta/GeoTiff/parameters.yaml index 90cab61..dff78fe 100644 --- a/meta/GeoTiff/parameters.yaml +++ b/meta/GeoTiff/parameters.yaml @@ -3,4 +3,3 @@ filename: value: type: string default: https://csdms.colorado.edu/data/SRTMGL3_36.738884_-120.168457_38.091337_-118.465576.tif - units: 1 From e71f9848b74a141619800fce67efa15cf48db080 Mon Sep 17 00:00:00 2001 From: Mark Piper Date: Tue, 22 Oct 2024 11:02:08 -0600 Subject: [PATCH 3/7] Use an absolute path to config file for bmi-tester --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index a8464fc..ff5b2e8 100644 --- a/Makefile +++ b/Makefile @@ -58,7 +58,7 @@ pretty: black setup.py pymt_geotiff examples docs test: ## run tests quickly with the default Python - bmi-test pymt_geotiff.bmi:GeoTiff --config-file=examples/bmi-geotiff.yaml --root-dir=examples -vvv + bmi-test pymt_geotiff.bmi:GeoTiff --config-file=${PWD}/examples/bmi-geotiff.yaml --root-dir=examples -vvv test-all: ## run tests on every Python version with tox tox From 1d9d85a4de5c4e8ac67d9e92e2c5199afefed79f Mon Sep 17 00:00:00 2001 From: Mark Piper Date: Tue, 22 Oct 2024 11:06:04 -0600 Subject: [PATCH 4/7] Bump Python and actions versions for testing --- .github/workflows/test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b0fe8df..230a4b1 100755 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -20,12 +20,12 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest, windows-latest] - python-version: [3.9] + python-version: ["3.11"] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - - uses: conda-incubator/setup-miniconda@v2 + - uses: conda-incubator/setup-miniconda@v3 with: auto-update-conda: true python-version: ${{ matrix.python-version }} From 4e7287aa1a73dfeaf948fed5941f5b46d00c7168 Mon Sep 17 00:00:00 2001 From: Mark Piper Date: Tue, 22 Oct 2024 11:10:27 -0600 Subject: [PATCH 5/7] Use miniforge for CI testing; don't use mamba --- .github/workflows/test.yml | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 230a4b1..86842fa 100755 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -27,10 +27,8 @@ jobs: - uses: conda-incubator/setup-miniconda@v3 with: - auto-update-conda: true + miniforge-version: latest python-version: ${{ matrix.python-version }} - channels: conda-forge - channel-priority: true - name: Show conda installation info run: | @@ -39,18 +37,14 @@ jobs: - name: Install requirements run: | - conda install mamba - mamba install --file=requirements-build.txt --file=requirements-library.txt - mamba list + conda install --file=requirements-build.txt --file=requirements-library.txt --file=requirements-testing.txt + conda list - name: Build and install package run: | pip install -e . - - name: Install testing dependencies - run: mamba install --file=requirements-testing.txt - - name: Test run: | python -c 'import pymt_geotiff' - bmi-test pymt_geotiff.bmi:GeoTiff --config-file=examples/bmi-geotiff.yaml --root-dir=examples -vvv + make test From 5a96577b064a10d12373658feb83800d1a7381b8 Mon Sep 17 00:00:00 2001 From: Mark Piper Date: Tue, 22 Oct 2024 11:20:44 -0600 Subject: [PATCH 6/7] Update URL for rasterio test image --- examples/bmi-geotiff.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/bmi-geotiff.yaml b/examples/bmi-geotiff.yaml index ddd35e4..dcf418b 100644 --- a/examples/bmi-geotiff.yaml +++ b/examples/bmi-geotiff.yaml @@ -1,2 +1,2 @@ bmi-geotiff: - filename: https://github.com/mapbox/rasterio/raw/master/tests/data/RGB.byte.tif + filename: https://github.com/rasterio/rasterio/raw/refs/heads/main/tests/data/RGB.byte.tif From 666ca4901633bbb3a1ca367f659cf4748837e959 Mon Sep 17 00:00:00 2001 From: Mark Piper Date: Tue, 22 Oct 2024 14:31:48 -0600 Subject: [PATCH 7/7] Add Python 3.13, drop 3.9 --- setup.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index 7529684..a5352d4 100644 --- a/setup.py +++ b/setup.py @@ -33,12 +33,17 @@ def read(filename): "Development Status :: 4 - Beta", "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", - "Operating System :: MacOS :: MacOS X", - "Operating System :: POSIX :: Linux", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.8", + "Operating System :: OS Independent", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: Implementation :: CPython", + "Topic :: Scientific/Engineering :: Physics", ], keywords=["bmi", "pymt"], + requires_python=">=3.10", install_requires=open("requirements.txt", "r").read().splitlines(), packages=find_packages(), entry_points=entry_points,