diff options
author | Dom Heinzeller <dom.heinzeller@icloud.com> | 2024-12-05 19:20:55 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-05 18:20:55 -0800 |
commit | b808338792f7e3f45436fe62df86e87e9c0661aa (patch) | |
tree | f9db8c977059e0e5afa729775a4e93b868770b62 /var | |
parent | 112e47cc2367b888f7cd09fe37973b1843d67984 (diff) | |
download | spack-b808338792f7e3f45436fe62df86e87e9c0661aa.tar.gz spack-b808338792f7e3f45436fe62df86e87e9c0661aa.tar.bz2 spack-b808338792f7e3f45436fe62df86e87e9c0661aa.tar.xz spack-b808338792f7e3f45436fe62df86e87e9c0661aa.zip |
py-uxarray: new package plus dependencies (#47573)
* Add py-param@2.1.1
* Add py-panel@1.5.2
* Add py-bokeh@3.5.2
* New package py-datashader
* New package py-geoviews
* New package py-holoviews
* WIP: new package py-uxarray
* New package py-antimeridian
* New package py-dask-expr
* New package py-spatialpandas
* New package py-hvplot
* Add dependency on py-dask-expr for 'py-dask@2024.3: +dataframe'
* Added all dependencies for py-uxarray; still having problems with py-dask +dataframe / py-dask-expr
* Fix style errors in many packages
* Clean up comments and fix style errors in var/spack/repos/builtin/packages/py-dask-expr/package.py
* In var/spack/repos/builtin/packages/py-dask/package.py: since 2023.8, the dataframe variant requires the array variant
* Fix style errors in py-uxarray package
Diffstat (limited to 'var')
12 files changed, 328 insertions, 13 deletions
diff --git a/var/spack/repos/builtin/packages/py-antimeridian/package.py b/var/spack/repos/builtin/packages/py-antimeridian/package.py new file mode 100644 index 0000000000..31b2d20308 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-antimeridian/package.py @@ -0,0 +1,24 @@ +# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack.package import * + + +class PyAntimeridian(PythonPackage): + """Fix shapes that cross the antimeridian.""" + + homepage = "https://antimeridian.readthedocs.io/" + pypi = "antimeridian/antimeridian-0.3.11.tar.gz" + git = "https://github.com/gadomski/antimeridian.git" + + license("Apache-2.0") + + version("0.3.11", sha256="fde0134e6799676ec68765d3e588f5f32cabd4041b1f969b923758d0a6cd0c7f") + + depends_on("python@3.10:", type=("build", "run")) + depends_on("py-hatchling", type="build") + + depends_on("py-numpy@1.22.4:", type="run") + depends_on("py-shapely@2:", type="run") diff --git a/var/spack/repos/builtin/packages/py-bokeh/package.py b/var/spack/repos/builtin/packages/py-bokeh/package.py index 1384201b2d..429dfd8ddf 100644 --- a/var/spack/repos/builtin/packages/py-bokeh/package.py +++ b/var/spack/repos/builtin/packages/py-bokeh/package.py @@ -14,6 +14,7 @@ class PyBokeh(PythonPackage): license("BSD-3-Clause") + version("3.5.2", sha256="03a54a67db677b8881834271c620a781b383ae593af5c3ea2149164754440d07") version("3.3.1", sha256="2a7b3702d7e9f03ef4cd801b02b7380196c70cff2773859bcb84fa565218955c") version("2.4.3", sha256="ef33801161af379665ab7a34684f2209861e3aefd5c803a21fbbb99d94874b03") version("2.4.1", sha256="d0410717d743a0ac251e62480e2ea860a7341bdcd1dbe01499a904f233c90512") @@ -33,6 +34,7 @@ class PyBokeh(PythonPackage): depends_on("python@3.7:", type=("build", "run"), when="@2.4.0:") depends_on("python@3.8:", type=("build", "run"), when="@3.0.0:") depends_on("python@3.9:", type=("build", "run"), when="@3.2.0:") + depends_on("python@3.10:", type=("build", "run"), when="@3.5.0:") depends_on("py-requests@1.2.3:", type=("build", "run"), when="@0.12.2") depends_on("py-six@1.5.2:", type=("build", "run"), when="@:1.3.4") @@ -42,6 +44,7 @@ class PyBokeh(PythonPackage): depends_on("py-jinja2@2.9:", type=("build", "run"), when="@2.3.3:") depends_on("py-contourpy@1:", type=("build", "run"), when="@3:") + depends_on("py-contourpy@1.2:", type=("build", "run"), when="@3.5:") depends_on("py-numpy@1.7.1:", type=("build", "run")) depends_on("py-numpy@1.11.3:", type=("build", "run"), when="@2.3.3:") @@ -60,6 +63,7 @@ class PyBokeh(PythonPackage): depends_on("py-tornado@4.3:", type=("build", "run")) depends_on("py-tornado@5.1:", type=("build", "run"), when="@2.3.3:") + depends_on("py-tornado@6.2:", type=("build", "run"), when="@3.5:") depends_on("py-typing-extensions@3.7.4:", type=("build", "run"), when="@2.3.3:3.0.0") depends_on("py-typing-extensions@3.10.0:", type=("build", "run"), when="@2.4.0:3.0.0") diff --git a/var/spack/repos/builtin/packages/py-dask-expr/package.py b/var/spack/repos/builtin/packages/py-dask-expr/package.py new file mode 100644 index 0000000000..bed0fe2010 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-dask-expr/package.py @@ -0,0 +1,26 @@ +# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack.package import * + + +class PyDaskExpr(PythonPackage): + """Dask DataFrames with query optimization.""" + + homepage = "https://github.com/dask/dask-expr" + url = "https://github.com/dask/dask-expr/archive/refs/tags/v1.1.9.tar.gz" + + license("BSD-3-Clause") + + version("1.1.9", sha256="e5a1b82de1142c29fed899a80541a98ca5e12cb85ce9d86bc8ada204a22599d3") + + depends_on("python@3.10:", type=("build", "run")) + depends_on("py-setuptools@62.6:", type="build") + depends_on("py-versioneer@0.28+toml", type="build") + + # Can't do circular run-time dependencies yet? + # depends_on("py-dask@2024.7.1", type="run") + depends_on("py-pyarrow@7: +dataset", type="run") + depends_on("py-pandas@2:", type="run") diff --git a/var/spack/repos/builtin/packages/py-dask/package.py b/var/spack/repos/builtin/packages/py-dask/package.py index d117823869..8783a8b8b8 100644 --- a/var/spack/repos/builtin/packages/py-dask/package.py +++ b/var/spack/repos/builtin/packages/py-dask/package.py @@ -38,6 +38,8 @@ class PyDask(PythonPackage): description="Install requirements for dask.delayed (dask.imperative)", ) + conflicts("~array", when="@2023.8: +dataframe", msg="From 2023.8, +dataframe requires +array") + depends_on("python@3.8:", type=("build", "run"), when="@2022.10.2:") depends_on("py-setuptools", type="build") @@ -99,6 +101,9 @@ class PyDask(PythonPackage): depends_on("py-partd@0.3.10:", type=("build", "run"), when="@:2021.3.0 +dataframe") # The dependency on py-fsspec is non-optional starting version 2021.3.1 depends_on("py-fsspec@0.6.0:", type=("build", "run"), when="@:2021.3.0 +dataframe") + # Starting with version 2024.3.0, dataframe requires a separate package py-dask-expr + depends_on("py-dask-expr", type=("build", "run"), when="@2024.3: +dataframe") + depends_on("py-dask-expr@1.1.9", type=("build", "run"), when="@2024.7.1 +dataframe") # Requirements for dask.distributed depends_on( diff --git a/var/spack/repos/builtin/packages/py-datashader/package.py b/var/spack/repos/builtin/packages/py-datashader/package.py new file mode 100644 index 0000000000..6b87b7c407 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-datashader/package.py @@ -0,0 +1,39 @@ +# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack.package import * + + +class PyDatashader(PythonPackage): + """Datashader is a data rasterization pipeline for automating the process of creating + meaningful representations of large amounts of data""" + + homepage = "https://datashader.org" + pypi = "datashader/datashader-0.16.3.tar.gz" + git = "https://github.com/holoviz/datashader.git" + + license("BSD-3-Clause", checked_by="climbfuji") + + version("0.16.3", sha256="9d0040c7887f7a5a5edd374c297402fd208a62bf6845e87631b54f03b9ae479d") + + # pyproject.toml + depends_on("python@3.9:", type=("build", "run")) + depends_on("py-pyct", type=("build", "run")) + depends_on("py-hatchling", type="build") + depends_on("py-hatch-vcs", type="build") + depends_on("py-param", type=("build", "run")) + + depends_on("py-colorcet", type="run") + depends_on("py-dask", type="run") + depends_on("py-multipledispatch", type="run") + depends_on("py-numba", type="run") + depends_on("py-numpy", type="run") + depends_on("py-packaging", type="run") + depends_on("py-pandas", type="run") + depends_on("py-pillow", type="run") + depends_on("py-requests", type="run") + depends_on("py-scipy", type="run") + depends_on("py-toolz", type="run") + depends_on("py-xarray", type="run") diff --git a/var/spack/repos/builtin/packages/py-geoviews/package.py b/var/spack/repos/builtin/packages/py-geoviews/package.py new file mode 100644 index 0000000000..03c2b7fb4d --- /dev/null +++ b/var/spack/repos/builtin/packages/py-geoviews/package.py @@ -0,0 +1,34 @@ +# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack.package import * + + +class PyGeoviews(PythonPackage): + """A Python library designed to make data analysis and visualization seamless and simple.""" + + homepage = "https://geoviews.org/" + pypi = "geoviews/geoviews-1.13.0.tar.gz" + git = "https://github.com/holoviz/geoviews.git" + + license("BSD-3-Clause", checked_by="climbfuji") + + version("1.13.0", sha256="7554a1e9114995acd243546fac6c6c7f157fc28529fde6ab236a72a6e77fe0bf") + # version("1.12.0", sha256="e2cbef0605e8fd1529bc643a31aeb61997f8f93c9b41a5aff8b2b355a76fa789") + + depends_on("python@3.10:", type=("build", "run")) + depends_on("py-hatchling", type="build") + depends_on("py-hatch-vcs", type="build") + depends_on("py-bokeh@3.5", type=("build", "run")) + + depends_on("py-cartopy@0.18:", type="run") + depends_on("py-holoviews@1.16:", type="run") + depends_on("py-numpy", type="run") + depends_on("py-packaging", type="run") + depends_on("py-panel@1:", type="run") + depends_on("py-param", type="run") + depends_on("py-pyproj", type="run") + depends_on("py-shapely", type="run") + depends_on("py-xyzservices", type="run") diff --git a/var/spack/repos/builtin/packages/py-holoviews/package.py b/var/spack/repos/builtin/packages/py-holoviews/package.py new file mode 100644 index 0000000000..428fdae648 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-holoviews/package.py @@ -0,0 +1,32 @@ +# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack.package import * + + +class PyHoloviews(PythonPackage): + """A Python library designed to make data analysis and visualization seamless and simple.""" + + homepage = "https://holoviews.org/" + pypi = "holoviews/holoviews-1.19.1.tar.gz" + git = "https://github.com/holoviz/holoviews.git" + + license("BSD-3-Clause", checked_by="climbfuji") + + version("1.19.1", sha256="b9e85e8c07275a456c0ef8d06bc157d02b37eff66fb3602aa12f5c86f084865c") + # version("1.19.0", sha256="cab1522f75a9b46377f9364b675befd79812e220059714470a58e21475d531ba") + + depends_on("python@3.9:", type=("build", "run")) + depends_on("py-hatchling", type="build") + depends_on("py-hatch-vcs", type="build") + + depends_on("py-bokeh@3.1:", type="run") + depends_on("py-colorcet", type="run") + depends_on("py-numpy@1.21:", type="run") + depends_on("py-packaging", type="run") + depends_on("py-pandas@1.3:", type="run") + depends_on("py-panel@1:", type="run") + depends_on("py-param@2", type="run") + depends_on("py-pyviz-comms@2.1:", type="run") diff --git a/var/spack/repos/builtin/packages/py-hvplot/package.py b/var/spack/repos/builtin/packages/py-hvplot/package.py new file mode 100644 index 0000000000..291d38723c --- /dev/null +++ b/var/spack/repos/builtin/packages/py-hvplot/package.py @@ -0,0 +1,31 @@ +# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack.package import * + + +class PyHvplot(PythonPackage): + """A high-level plotting API for pandas, dask, xarray, and networkx built on HoloViews.""" + + homepage = "https://hvplot.holoviz.org/" + pypi = "hvplot/hvplot-1.19.1.tar.gz" + git = "http://github.com/holoviz/hvplot.git" + + license("BSD-3-Clause", checked_by="climbfuji") + + version("0.11.1", sha256="989ed0389189adc47edcd2601d2eab18bf366e74b07f5e2873e021323c4a14bb") + + depends_on("python@3.9:", type=("build", "run")) + depends_on("py-setuptools@30.3:", type="build") + depends_on("py-setuptools-scm@6:", type="build") + + depends_on("py-bokeh@3.1:", type="run") + depends_on("py-colorcet", type="run") + depends_on("py-holoviews@1.19:", type="run") + depends_on("py-numpy@1.21:", type="run") + depends_on("py-packaging", type="run") + depends_on("py-pandas@1.3:", type="run") + depends_on("py-panel@1:", type="run") + depends_on("py-param@1.12:2", type="run") diff --git a/var/spack/repos/builtin/packages/py-panel/package.py b/var/spack/repos/builtin/packages/py-panel/package.py index 4444026be7..4108967c02 100644 --- a/var/spack/repos/builtin/packages/py-panel/package.py +++ b/var/spack/repos/builtin/packages/py-panel/package.py @@ -14,16 +14,43 @@ class PyPanel(PythonPackage): license("BSD-3-Clause") + version("1.5.2", sha256="30a45f314716bdde2de5c002fbd3a0b4d6ff85459e2179284df559455ff1534b") version("0.14.4", sha256="b853d2f53d7738ec6372525360c5bf9427a71ed990685ccac703bc9b442e9951") - depends_on("py-param@1.12:", type=("build", "run")) - depends_on("py-pyct@0.4.4:", type=("build", "run")) - depends_on("py-setuptools@42:", type=("build", "run")) - depends_on("py-bokeh@2.4.3:2.4", type=("build", "run")) - depends_on("py-pyviz-comms@0.7.4:", type=("build", "run")) - depends_on("py-requests", type=("build", "run")) - depends_on("py-bleach", type=("build", "run")) - depends_on("py-packaging", type="build") - depends_on("py-tqdm@4.48:", type=("build", "run")) - depends_on("py-markdown", type=("build", "run")) - depends_on("py-typing-extensions", type=("build", "run")) + with when("@0.14.4"): + depends_on("py-param@1.12:", type=("build", "run")) + depends_on("py-pyct@0.4.4:", type=("build", "run")) + depends_on("py-setuptools@42:", type=("build", "run")) + depends_on("py-bokeh@2.4.3:2.4", type=("build", "run")) + depends_on("py-pyviz-comms@0.7.4:", type=("build", "run")) + depends_on("py-requests", type=("build", "run")) + depends_on("py-bleach", type=("build", "run")) + depends_on("py-packaging", type="build") + depends_on("py-tqdm@4.48:", type=("build", "run")) + depends_on("py-markdown", type=("build", "run")) + depends_on("py-typing-extensions", type=("build", "run")) + + with when("@1.5.2"): + depends_on("python@3.10:", type=("build", "run")) + depends_on("py-hatchling", type="build") + depends_on("py-hatch-vcs", type="build") + depends_on("py-param@2.1:2", type=("build", "run")) + depends_on("py-bokeh@3.5:3.6", type=("build", "run")) + depends_on("py-pyviz-comms@2:", type=("build", "run")) + depends_on("py-requests", type=("build", "run")) + depends_on("py-packaging", type=("build", "run")) + # Version 18 or later are requested by py-panel + depends_on("node-js@18:", type=("build", "run")) + # Version 9 is not requested explicitly, it's + # a guess that the more recent version of node-js + # should go with a more recent version of npm + depends_on("npm@9:", type=("build", "run")) + + depends_on("py-markdown", type="run") + depends_on("py-markdown-it-py", type="run") + depends_on("py-linkify-it-py", type="run") + depends_on("py-mdit-py-plugins", type="run") + depends_on("py-bleach", type="run") + depends_on("py-typing-extensions", type="run") + depends_on("py-pandas@1.2:", type="run") + depends_on("py-tqdm", type="run") diff --git a/var/spack/repos/builtin/packages/py-param/package.py b/var/spack/repos/builtin/packages/py-param/package.py index 840c2279cf..706fcb7032 100644 --- a/var/spack/repos/builtin/packages/py-param/package.py +++ b/var/spack/repos/builtin/packages/py-param/package.py @@ -19,7 +19,13 @@ class PyParam(PythonPackage): license("BSD-3-Clause") + version("2.1.1", sha256="3b1da14abafa75bfd908572378a58696826b3719a723bc31b40ffff2e9a5c852") version("1.12.0", sha256="35d0281c8e3beb6dd469f46ff0b917752a54bed94d1b0c567346c76d0ff59c4a") - depends_on("python@2.7:", type=("build", "run")) - depends_on("py-setuptools", type="build") + depends_on("python@2.7:", when="@1", type=("build", "run")) + depends_on("python@3.8:", when="@2:", type=("build", "run")) + + depends_on("py-setuptools", when="@1", type="build") + + depends_on("py-hatchling", when="@2", type="build") + depends_on("py-hatch-vcs", when="@2", type="build") diff --git a/var/spack/repos/builtin/packages/py-spatialpandas/package.py b/var/spack/repos/builtin/packages/py-spatialpandas/package.py new file mode 100644 index 0000000000..307eca5c42 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-spatialpandas/package.py @@ -0,0 +1,31 @@ +# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack.package import * + + +class PySpatialpandas(PythonPackage): + """Pandas extension arrays for spatial/geometric operations.""" + + homepage = "https://holoviz.org/" + pypi = "spatialpandas/spatialpandas-1.19.1.tar.gz" + git = "https://github.com/holoviz/spatialpandas.git" + + license("BSD-2-Clause", checked_by="climbfuji") + + version("0.4.10", sha256="032e24ebb40f75c5c79cb79d7c281f2990e69ba382c0b24acb53da7bba60851c") + + depends_on("python@3.9:", type=("build", "run")) + depends_on("py-hatchling", type="build") + depends_on("py-hatch-vcs", type="build") + depends_on("py-param", type="build") + + depends_on("py-dask", type="run") + depends_on("py-fsspec@2022.8:", type="run") + depends_on("py-numba", type="run") + depends_on("py-packaging", type="run") + depends_on("py-pandas", type="run") + depends_on("py-pyarrow@10:", type="run") + depends_on("py-retrying", type="run") diff --git a/var/spack/repos/builtin/packages/py-uxarray/package.py b/var/spack/repos/builtin/packages/py-uxarray/package.py new file mode 100644 index 0000000000..06bccff20b --- /dev/null +++ b/var/spack/repos/builtin/packages/py-uxarray/package.py @@ -0,0 +1,56 @@ +# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack.package import * + + +class PyUxarray(PythonPackage): + """Xarray extension for unstructured climate and global weather data analysis and + visualization""" + + homepage = "https://uxarray.readthedocs.io" + pypi = "uxarray/uxarray-2024.10.0.tar.gz" + git = "https://github.com/uxarray/uxarray.git" + + license("Apache-2.0", checked_by="climbfuji") + + version("2024.10.0", sha256="f65a9920ce085af9a38349dc5ece4f9b83bc015dc8cb738d245d343f7816fd59") + + # Build-time dependencies + depends_on("python@3.9:", type=("build", "run")) + depends_on("py-setuptools@60:", type="build") + depends_on("py-setuptools-scm@8:", type="build") + + # "Minimal" run-time dependencies + depends_on("py-antimeridian", type="run") + depends_on("py-cartopy", type="run") + depends_on("py-datashader", type="run") + depends_on("py-geopandas", type="run") + depends_on("py-geoviews", type="run") + depends_on("py-holoviews", type="run") + depends_on("py-hvplot", type="run") + # With older versions of py-dask (2021.6.2): + # @derived_from(pd.core.strings.StringMethods) + # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + # AttributeError: module 'pandas.core.strings' has no attribute 'StringMethods' + # With py-dask@2023.4.1: + # return get(descriptor, obj, type(obj)) + # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + # TypeError: descriptor '__call__' for 'type' objects doesn't apply to a 'property' object + # https://github.com/dask/dask/issues/11038 + depends_on("py-dask@2024.7.1 +dataframe", type="run") + depends_on("py-dask-expr@1.1.9", type="run") + depends_on("py-matplotlib", type="run") + depends_on("py-matplotlib-inline", type="run") + depends_on("py-netcdf4", type="run") + depends_on("py-numba", type="run") + depends_on("py-pandas", type="run") + depends_on("py-pyarrow", type="run") + depends_on("py-pytest", type="run") + depends_on("py-requests", type="run") + depends_on("py-scipy", type="run") + depends_on("py-spatialpandas", type="run") + depends_on("py-scikit-learn", type="run") + depends_on("py-xarray", type="run") |