Open Azaya89 opened 1 month ago
Your changes were successfully integrated in the dev site, make sure to review the pages of the projects you touched before merging this PR: https://holoviz-dev.github.io/examples/. You can also download an archive of the site from the workflow summary page which comes in handy when your dev site built was overriden by another PR (we have a single dev site!).
In this PR, pinning notebook<7
prevents geopandas
from being imported, so I skipped that step. This is also causing one of the CI failures.
@maximlt
In this PR, pinning
notebook<7
preventsgeopandas
from being imported, so I skipped that step.
Can you please add more details on this?
Can you please add more details on this?
When I run cell2, here's what I get:
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
Cell In[2], line 3
1 import hvplot.dask # noqa
2 import hvplot.pandas # noqa
----> 3 import geopandas as gpd
4 import colorcet as cc
5 from holoviews import opts
File ~/Documents/development/holoviz-topics-examples/nyc_buildings/envs/default/lib/python3.11/site-packages/geopandas/__init__.py:3
1 from geopandas._config import options
----> 3 from geopandas.geoseries import GeoSeries
4 from geopandas.geodataframe import GeoDataFrame
5 from geopandas.array import points_from_xy
File ~/Documents/development/holoviz-topics-examples/nyc_buildings/envs/default/lib/python3.11/site-packages/geopandas/geoseries.py:13
10 from pandas import Series, MultiIndex
11 from pandas.core.internals import SingleBlockManager
---> 13 from pyproj import CRS
14 import shapely
15 from shapely.geometry.base import BaseGeometry
File ~/Documents/development/holoviz-topics-examples/nyc_buildings/envs/default/lib/python3.11/site-packages/pyproj/__init__.py:33
1 """
2 Python interface to PROJ (https://proj.org),
3 cartographic projections and coordinate transformations library.
(...)
29 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
30 """
31 import warnings
---> 33 import pyproj.network
34 from pyproj._datadir import ( # noqa: F401 pylint: disable=unused-import
35 _pyproj_global_context_initialize,
36 set_use_global_context,
37 )
38 from pyproj._show_versions import ( # noqa: F401 pylint: disable=unused-import
39 show_versions,
40 )
File ~/Documents/development/holoviz-topics-examples/nyc_buildings/envs/default/lib/python3.11/site-packages/pyproj/network.py:10
6 from typing import Union
8 import certifi
---> 10 from pyproj._network import ( # noqa: F401 pylint: disable=unused-import
11 _set_ca_bundle_path,
12 is_network_enabled,
13 set_network_enabled,
14 )
17 def set_ca_bundle_path(ca_bundle_path: Union[Path, str, bool, None] = None) -> None:
18 """
19 .. versionadded:: 3.0.0
20
(...)
40 variables.
41 """
ImportError: dlopen(/Users/mac/Documents/development/holoviz-topics-examples/nyc_buildings/envs/default/lib/python3.11/site-packages/pyproj/_network.cpython-311-darwin.so, 0x0002): Library not loaded: @rpath/libtiff.5.dylib
Referenced from: <1BF0DA3A-18BF-3035-BAF9-9B25E936A309> /Users/mac/Documents/development/holoviz-topics-examples/nyc_buildings/envs/default/lib/libproj.25.9.3.1.dylib
Reason: tried: '/Users/mac/Documents/development/holoviz-topics-examples/nyc_buildings/envs/default/lib/libtiff.5.dylib' (no such file), '/Users/mac/Documents/development/holoviz-topics-examples/nyc_buildings/envs/default/lib/python3.11/site-packages/pyproj/../../../libtiff.5.dylib' (no such file), '/Users/mac/Documents/development/holoviz-topics-examples/nyc_buildings/envs/default/lib/python3.11/site-packages/pyproj/../../../libtiff.5.dylib' (no such file), '/Users/mac/Documents/development/holoviz-topics-examples/nyc_buildings/envs/default/bin/../lib/libtiff.5.dylib' (no such file), '/Users/mac/Documents/development/holoviz-topics-examples/nyc_buildings/envs/default/bin/../lib/libtiff.5.dylib' (no such file), '/usr/local/lib/libtiff.5.dylib' (no such file), '/usr/lib/libtiff.5.dylib' (no such file, not in dyld cache)
Ok it looks like a packaging issue. I don't understand why notebook<7
would influence geopandas though. Can you try to create an environment (conda create -n reproissue ...
) with just pyproj, geopandas and python and the versions you have in the current lock, and see if you can reproduce the error? I'm mentioning these packages only as there are the ones that show up in the traceback you shared.
Ok it looks like a packaging issue. I don't understand why
notebook<7
would influence geopandas though. Can you try to create an environment (conda create -n reproissue ...
) with just pyproj, geopandas and python and the versions you have in the current lock, and see if you can reproduce the error? I'm mentioning these packages only as there are the ones that show up in the traceback you shared.
OK, so I did create a new environment with pypoj
, geopandas
, python
, and pyarrow
and it worked well, although geopandas import took some time to load (about 20 secs):
So, i'm thinking the issue may be another dependency?
@Azaya89 can you maybe try to pin again notebook<7
in the project file, re-lock, and push the changes to Github? It'd be interesting to see whether the issue you reported shows up on the CI or not.
@Azaya89 can you maybe try to pin again
notebook<7
in the project file, re-lock, and push the changes to Github? It'd be interesting to see whether the issue you reported shows up on the CI or not.
This is not able to work because doit:test ...
fails dues to the same import errors.
This is not able to work because
doit:test ...
fails dues to the same import errors.
I would like to see it failing on the CI to see if it reports the same error that you get.
Your changes were successfully integrated in the dev site, make sure to review the pages of the projects you touched before merging this PR: https://holoviz-dev.github.io/examples/. You can also download an archive of the site from the workflow summary page which comes in handy when your dev site built was overriden by another PR (we have a single dev site!).
Your changes were successfully integrated in the dev site, make sure to review the pages of the projects you touched before merging this PR: https://holoviz-dev.github.io/examples/. You can also download an archive of the site from the workflow summary page which comes in handy when your dev site built was overriden by another PR (we have a single dev site!).
I think #199 is ready to be closed now @maximlt
Your changes were successfully integrated in the dev site, make sure to review the pages of the projects you touched before merging this PR: https://holoviz-dev.github.io/examples/. You can also download an archive of the site from the workflow summary page which comes in handy when your dev site built was overriden by another PR (we have a single dev site!).
Your changes were successfully integrated in the dev site, make sure to review the pages of the projects you touched before merging this PR: https://holoviz-dev.github.io/examples/. You can also download an archive of the site from the workflow summary page which comes in handy when your dev site built was overriden by another PR (we have a single dev site!).
@maximlt I think this PR is ready for another review with the following notes:
doit test:...
)new_nyc_buildings.parq
file is the dataset used in the notebook now and so needs to be moved to S3 to replace the old one there and then deleted from the repo.inspect_polygons
was completely deleted from the notebook as it only works with spatialpandas
not geopandas
Ok thanks for the report. Depending on the performance issues, it might be that we end up not updating the code in this example.
Ok thanks for the report. Depending on the performance issues, it might be that we end up not updating the code in this example.
:(
This is a WIP PR to help with debugging the issues I'm having with this notebook. I also uploaded the new
.parq
file together with this PR since I don't have access to uploading it on AWS.Modernizing an example checklist
Preliminary checks
Change ‘anaconda-project.yml’ to use the latest workable version of packages
hvplot<0.9
tohvplot
,panel>=0.12,<1.0
topanel>=0.12
) of all other dependencies. Removing the upper pins of dependencies could necessitate code revisions in the notebooks to address any errors encountered in the updated environment. Should complexities or extensive time requirements arise, document issues for team discussion on whether to re-pin specific packages or explore other solutions.hvplot
tohvplot>=0.9.2
,hvplot>=0.8
tohvplot>=0.9.2
). Usually, the new/updated lower pin of a dependency will be the version resolved afteranaconda prepare
has been run. Execute!conda list
in a notebook, oranaconda run conda list
in the terminal, to display the version of each dependency installed in the environment. Adjusting the lower pin helps ensure that the locks produced for each platform (linux-64, win-64, osx-64, osx-arm64) rely on the tested dependencies and not on some older versions.Plot API updates (discussed on a per-example basis)
datashade
withrasterize
(read this page). Essentially,rasterize
allows Bokeh to handle the colormapping instead of Datashader.Interactivity API updates (discussed on a per-example basis)
pn.interact
usage.param.watch()
usage. This is pretty low-level and verbose approach and should not be used in Examples unless required, or an Example is specifically trying to demo its usage in an advanced workflow.pn.bind()
. Read this page for explanation.view()
method and call it directly, update the class by inheriting frompn.viewable.Viewer
and replaceview()
by__panel__()
. Here is an example.Panel App updates (discussed on a per-example basis)
pn.Column
, or more complicated to incorporate widgets, etc. Make the final app.servable()
.command: dashboard
declaration in theanaconda-project.yml
file), try adding it.template = pn.template.BootstrampTemplate
, but if building up an app across multiple cells, it is probably cleaner to declare the template at the top withpn.extension(template='bootstrap')
. See how to guide on setting a template.General code quality updates
warnings.simplefilter(‘ignore’)
somewhere at the start of the notebook, remove this line. Try to update the code to remove the warnings, if any. If updating the code to remove the warnings is taking significant amount of time and effort, bring it up for discussion and we may decide to disable warnings again.Text content
Visual appearance - Example
Visual appearance - Gallery
Ml Annotators
toML Annotators
), if not, add/update theexamples_config.title
field inanaconda-project.yml
description
field inanaconda-project.yml
Workflow (after you have made the changes above)
doit validate:<projectname>
doit test:<projectname>
doit doc_one –name <projectname>
. It’s better if the project notebook(s) is saved with its outputs (but be sure to clear outputs before committing to the examples repo!) when building the docs. Then open this file in your browser./builtdocs/index.html
and check how the site looks.