diff --git a/var/spack/repos/builtin/packages/py-bluepyefe/package.py b/var/spack/repos/builtin/packages/py-bluepyefe/package.py new file mode 100644 index 0000000000..8a15e4edf9 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-bluepyefe/package.py @@ -0,0 +1,25 @@ +# Copyright 2013-2023 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 PyBluepyefe(PythonPackage): + """Blue Brain Python E-feature extraction""" + + homepage = "https://github.com/BlueBrain/BluePyEfe" + pypi = "bluepyefe/bluepyefe-2.2.18.tar.gz" + git = "https://github.com/BlueBrain/BluePyEfe.git" + + version("2.2.18", sha256="bfb50c6482433ec2ffb4b65b072d2778bd89ae50d92dd6830969222aabb30275") + + depends_on("py-setuptools", type="build") + + depends_on("py-numpy@:1.23", type=("build", "run")) + depends_on("py-neo", type=("build", "run")) + depends_on("py-matplotlib", type=("build", "run")) + depends_on("py-efel", type=("build", "run")) + depends_on("py-scipy", type=("build", "run")) + depends_on("py-h5py", type=("build", "run")) + depends_on("py-igor", type=("build", "run")) diff --git a/var/spack/repos/builtin/packages/py-bluepyemodel/package.py b/var/spack/repos/builtin/packages/py-bluepyemodel/package.py new file mode 100644 index 0000000000..f865b9791b --- /dev/null +++ b/var/spack/repos/builtin/packages/py-bluepyemodel/package.py @@ -0,0 +1,36 @@ +# Copyright 2013-2023 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 PyBluepyemodel(PythonPackage): + """Python library to optimize and evaluate electrical models.""" + + homepage = "https://github.com/BlueBrain/BluePyEModel" + pypi = "bluepyemodel/bluepyemodel-0.0.46.tar.gz" + + version("0.0.46", sha256="ad4c125e491f3337fcc341a4f389b8a616d883ce50fd77d9fb0ea6e13be5da61") + + depends_on("py-setuptools", type="build") + depends_on("py-setuptools-scm", type="build") + + depends_on("py-numpy", type=("build", "run")) + depends_on("py-scipy", type=("build", "run")) + depends_on("py-pandas", type=("build", "run")) + depends_on("py-ipyparallel@6.3:", type=("build", "run")) + depends_on("py-tqdm", type=("build", "run")) + depends_on("py-pyyaml", type=("build", "run")) + depends_on("py-gitpython", type=("build", "run")) + depends_on("py-bluepyopt@1.12.12:", type=("build", "run")) + depends_on("py-bluepyefe@2.2.0:", type=("build", "run")) + depends_on("py-neurom@3.0:3", type=("build", "run")) + depends_on("py-efel@3.1:", type=("build", "run")) + depends_on("py-configparser", type=("build", "run")) + depends_on("py-morph-tool@2.8:", type=("build", "run")) + depends_on("py-fasteners@0.16:", type=("build", "run")) + depends_on("neuron+python@8.0:", type=("build", "run")) + depends_on("py-jinja2@3.0.3", when="@0.0.11:", type=("build", "run")) + depends_on("py-currentscape@0.0.11:", type=("build", "run")) diff --git a/var/spack/repos/builtin/packages/py-bluepyopt/package.py b/var/spack/repos/builtin/packages/py-bluepyopt/package.py new file mode 100644 index 0000000000..ccc39f9135 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-bluepyopt/package.py @@ -0,0 +1,37 @@ +# Copyright 2013-2023 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 PyBluepyopt(PythonPackage): + """Bluebrain Python Optimisation Library""" + + homepage = "https://github.com/BlueBrain/BluePyOpt" + pypi = "bluepyopt/bluepyopt-1.9.27.tar.gz" + + # NOTE : while adding new release check pmi_rank.patch compatibility + version("1.14.4", sha256="7567fd736053250ca06030f67ad93c607b100c2b98df8dc588c26b64cb3e171c") + + # patch required to avoid hpe-mpi linked mechanism library + patch("pmi_rank.patch") + + variant("scoop", default=False, description="Use BluePyOpt together with py-scoop") + + depends_on("py-setuptools", type="build") + depends_on("py-numpy@1.6:", type=("build", "run")) + depends_on("py-pandas@0.18:", type=("build", "run")) + depends_on("py-deap@1.3.3:", type=("build", "run")) + depends_on("py-efel@2.13:", type=("build", "run")) + depends_on("py-ipyparallel", type=("build", "run")) + depends_on("py-pickleshare@0.7.3:", type=("build", "run")) + depends_on("py-jinja2@2.8:", type=("build", "run")) + depends_on("py-future", type=("build", "run")) + depends_on("py-pebble@4.6:", type=("build", "run")) + depends_on("py-scoop@0.7:", type=("build", "run"), when="+scoop") + depends_on("neuron@7.4:", type=("build", "run")) + + def setup_run_environment(self, env): + env.unset("PMI_RANK") + env.set("NEURON_INIT_MPI", "0") diff --git a/var/spack/repos/builtin/packages/py-bluepyopt/pmi_rank.patch b/var/spack/repos/builtin/packages/py-bluepyopt/pmi_rank.patch new file mode 100644 index 0000000000..21a73849b2 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-bluepyopt/pmi_rank.patch @@ -0,0 +1,17 @@ +diff --git a/bluepyopt/ephys/simulators.py b/bluepyopt/ephys/simulators.py +index e71ad8b..3c93237 100644 +--- a/bluepyopt/ephys/simulators.py ++++ b/bluepyopt/ephys/simulators.py +@@ -89,6 +89,12 @@ class NrnSimulator(object): + NrnSimulator._nrn_disable_banner() + self.banner_disabled = True + ++ # certain mpi libraries (hpe-mpt) use PMI_RANK env variable to initialize ++ # MPI before calling MPI_Init (which is undesirable). Unset this variable ++ # if exist to avoid issue with loading neuron and mechanism library. ++ if 'PMI_RANK' in os.environ: ++ os.environ.pop("PMI_RANK") ++ + import neuron # NOQA + + return neuron diff --git a/var/spack/repos/builtin/packages/py-currentscape/package.py b/var/spack/repos/builtin/packages/py-currentscape/package.py new file mode 100644 index 0000000000..eb6d75be89 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-currentscape/package.py @@ -0,0 +1,23 @@ +# Copyright 2013-2023 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 PyCurrentscape(PythonPackage): + """Module to easily plot the currents in electrical neuron models.""" + + homepage = "https://github.com/BlueBrain/Currentscape" + git = "https://github.com/BlueBrain/Currentscape.git" + pypi = "currentscape/currentscape-1.0.12.tar.gz" + + version("1.0.12", sha256="d83c5a58074e4d612553472a487e5d1d2854dc4d5c161817c6bafdf4a5988011") + + depends_on("py-setuptools", type=("build", "run")) + depends_on("py-setuptools-scm", type=("build",)) + depends_on("python@3.8:", type=("build", "run")) + depends_on("py-numpy", type=("build", "run")) + depends_on("py-matplotlib", type=("build", "run")) + depends_on("py-palettable", type=("build", "run")) diff --git a/var/spack/repos/builtin/packages/py-efel/package.py b/var/spack/repos/builtin/packages/py-efel/package.py new file mode 100644 index 0000000000..a33749b9af --- /dev/null +++ b/var/spack/repos/builtin/packages/py-efel/package.py @@ -0,0 +1,24 @@ +# Copyright 2013-2023 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 PyEfel(PythonPackage): + """The Electrophys Feature Extract Library (eFEL) allows + neuroscientists to automatically extract features from time series data + recorded from neurons (both in vitro and in silico). + Examples are the action potential width and amplitude in + voltage traces recorded during whole-cell patch clamp experiments. + The user of the library provides a set of traces and selects the + features to be calculated. The library will then extract the requested + features and return the values to the user.""" + + homepage = "https://github.com/BlueBrain/eFEL" + pypi = "efel/efel-3.0.80.tar.gz" + + version("5.2.0", sha256="ed2c5efe22a4c703a4d9e47775b939009e1456713ac896898ebabf177c60b1dc") + + depends_on("py-setuptools", type="build") + depends_on("py-numpy@1.6:", type=("build", "run")) diff --git a/var/spack/repos/builtin/packages/py-morph-tool/package.py b/var/spack/repos/builtin/packages/py-morph-tool/package.py new file mode 100644 index 0000000000..7927b468c0 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-morph-tool/package.py @@ -0,0 +1,39 @@ +# Copyright 2013-2023 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 PyMorphTool(PythonPackage): + """Python morphology manipulation toolkit""" + + homepage = "https://github.com/BlueBrain/morph-tool" + git = "https://github.com/BlueBrain/morph-tool.git" + pypi = "morph-tool/morph-tool-2.9.1.tar.gz" + + version("master", branch="master") + version("2.9.1", sha256="305e9456c8047726588b23dfa070eb95ccbe5573e9fea3e0a83dc93eacdf61dc") + version("2.9.0", sha256="c60d4010e17ddcc3f53c864c374fffee05713c8f8fd2ba4eed7706041ce1fa47") + + variant("nrn", default=False, description="Enable additional neuron support") + variant("plot", default=False, description="Enable additional plotly support") + variant("parallel", default=False, description="Enable additional parallel support") + + depends_on("py-setuptools", type="build") + depends_on("py-setuptools-scm", type="build") + + depends_on("py-click@6.7:", type=("build", "run")) + depends_on("py-deprecation@2.1.0:", type=("build", "run")) + depends_on("py-more-itertools@8.6.0:", type=("build", "run")) + depends_on("py-morphio@3", type=("build", "run")) + depends_on("py-neurom@3", type=("build", "run")) + depends_on("py-numpy@1.14:", type=("build", "run")) + depends_on("py-pandas@1.0.3:", type=("build", "run")) + depends_on("py-xmltodict@0.12.0:", type=("build", "run")) + + depends_on("py-plotly@4.1.0:", type=("build", "run"), when="+plot") + depends_on("py-dask+bag@2.19.0:", type=("build", "run"), when="+parallel") + depends_on("neuron+python@7.8:", type=("build", "run"), when="+nrn") + depends_on("py-bluepyopt@1.9.37:", type=("build", "run"), when="+nrn") diff --git a/var/spack/repos/builtin/packages/py-morphio/package.py b/var/spack/repos/builtin/packages/py-morphio/package.py new file mode 100644 index 0000000000..a5a9fee7de --- /dev/null +++ b/var/spack/repos/builtin/packages/py-morphio/package.py @@ -0,0 +1,30 @@ +# Copyright 2013-2023 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) + +import sys + +from spack.package import * + + +class PyMorphio(PythonPackage): + """Python library for reading / writing morphology files""" + + homepage = "https://github.com/BlueBrain/MorphIO" + git = "https://github.com/BlueBrain/MorphIO.git" + pypi = "morphio/MorphIO-3.3.2.tar.gz" + + version("master", branch="master", submodules=True) + + version("3.3.6", sha256="0f2e55470d92a3d89f2141ae905ee104fd16257b93dafb90682d90171de2f4e6") + + depends_on("py-setuptools@24.2:", type="build") + depends_on("py-setuptools-scm", type="build") + + depends_on("ninja", type="build") + depends_on("cmake@3.2:", type="build") + depends_on("py-numpy@1.14.1:", type=("build", "run")) + depends_on("py-h5py@3", when="platform=windows", type=("build", "run")) + if sys.platform != "win32": + depends_on("hdf5") diff --git a/var/spack/repos/builtin/packages/py-neurom/package.py b/var/spack/repos/builtin/packages/py-neurom/package.py new file mode 100644 index 0000000000..19bad5fc7b --- /dev/null +++ b/var/spack/repos/builtin/packages/py-neurom/package.py @@ -0,0 +1,35 @@ +# Copyright 2013-2023 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 PyNeurom(PythonPackage): + """Python library neuron morphology analysis""" + + homepage = "https://github.com/BlueBrain/NeuroM" + git = "https://github.com/BlueBrain/NeuroM.git" + pypi = "neurom/neurom-2.2.1.tar.gz" + + version("master", branch="master") + version("3.2.4", sha256="a584e0979b54deee906dd716ea90de20773e20b527d83960d0fe655b0905eb4a") + + variant("plotly", default=False, description="Enable plotly support") + + depends_on("py-setuptools@42:", type=("build", "run")) + depends_on("py-setuptools-scm", type="build") + depends_on("python@3.8:", type=("build", "run")) + + depends_on("py-click@7.0:", type=("build", "run")) + depends_on("py-matplotlib@3.2.1:", type=("build", "run")) + depends_on("py-morphio@3.3.6:", type=("build", "run")) + depends_on("py-numpy@1.8.0:", type=("build", "run")) + depends_on("py-pandas@1.0.5:", type=("build", "run")) + depends_on("py-pyyaml@3.10:", type=("build", "run")) + depends_on("py-scipy@1.2.0:", type=("build", "run")) + depends_on("py-tqdm@4.8.4:", type=("build", "run")) + + depends_on("py-plotly@3.6.0:", type=("build", "run"), when="+plotly") + depends_on("py-psutil@5.5.1:", type=("build", "run"), when="+plotly")