Add explore() function and GISDocument.sidecar() method#340
Add explore() function and GISDocument.sidecar() method#340martinRenou merged 48 commits intogeojupyter:mainfrom
explore() function and GISDocument.sidecar() method#340Conversation
|
Integration tests report: appsharing.space |
9103433 to
5b96097
Compare
|
FYI @mfisher87 #419 has been merged, you can probably revive or remake this PR. |
|
Awesome work @brichet !! I hope to have some time to play with this tomorrow. |
8cd5bbc to
fe74cbf
Compare
1840aff to
829c307
Compare
3ad817a to
12fae9c
Compare
12fae9c to
44f805a
Compare
| """ | ||
| return self._layerTree.to_py() | ||
|
|
||
| def save_as(self, path: str | Path) -> None: |
There was a problem hiding this comment.
This copies the document, whereas a "save as" operation would also change the current working document to alter the new file. We don't have the comms setup to do this yet. Restored the export_to_qgis public API function for now as well.
|
BUG: The layers list is empty even when the sidecar is focused. I need to load a .jGIS file or open a notebook widget to populate the layers list, then focus back to the sidecar, and then it works. |
|
All, we gave an internal demo of this feature today, and @fperez was over the moon to see it in action, even at this early stage. Couldn't have shown it today without your support. It will be even more impressive when we show it at the conference in a couple weeks :) Thank you!! ❤️ |
|
Indeed, while there's still work to do, this is already very impressive progress!! Thanks team and congrats!!! 🚀🎉 |
|
Hey @mfisher87 I extracted the CSS fix on output views in #643, so that it can be merged independently, cherry-picking your commit. |
29e7b31 to
b47a01e
Compare
explore() function and GISDocument.sidecar() methodexplore() function and GISDocument.sidecar() method
|
All, |
|
https://jupytergis--340.org.readthedocs.build/en/340/lite/lab/ Oof. I'm not sure what's up here; jupyter-collaboration v4 is out which eliminates the RTC prefix, but we are pinned to <4. |
docs/environment-docs.yml
Outdated
| # See: https://github.com/geojupyter/jupytergis/issues/585 | ||
| - ../python/jupytergis_core | ||
| - ../python/jupytergis_lab | ||
| - ../python/jupytergis |
There was a problem hiding this comment.
I believe this is the culprit for the failure in the docs. We can't have jupytergis installed in the lite deployment of the docs.
It needs to be jupytergis_lite or nothing.
brichet
left a comment
There was a problem hiding this comment.
Thanks for working on this @mfisher87 .
I added a few comments below.
geojupyter#340 (comment) Co-authored-by: martinRenou <martin.renou@gmail.com> Co-authored-by: Nicolas Brichet <32258950+brichet@users.noreply.github.com>
66c3cd6 to
b84c701
Compare
Co-authored-by: Nicolas Brichet <32258950+brichet@users.noreply.github.com>
b84c701 to
1503af3
Compare
Co-authored-by: Nicolas Brichet <32258950+brichet@users.noreply.github.com>
Co-authored-by: martinRenou <martin.renou@gmail.com> Co-authored-by: Nicolas Brichet <32258950+brichet@users.noreply.github.com>
|
The Lite tests are still timing out 😖 |
|
@mfisher87 I tried the lite deployment in the docs, it looks like the import fails with: I assume this is the reason for the timeout (waiting for the map that never shows up in the notebook cell output because of the import error) I believe it's due to jupyterlite-xeus installing pip dependencies with Also, we should export |
Not at all, that's greatly appreciated 🙇 |
| __version__ = "0.4.4" | ||
|
|
||
| from jupytergis_lab import GISDocument # noqa | ||
| from jupytergis_lab import GISDocument, explore # noqa |
There was a problem hiding this comment.
Ahh, didn't know this was needed, thanks so much 🙇
…er#340) * Create GISDocuments as untitled when no path provided * Remove `save_as()` method from GISDocument API, re-add `export_to_qgis()` We now create untitled documents when no path is passed in, so users can use the JupyterLab facilities to rename the document. * Prefer `const` * Fix unit test * Test untitled document numbering * Update docstring * Stub out geo_debug function with jupyterlab-sidecar * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * WIP * Add ESPM-157 notebook as example user of geo-debug workflow WIP * Use correct .jGIS extension * Dunno, rebase me later * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Open JGIS in sidecar * Create an anonymous project * Open in a new JupyterLab window/tab! * Update TODO comments * Rename geo_debug -> explore Also move it up a level in the package * Explore explore function at jupytergis package * Update docstring and parameter type * Open JGIS Document as a full window, not widget * Hack around document opening but not displaying layers as expected Co-authored-by: Greg Mooney <gjmooney@asu.edu> Co-authored-by: Kristin Davis <kristin.p.davis@gmail.com> Co-authored-by: Sanjay Bhangar <sanjay@developmentseed.org> Co-authored-by: Aman Ahuja <amanahuja@gmail> Co-authored-by: Jonathan Marokhovsky <jmarokhovsky@clarku> Co-authored-by: Tammy Woodard <tawoodard@clarku.edu> * Switch back to sidecar approach, use CSS to handle filling space * Add dedicated explore example * Cleanup OBE comment * Remove OBE test * Extract sidecar-opening to GISDocument API User can open sidecar with one line of code. They can learn how to do it from reading our API docs only. * Dynamically determine type of object passed to explore() Currently only support geodataframes and GeoJSON. * Update example notebook to explore a geodataframe * Remove debugging print statement * Move "smart" layer add into GISDocument method * Add basemap parameter to `explore()` * Autodoc `explore()` * Bugfix: don't pass name=None to methods that don't support it * Fix incorrect docstring raises directive * Install jupytergis metapackage in docs environment Autogenerated docs will document `jupytergis.GISDocument` and `jupytergis.explore` instead of `jupytergis_lab.GISDocument` and `jupytergis_lab.explore`. As `jupytergis` is the package we instruct end-users to install, documenting `jupytergis_lab` is confusing. * Fix CSS to properly use vertical space in linked output & sidecar views We expect this change to be eventually included in JupyterLab: jupyterlab/jupyterlab#17487 Including in JGIS for compatibility with versions of JupyterLab that don't include this CSS. * Fix autodoc typo * Fix layer panel not updating in sidecar view Co-authored-by: Nicolas Brichet <32258950+brichet@users.noreply.github.com> * Copy docstring raises entries from underlying method docstring * Attempt to fix lite integration tests geojupyter#340 (comment) Co-authored-by: martinRenou <martin.renou@gmail.com> Co-authored-by: Nicolas Brichet <32258950+brichet@users.noreply.github.com> * Add note about CSS eventually added in JupyterLab Co-authored-by: Nicolas Brichet <32258950+brichet@users.noreply.github.com> * Move explore module into notebook subpackage Co-authored-by: Nicolas Brichet <32258950+brichet@users.noreply.github.com> * Make generic add_layer method a private internal function Co-authored-by: martinRenou <martin.renou@gmail.com> Co-authored-by: Nicolas Brichet <32258950+brichet@users.noreply.github.com> * Missing sidecar and export * Missing sidecar in docs --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Greg Mooney <gjmooney@asu.edu> Co-authored-by: Kristin Davis <kristin.p.davis@gmail.com> Co-authored-by: Sanjay Bhangar <sanjay@developmentseed.org> Co-authored-by: Aman Ahuja <amanahuja@gmail> Co-authored-by: Jonathan Marokhovsky <jmarokhovsky@clarku> Co-authored-by: Tammy Woodard <tawoodard@clarku.edu> Co-authored-by: Nicolas Brichet <32258950+brichet@users.noreply.github.com> Co-authored-by: martinRenou <martin.renou@gmail.com>



Description
Implemens the 💃 GIS Bounce 🕺 in JupyterGIS.
This is a streamlined version of the QGIS Bounce workflow.
jupytergis-explore-demo.mp4
Exploring a dataframe (example notebook) is just one line of code (excluding imports, of course 😉):
This opens a side panel with JupyterGIS displaying the data with a basemap.
Still TODO, and I don't have time today:
Checklist
Resolves #XXX.Failing lint checks can be resolved with:
pre-commit run --all-filesjlpm run lint📚 Documentation preview: https://jupytergis--340.org.readthedocs.build/en/340/
💡 JupyterLite preview is available from the doc, by clicking on