summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Heeren <erik.heeren@epfl.ch>2022-12-14 19:00:26 +0100
committerGitHub <noreply@github.com>2022-12-14 12:00:26 -0600
commit80e30222e1bc166ff40e50d50570c2a86b9918f8 (patch)
treec58f6d919cc2a5d8fcec2334e2e88a8ee5a6b45e
parent55356e9edb374bc2e547ed1706dace6c34042dd9 (diff)
downloadspack-80e30222e1bc166ff40e50d50570c2a86b9918f8.tar.gz
spack-80e30222e1bc166ff40e50d50570c2a86b9918f8.tar.bz2
spack-80e30222e1bc166ff40e50d50570c2a86b9918f8.tar.xz
spack-80e30222e1bc166ff40e50d50570c2a86b9918f8.zip
New neuroscience packages: py-bmtk, py-neurotools (#34464)
* Add py-bmtk and py-neurotools * py-bmtk: version bump * [@spackbot] updating style on behalf of heerener * Maybe the copyright needs to be extended to 2022 for the check to pass * Process review remarks * Update var/spack/repos/builtin/packages/py-neurotools/package.py Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com> Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
-rw-r--r--var/spack/repos/builtin/packages/py-bmtk/package.py28
-rw-r--r--var/spack/repos/builtin/packages/py-neurotools/neurotools-0.3.1.patch22
-rw-r--r--var/spack/repos/builtin/packages/py-neurotools/package.py25
3 files changed, 75 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/py-bmtk/package.py b/var/spack/repos/builtin/packages/py-bmtk/package.py
new file mode 100644
index 0000000000..f3dc57b644
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-bmtk/package.py
@@ -0,0 +1,28 @@
+# Copyright 2013-2022 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 PyBmtk(PythonPackage):
+ """The Brain Modeling Toolkit"""
+
+ homepage = "https://github.com/AllenInstitute/bmtk"
+ pypi = "bmtk/bmtk-1.0.5.tar.gz"
+
+ version("1.0.7", sha256="11e85098cf3c940a3d64718645f4a24ee13c8a47438ef5d28e054cb27ee01702")
+ version("1.0.5", sha256="e0cb47b334467a6d124cfb99bbc67cc88f39f0291f4c39929f50d153130642a4")
+
+ depends_on("py-setuptools", type="build")
+
+ depends_on("py-jsonschema", type=("build", "run"))
+ depends_on("py-pandas", type=("build", "run"))
+ depends_on("py-numpy", type=("build", "run"))
+ depends_on("py-six", type=("build", "run"))
+ depends_on("py-h5py", type=("build", "run"))
+ depends_on("py-matplotlib", type=("build", "run"))
+ depends_on("py-scipy", type=("build", "run"))
+ depends_on("py-scikit-image", type=("build", "run"))
+ depends_on("py-sympy", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-neurotools/neurotools-0.3.1.patch b/var/spack/repos/builtin/packages/py-neurotools/neurotools-0.3.1.patch
new file mode 100644
index 0000000000..2f9d73ff19
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-neurotools/neurotools-0.3.1.patch
@@ -0,0 +1,22 @@
+diff --git a/src/stgen.py b/src/stgen.py
+index b818ea5..3cb45e6 100644
+--- a/src/stgen.py
++++ b/src/stgen.py
+@@ -227,7 +227,7 @@ class StGen:
+ number = min(5+numpy.ceil(2*n),100)
+
+ if number > 0:
+- isi = self.rng.exponential(1.0/rate, number)*1000.0
++ isi = self.rng.exponential(1.0/rate, int(number)) * 1000.0
+ if number > 1:
+ spikes = numpy.add.accumulate(isi)
+ else:
+@@ -301,7 +301,7 @@ class StGen:
+ number = min(5+numpy.ceil(2*n),100)
+
+ if number > 0:
+- isi = self.rng.gamma(a, b, number)*1000.0
++ isi = self.rng.gamma(a, b, int(number))*1000.0
+ if number > 1:
+ spikes = numpy.add.accumulate(isi)
+ else:
diff --git a/var/spack/repos/builtin/packages/py-neurotools/package.py b/var/spack/repos/builtin/packages/py-neurotools/package.py
new file mode 100644
index 0000000000..dc37019d6e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-neurotools/package.py
@@ -0,0 +1,25 @@
+# Copyright 2013-2022 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 PyNeurotools(PythonPackage):
+ """A collection of tools for representing and anlyzing neuroscientific
+ data."""
+
+ homepage = "http://neuralensemble.org/NeuroTools"
+ pypi = "neurotools/NeuroTools-0.3.1.tar.gz"
+
+ version("0.3.1", sha256="a459420fc0e9ff6b59af28716ddb0c75d11a63b8db80a5f4844e0d7a90c2c653")
+
+ depends_on("py-setuptools", type="build")
+ depends_on("py-scipy", type=("build", "run"))
+ depends_on("py-numpy", type=("build", "run"))
+ depends_on("py-matplotlib", type=("build", "run"))
+ depends_on("py-tables", type=("build", "run"))
+ depends_on("py-pyaml", type=("build", "run"))
+
+ patch("neurotools-0.3.1.patch", when="@0.3.1")