Skip to content

Commit f949b42

Browse files
authored
Merge pull request #561 from stephaniegott/remove-xarray-dep
Remove xarray dependency
2 parents abe7fac + 13365dc commit f949b42

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

ipyleaflet/leaflet.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,14 @@ class VideoOverlay(RasterLayer):
330330

331331

332332
class Velocity(Layer):
333+
try:
334+
import xarray
335+
except ModuleNotFoundError:
336+
raise ImportError(
337+
'The `xarray` module (required for use of the Velocity layer) is '
338+
'not installed.'
339+
)
340+
333341
_view_name = Unicode('LeafletVelocityView').tag(sync=True)
334342
_model_name = Unicode('LeafletVelocityModel').tag(sync=True)
335343

setup.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,7 @@ def run(self):
137137
'install_requires': [
138138
'ipywidgets>=7.5.0,<8',
139139
'traittypes>=0.2.1,<3',
140-
'xarray>=0.10',
141-
'branca>=0.3.1,<0.4'
140+
'branca>=0.3.1,<0.4',
142141
],
143142
'packages': find_packages(),
144143
'zip_safe': False,

0 commit comments

Comments
 (0)