Skip to content
Open
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
687820b
Refactor dependencies to make more optional
Sevans711 Jul 6, 2026
5507e83
fix: forgot to pre-commit run --all-files
Sevans711 Jul 6, 2026
3c174b2
fix missing import GeoAxes; missing pooch
Sevans711 Jul 6, 2026
13e1d6d
Merge branch 'main' into refactor-optional-dependencies
Sevans711 Jul 9, 2026
cb8c8a3
hvplot dependency is now optional
Sevans711 Jul 9, 2026
75460f2
installation docs page update for optional deps
Sevans711 Jul 9, 2026
70eac2f
Merge branch 'main' into refactor-optional-dependencies
Sevans711 Jul 10, 2026
96fb92c
remove confusing comment on hvplot depedency
Sevans711 Jul 10, 2026
8ce78cb
Merge branch 'main' into refactor-optional-dependencies
Sevans711 Jul 15, 2026
ce0b1be
Merge branch 'main' into refactor-optional-dependencies
Sevans711 Jul 22, 2026
7bb63cb
Merge branch 'main' into refactor-optional-dependencies
Sevans711 Jul 30, 2026
e8e36e2
Merge branch 'main' into refactor-optional-dependencies
Sevans711 Aug 6, 2026
9f3c17c
put cartopy in geo AND viz dependency groups
Sevans711 Aug 6, 2026
62eaa74
restore datashader dependency, explain in comment
Sevans711 Aug 7, 2026
a0f785e
Merge branch 'main' into refactor-optional-dependencies
Sevans711 Aug 10, 2026
8e12017
Merge branch 'main' into refactor-optional-dependencies
Sevans711 Aug 10, 2026
05e528c
Merge branch 'main' into refactor-optional-dependencies
Sevans711 Aug 14, 2026
d5323d4
Merge branch 'main' into refactor-optional-dependencies
Sevans711 Aug 17, 2026
6c8176d
Merge branch 'main' into refactor-optional-dependencies
Sevans711 Aug 19, 2026
bc6f92b
Merge branch 'main' into refactor-optional-dependencies
Sevans711 Aug 20, 2026
e94e00d
improve installation docs page
Sevans711 Aug 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions docs/getting-started/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ To install UXarray with its recommended dependencies using the conda command lin

.. note::

Conda automatically installs Xarray and every other required
dependency (including non‑Python libraries).
Conda automatically installs Xarray, all other required depdencies,
and all optional dependencies too (including non‑Python libraries).

Installing with pip
-------------------
Expand All @@ -37,11 +37,16 @@ This installs the *minimal* required dependencies. UXarray also provides optiona
.. code-block:: bash

pip install "uxarray[dev]" # development tools
pip install "uxarray[geo]" # geospatial tools (e.g. geopandas, healpix)
pip install "uxarray[viz]" # plotting tools (e.g. matplotlib, hvplot)
pip install "uxarray[complete]" # all optional features

A complete list of extras lives in the ``[project.optional-dependencies]``
A complete list of optional dependencies lives in the ``[project.optional-dependencies]``
section of our `pyproject.toml <https://github.com/UXARRAY/uxarray/blob/main/pyproject.toml>`_

Optional extras can also be combined, e.g. ``pip install "uxarray[geo,viz]"`` installs with
all required dependencies plus all optional dependencies for geospatial and plotting tools.


Installing from source
----------------------
Expand All @@ -67,7 +72,7 @@ Installing from source is intended mainly for developers.

.. code-block:: bash

pip install .
pip install ".[complete]" # test suite relies on optional dependencies

#. **Run the test suite**

Expand Down
40 changes: 25 additions & 15 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,35 +23,45 @@ requires-python = ">=3.10"
# minimal dependencies start
dependencies = [
"antimeridian",
"cartopy",
"dask[dataframe]",
"datashader",
"geoviews",
"holoviews",
"matplotlib<3.11", # matplotlib 3.11.0 breaks some plots but <3.11 is fine; see issue #1542.
"matplotlib-inline",
"netcdf4",
"numba>=0.63", # 0.63 is the first release supporting Python 3.14 (3.10 <= py < 3.15). See #1561.
"numpy",
"pandas",
"pyarrow",
"requests",
"scikit-learn",
"scipy",
"shapely",
"spatialpandas",
"geopandas",
"xarray",
"hvplot",
"healpix",
"polars",
"pyproj"
]
# minimal dependencies end

[project.optional-dependencies]
complete = ["uxarray[dev]"]
dev = ['pre_commit', 'pytest', 'pytest-cov', 'ruff', 'asv']
all = ["uxarray[dev,geo,viz]"]
complete = ["uxarray[dev,geo,viz]"] # alias to "all"
dev = [
'asv',
'pooch',
'pre_commit',
'pytest',
'pytest-cov',
'ruff',
]
geo = [
"cartopy", # in both geo and viz it is needed by to_geodataframe() and by plotting routines.
"geopandas",
"healpix",
"pyproj",
"spatialpandas",
]
viz = [
"cartopy",
"datashader",
"matplotlib<3.11", # matplotlib 3.11.0 breaks some plots but <3.11 is fine; see issue #1542.
"geoviews",
"holoviews",
"hvplot",
]

[project.urls]
Documentation = "https://uxarray.readthedocs.io/"
Expand Down
3 changes: 3 additions & 0 deletions uxarray/plot/accessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,9 @@ def polygons(
project=False,
)

# import datashader # no need to import explicitly, but gets used below when rasterize=True.
# (commented here for future reference, since datashader appears in uxarray dependency list,
# but it isn't imported explicitly anywhere in uxarray. For more details see PR #1548.)
return gdf.hvplot.polygons(
c=self._uxda.name if self._uxda.name is not None else "var",
rasterize=rasterize,
Expand Down