forked from spack/spack
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
py-bluepyemodel: opensourcing with dependencies (spack#40592)
* py-bluepyemodel: new package with dependencies * py-morphio: add MPI as dependency to avoid failing builds * Formatting * py-bluepyefe: no need to set NEURON_INIT_MPI * py-morphio: unifurcation branch is ancient history * py-bluepyopt: only set NEURON_INIT_MPI with +neuron * py-efel: get rid of old version * py-morph{-tool,io}: rename develop to master to match branch * py-bluepyefe: unset PMI_RANK is also neuron-related * py-bluepyopt: PMI_RANK is also neuron-related * Implement review remarks * py-morph-tool, py-neurom: small fixes * py-morphio: reword dependencies
- Loading branch information
Showing
9 changed files
with
266 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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")) |
36 changes: 36 additions & 0 deletions
36
var/spack/repos/builtin/packages/py-bluepyemodel/package.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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("[email protected]:", 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("[email protected]:", type=("build", "run")) | ||
depends_on("[email protected]:", type=("build", "run")) | ||
depends_on("[email protected]:3", type=("build", "run")) | ||
depends_on("[email protected]:", type=("build", "run")) | ||
depends_on("py-configparser", type=("build", "run")) | ||
depends_on("[email protected]:", type=("build", "run")) | ||
depends_on("[email protected]:", type=("build", "run")) | ||
depends_on("[email protected]:", type=("build", "run")) | ||
depends_on("[email protected]", when="@0.0.11:", type=("build", "run")) | ||
depends_on("[email protected]:", type=("build", "run")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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("[email protected]:", type=("build", "run")) | ||
depends_on("[email protected]:", type=("build", "run")) | ||
depends_on("[email protected]:", type=("build", "run")) | ||
depends_on("[email protected]:", type=("build", "run")) | ||
depends_on("py-ipyparallel", type=("build", "run")) | ||
depends_on("[email protected]:", type=("build", "run")) | ||
depends_on("[email protected]:", type=("build", "run")) | ||
depends_on("py-future", type=("build", "run")) | ||
depends_on("[email protected]:", type=("build", "run")) | ||
depends_on("[email protected]:", type=("build", "run"), when="+scoop") | ||
depends_on("[email protected]:", type=("build", "run")) | ||
|
||
def setup_run_environment(self, env): | ||
env.unset("PMI_RANK") | ||
env.set("NEURON_INIT_MPI", "0") |
17 changes: 17 additions & 0 deletions
17
var/spack/repos/builtin/packages/py-bluepyopt/pmi_rank.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
23 changes: 23 additions & 0 deletions
23
var/spack/repos/builtin/packages/py-currentscape/package.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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("[email protected]:", type=("build", "run")) | ||
depends_on("py-numpy", type=("build", "run")) | ||
depends_on("py-matplotlib", type=("build", "run")) | ||
depends_on("py-palettable", type=("build", "run")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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("[email protected]:", type=("build", "run")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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("[email protected]:", type=("build", "run")) | ||
depends_on("[email protected]:", type=("build", "run")) | ||
depends_on("[email protected]:", type=("build", "run")) | ||
depends_on("py-morphio@3", type=("build", "run")) | ||
depends_on("py-neurom@3", type=("build", "run")) | ||
depends_on("[email protected]:", type=("build", "run")) | ||
depends_on("[email protected]:", type=("build", "run")) | ||
depends_on("[email protected]:", type=("build", "run")) | ||
|
||
depends_on("[email protected]:", type=("build", "run"), when="+plot") | ||
depends_on("[email protected]:", type=("build", "run"), when="+parallel") | ||
depends_on("[email protected]:", type=("build", "run"), when="+nrn") | ||
depends_on("[email protected]:", type=("build", "run"), when="+nrn") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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("[email protected]:", type="build") | ||
depends_on("py-setuptools-scm", type="build") | ||
|
||
depends_on("ninja", type="build") | ||
depends_on("[email protected]:", type="build") | ||
depends_on("[email protected]:", type=("build", "run")) | ||
depends_on("py-h5py@3", when="platform=windows", type=("build", "run")) | ||
if sys.platform != "win32": | ||
depends_on("hdf5") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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("[email protected]:", type=("build", "run")) | ||
|
||
depends_on("[email protected]:", type=("build", "run")) | ||
depends_on("[email protected]:", type=("build", "run")) | ||
depends_on("[email protected]:", type=("build", "run")) | ||
depends_on("[email protected]:", type=("build", "run")) | ||
depends_on("[email protected]:", type=("build", "run")) | ||
depends_on("[email protected]:", type=("build", "run")) | ||
depends_on("[email protected]:", type=("build", "run")) | ||
depends_on("[email protected]:", type=("build", "run")) | ||
|
||
depends_on("[email protected]:", type=("build", "run"), when="+plotly") | ||
depends_on("[email protected]:", type=("build", "run"), when="+plotly") |