GispoCoding / eis_toolkit

Python library for mineral prospectivity mapping
https://eis-he.eu/
European Union Public License 1.2
26 stars 8 forks source link

GDAL issues in Ubuntu environments #328

Closed nmaarnio closed 9 months ago

nmaarnio commented 9 months ago

Poetry and Docker testing workflows are failing now because they try to use too new version of GDAL. See PR #320 for example. I assume Ubuntu users who try to install the environment will encounter the same issue now. Do you have ideas how to overcome this issue @nialov? Of course users could modify locally their pyproject.toml to lock a suitable GDAL for the time of installation and revert the file after that, but this wouldn't fix the GH workflows and does not sound optimal.

nialov commented 9 months ago

So this is related to an updated poetry.lock? You probably should not update packages in poetry.lock in just any feature branch. Instead you can run poetry lock --no-update to only add needed changes from e.g. pyproject.toml changes. Anyway, if the poetry.lock update is necessary, you can try removing the restrictions in the workflows for GDAL==3.4.3:

diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index d84f933..aaed950 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -25,7 +25,7 @@ jobs:
           sudo apt-add-repository ppa:ubuntugis/ubuntugis-unstable
           sudo apt-get update
           sudo apt-get install gdal-bin libgdal-dev
-          pip install GDAL==3.4.3 poetry
+          pip install poetry
           poetry install
       - name: Test with pytest
         run: |
diff --git a/Dockerfile-docs b/Dockerfile-docs
index 198f0d2..a8dfe75 100755
--- a/Dockerfile-docs
+++ b/Dockerfile-docs
@@ -1,4 +1,4 @@
-FROM ubuntu:22.04
+FROM ubuntu:latest

 EXPOSE 8888
 EXPOSE 8000
nmaarnio commented 9 months ago

This relates us relaxing GDAL version in pyproject.toml for Conda and other releases.

There was a little bit hassle with poetry.lock in the PR I linked, but it's unrelated to this. But you're right that poetry.lock shouldn't be changed in feature branches. There was a mismatch between poetry.lock and pyproject.toml that was caused by mismanaged merge conflict, and before that some "quick fix" regarding dependencies that would have been of course better to do separately...

Regarding this GDAL issue, it seems it was enough to remove the 3.4.3 specification in tests.yml – at least the checks pass now. Can you check the PR quickly and give approval if OK?