diff --git a/.github/workflows/test_and_publish.yml b/.github/workflows/test_and_publish.yml index fc04b1f..b7b255b 100644 --- a/.github/workflows/test_and_publish.yml +++ b/.github/workflows/test_and_publish.yml @@ -106,8 +106,8 @@ jobs: ${{ matrix.python-version.pkg_name }} libgdal libspatialite==5.0.1 - pyproj - rasterio<1.4 + pyproj<=3.6.0 + rasterio<=1.3.8 condarc: | channels: - conda-forge @@ -161,6 +161,8 @@ jobs: - name: Run the tests env: SPATIALITE_LIBRARY_PATH: /home/runner/micromamba/envs/test_${{ matrix.python-version.flag }}/lib/mod_spatialite.so + PROJ_DATA: /home/runner/micromamba/envs/test_${{ matrix.python-version.flag }}/share/proj + PROJ_LIB: /home/runner/micromamba/envs/test_${{ matrix.python-version.flag }}/share/proj COVERAGE_FILE: .coverage PYTEST_MYSQL_DB_URL: mysql://gis:gis@127.0.0.1:3307/gis PYTEST_MARIADB_DB_URL: mariadb://gis:gis@127.0.0.1:3308/gis diff --git a/requirements.txt b/requirements.txt index 48a2495..8a18f75 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,4 +6,4 @@ pytest pytest-cov pytest-html pytest-mypy -rasterio>=1.2,<1.4 +rasterio>=1.2,<=1.3.8 diff --git a/tests/gallery/test_insert_raster.py b/tests/gallery/test_insert_raster.py index 05576b3..c1e7c5d 100644 --- a/tests/gallery/test_insert_raster.py +++ b/tests/gallery/test_insert_raster.py @@ -215,6 +215,7 @@ def input_img(self, conn, tmpdir, request): with open(filename, "wb") as f: f.write(data.tobytes()) return filename, pixel_type + def test_insert_raster(self, session, conn, input_img): """Insert a TIFF image into a raster column.""" filename, pixel_type = input_img @@ -223,10 +224,7 @@ def test_insert_raster(self, session, conn, input_img): # Load the image and transform it into a WKB print("# ######################################################## #") - from osgeo import osr - print(osr.GetPROJVersionMajor()) - print(osr.GetPROJVersionMinor()) - print(osr.GetPROJSearchPaths()) + print(rasterio.show_versions()) print("# ######################################################## #") with rasterio.open(str(filename), "r+") as dataset: dataset.crs = rasterio.crs.CRS.from_epsg(4326)