Windows: Add Jupyter dependencies to GRASS daily builds#6289
Windows: Add Jupyter dependencies to GRASS daily builds#6289echoix merged 2 commits intoOSGeo:mainfrom
Conversation
wenzeslaus
left a comment
There was a problem hiding this comment.
The relation of python3-jupyterlab and python3-jupyter-server is not clear to me, but that's probably fine. The python3-ipython is for the interactive shell without notebook, no? But including it makes sense. Anyway, I can see reasons for including these on Windows even without the GUI additions.
@landam Any comments on this?
@wenzeslaus I’ve looked into this in more detail, especially regarding the dependencies of the different packages as you mentioned - I have found the nice figure of it: https://docs.jupyter.org/en/latest/_images/repos_map.png which hopefully clarifies it a bit. Going also through the dependencies at OSGeo4W https://download.osgeo.org/osgeo4w/v2/x86_64/release/python3/, now I’m leaning towards this approach: just installing the full python3-jupyter metapackage. It includes the following dependencies: JupyterLab is probably a bit overkill since in reality we would only need python3-ipykernel (ipython is included in ipykernel), python3-ipywidgets, python3-notebook, and python3-jupyter-server. But the issue is that in the new version of python3-notebook, the python3-jupyterlab is already listed as a requirement (so we would have to install the previous version, see orig file in https://download.osgeo.org/osgeo4w/v2/x86_64/release/python3/python3-notebook/) And at the same time, python3-jupyter-server is already included within python3-jupyterlab. So it seems to me better to simply use a single python3-jupyter package - we might end up installing a few extra things, but it will be clear and simple. Do you agree @wenzeslaus (maybe also @echoix and @nilason are you in? :-)) |
41544a2 to
f50a573
Compare
|
That sounds reasonable to me. It looks like there is no folium or ipyleaflet, which means we can't add it? |
echoix
left a comment
There was a problem hiding this comment.
Is the GitHub workflow already updated for this? (Because we don't install GRASS from the OSGeo4W installer, we build it ourselves in CI)
After merged and working, a PR to the OSGeo4W would be needed with the final solution. It doesn't use that hint file, it creates it inline in the script
@echoix Thank you very much for the comment - I’m a bit confused now as I found in this commit 6325a18 that the GitHub workflow was already updated for Jupyter quite a while ago (actually by you :-)). I had been under the impression that Jupyter support on Windows wasn’t available yet at all. But I’m not sure what exactly it means to have Jupyter included in OSGeo4W.yml. Does it imply that we already have full Jupyter support for Windows, including daily builds on the CVUT server (https://wingrass.fsv.cvut.cz/grass85/)? I’m afraid probably not, since as far as I know, the OSGeo4W workflow is not used there, and I haven’t found these dependencies referenced anywhere else in the GRASS codebase except the file mswindows/osgeo4w/setup.hint.tmpl – so I thought that this file still plays a role in the Wingrass daily builds - is that true, or is this file completely obsolete? I’m a bit lost here, and I think others might be too — so some clarification would really help. And it looks like you, @echoix, probably know the most about this at the moment.;) Also, another question – I found these global builds of OSGeo4W https://github.com/jef-n/OSGeo4W/blob/master/src/grass/osgeo4w/package.sh - do I suppose right that the jupyter dependency (and possibly other dependencies @kratochanna mentioned) should be added to this file? |
|
Btw, I did a comparison of the three places with dependencies and it seems that setup.hint.tmpl is really kind of obsolete but also some kind of important things being in OSGeo4W.yml are missing in osgeo4w package namely e.g. python3-matplotlib and python3-numpy. But I am new to the wingrass issues so I might be completely out of scope :-) so more explanations of how it currently works would be great @echoix.
|
I think so.. That is a really good point as without these libraries we would not be able to display any interactive maps in Jupyter notebooks.. @petrasovaa Do you agree if I make an issue for it at OSGeo4W? |
|
The situation is kinda weird. From what I understand, historically, OSGeo4W managed to get some builds for GRASS to work. Then, we duplicated their build files in our repo, to get our own standalone builds based on that. OSGeo4W might not have ever used these build files. Then, OSGeo4W changed a bit the way they defined the build files, but we never changed. So we diverge a bit. That's why we have two separate .sh that do almost the same. One that is used by OSGeo4W, and one that is used by us in CI. That difference has already bitten us. The workflow in CI is only for CI and the tests done there. The standalone builds are made on a server managed by Martin Landa if I understand correctly. I have no insights on how it is isolated, how dependencies work and how they get updated. Also, I don't think the OSGeo4W repo allows filing in issues. |
Well, thank you @echoix for the explanation - I get it .. kind of :-) But it is really hard to understand how this whole win build stuff works.
I am almost 100% sure that the file changed in this PR is the one needed for the Martin daily builds but I also do not understand the procedure - It took quite a long time to me to go through files in wingrass-maintainance repo and only thing I have is a big head ;-). Anyway I think we can merge this - @echoix what do you think?
I made the PR at OSGeoW4, would be great if anyone would look at it and give a thumb or so that agrees :-): jef-n/OSGeo4W#36 |
|
The other PR for OSGeo4W is already opened |
This PR updates the GRASS setup.hint.tmpl template to include dependencies for running Jupyter notebooks inside GRASS.
It adds the following packages to requires: section:
python3-jupyterlab – provides the JupyterLab interface.
python3-jupyter-server – the backend server for Jupyter notebooks.
python3-ipykernel – allows Python code execution in notebooks.
python3-ipython – interactive Python shell for notebook execution.
python3-ipywidgets – supports interactive widgets in notebooks.
Next steps:
Once tested in daily builds, these dependencies will also need to be added to the official OSGeo4W build: https://github.com/jef-n/OSGeo4W/blob/master/src/grass/osgeo4w/package.sh