Closed michaeldorman closed 11 months ago
Will have a look..
Thanks @Robinlovelace
It seems like Cartopy is now installed in our Docker container, that was fast: https://github.com/geocompx/docker/actions/runs/5832735777/job/15818734044
Did that fix it @michaeldorman ?
Yes! :-) Thank you very much @Robinlovelace
I tried adding osmnx
using the same method (adding into the environment.yml
list), and now once again "Chapter 7 Geographic data I/O" isn't rendered
To solve this we need to
Let's see if that fixes it, in around 10 minutes. Hope so!
Full details from Docker build, I'm impressed at how quick packages install on the vanilla Python Docker image: https://github.com/geocompx/docker/actions/runs/5842426229/job/15843536464#step:8:2006
Does that fix it @michaeldorman ?
Looking good!
To solve this we need to
* Add it to requirements.txt, used by https://github.com/geocompx/docker/blob/master/python/Dockerfile * Rebuild the Docker image
Got it! Thanks @Robinlovelace (How do you rebuild the Docker image?)
Does that fix it @michaeldorman ?
Yes, the chapter is rendered now, thanks!
(How do you rebuild the Docker image?)
Edit any file in here and commit to the main branch (master
) and it will trigger the Docker image rebuild actions.
I think there is a similar issue now with the contextily
package, "Chapter 8 Making maps with Python" isn't rendered. The above steps didn't seem to help, will be happy to hear if you have an idea how to solve this, thanks
Great to see this https://github.com/geocompx/geocompy/commit/477ed27a6cc69b3c07c96b7bea139f6745c32aa8 now just need to rebuild the Docker container.
This is looking good to me: https://py.geocompx.org/09-mapping
Fixed right @michaeldorman ?
This is looking good to me: https://py.geocompx.org/09-mapping
Fixed right @michaeldorman ?
Yes! Thanks @Robinlovelace
Great!
I've added the richdem
package to environment.yml
, then tried to change one of the file to trigger re-building of the Docker image, but the chapter is still not rendered (https://py.geocompx.org/03-spatial-operations.html). I guess I'm missing something about Docker, will appreciate any help @Robinlovelace , thanks
Sure will take a look..
Hey @michaeldorman I took a look at the Docker repo but couldn't see any changes. Do you have push access? I just made a change, hopefully the new image will have the richdem
package in there and work :crossed_fingers:
Thanks @Robinlovelace , I checked and it's not working yet - when I uncomment the richdem
code in Chapter 3, the chapter isn't rendered anymore
I see.. I now realise that the Docker images use pip
as the package manager and use the requirements.txt:
https://github.com/geocompx/docker/blob/master/python/Dockerfile#L11
We need a way to auto update that based on environment.yml
.
Currently running
micromamba update -f environment.yml
And then
micromamba activate geocompy
conda install pip
pip freeze > requirements.txt
that should be automated..
Apologies, I now see richdem
is in https://github.com/geocompx/geocompy/blob/main/requirements.txt
Testing locally with
docker pull ghcr.io/geocompx/docker:python
Underlying problem: installation of richdem
failed: https://github.com/geocompx/docker/actions/runs/6317840710/job/17155518300#step:8:2552
This seems to be a known issue with the package: https://github.com/r-barnes/richdem/issues/65
Chapter is now back up: https://py.geocompx.org/03-spatial-operations
In the long term this is not an ideal solution. If https://github.com/r-barnes/richdem/issues/65 cannot be fixed it may be worth looking at alternatives or mentioning issues with installing the package with pip + Python 3.11.
Thanks for the thorough check @Robinlovelace ! I agree that this is not an ideal situation, if necessary perhaps we can use gdaldem
from the command line for this example, or look for other alternatives
https://gdal.org/programs/gdaldem.html looks like a great solution if it can work, surely there's a Python wrapper?
https://gdal.org/programs/gdaldem.html looks like a great solution if it can work, surely there's a Python wrapper?
I think so, will add an issue so that we remember to check it out
I think this was already completed by @Robinlovelace , so closing
Thanks for closing this Michael.
Chapter 7 Geographic data I/O isn't rendered, probably because I've added
cartopy
which wasn't in the requirements, not sure how to fix this, thanks!