diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..84fff55 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/LFPykit-0.3.tar.gz diff --git a/python-lfpykit.spec b/python-lfpykit.spec new file mode 100644 index 0000000..321164a --- /dev/null +++ b/python-lfpykit.spec @@ -0,0 +1,134 @@ +# Enabled by default +# If the package needs to download data for the test which cannot be done in +# koji, these can be disabled in koji by using `bcond_with` instead, but the +# tests must be validated in mock with network enabled like so: +# mock -r fedora-rawhide-x86_64 rebuild --enable-network --rpmbuild-opts="--with tests" +%bcond_without tests + +# Requires m2r2 and other deps so disabled for the moment +%bcond_with docs + +%global pypi_name LFPykit +%global lower_name lfpykit + +%global _description %{expand: +This Python module contain freestanding implementations of electrostatic +forward models incorporated in LFPy (https://github.com/LFPy/LFPy, +https://LFPy.readthedocs.io). + +The aim of the LFPykit module is to provide electrostatic models in a manner +that facilitates forward-model predictions of extracellular potentials and +related measures from multicompartment neuron models, but without explicit +dependencies on neural simulation software such as NEURON +(https://neuron.yale.edu, https://github.com/neuronsimulator/nrn), Arbor +(https://arbor.readthedocs.io, https://github.com/arbor-sim/arbor), or even +LFPy. The LFPykit module can then be more easily incorporated with these +simulators, or in various projects that utilize them such as LFPy +(https://LFPy.rtfd.io, https://github.com/LFPy/LFPy). BMTK +(https://alleninstitute.github.io/bmtk/, +https://github.com/AllenInstitute/bmtk), etc. + +Its main functionality is providing class methods that return two-dimensional +linear transformation matrices M between transmembrane currents I of +multicompartment neuron models and some measurement Y given by Y=MI. + +The presently incorporated volume conductor models have been incorporated in +LFPy (https://LFPy.rtfd.io, https://github.com/LFPy/LFPy), as described in +various papers and books: + +- Linden H, Hagen E, Leski S, Norheim ES, Pettersen KH, Einevoll GT (2014) LFPy: +a tool for biophysical simulation of extracellular potentials generated by +detailed model neurons. Front. Neuroinform. 7:41. doi: 10.3389/fninf.2013.00041 + +- Hagen E, Næss S, Ness TV and Einevoll GT (2018) Multimodal Modeling of Neural +Network Activity: Computing LFP, ECoG, EEG, and MEG Signals With LFPy 2.0. +Front. Neuroinform. 12:92. doi: 10.3389/fninf.2018.00092 + +- Ness, T. V., Chintaluri, C., Potworowski, J., Leski, S., Glabska, H., Wójcik, +D. K., et al. (2015). Modelling and analysis of electrical potentials recorded +in microelectrode arrays (MEAs). Neuroinformatics 13:403–426. doi: +10.1007/s12021-015-9265-6 + +- Nunez and Srinivasan, Oxford University Press, 2006 + +- Næss S, Chintaluri C, Ness TV, Dale AM, Einevoll GT and Wójcik DK (2017). +Corrected Four-sphere Head Model for EEG Signals. Front. Hum. Neurosci. 11:490. +doi: 10.3389/fnhum.2017.00490} + +Name: python-%{lower_name} +Version: 0.3 +Release: 1%{?dist} +Summary: Electrostatic models for multicompartment neuron models + +License: GPLv3+ +URL: https://pypi.org/pypi/%{pypi_name} +Source0: %pypi_source + +BuildArch: noarch + +%description %_description + +%package -n python3-%{pypi_name} +Summary: %{summary} +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: %{py3_dist h5py} +BuildRequires: %{py3_dist meautility} +BuildRequires: %{py3_dist numpy} +BuildRequires: %{py3_dist pytest} +BuildRequires: %{py3_dist scipy} + +%if %{with docs} +# Documentation +BuildRequires: make +BuildRequires: %{py3_dist sphinx} +BuildRequires: %{py3_dist numpydoc} +%endif + +%description -n python3-%{pypi_name} %_description + +%package doc +Summary: %{summary} + +%description doc +Documentation for %{name}. + +%prep +%autosetup -n %{pypi_name}-%{version} +rm -rf %{pypi_name}.egg-info + +find . -type f -name "*.py" -exec sed -i '/^#![ ]*\/usr\/bin\/env.*$/ d' {} 2>/dev/null ';' + +%build +%py3_build + +%if %{with docs} +make -C doc/source SPHINXBUILD=sphinx-build-3 html +rm -rf doc/source/_build/html/{.doctrees,.buildinfo} -vf +%endif + +%install +%py3_install + +%check +%if %{with tests} +%{pytest} +%endif + +%files -n python3-%{pypi_name} +%license LICENSE +%doc README.md +%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info +%{python3_sitelib}/%{lower_name} + +%files doc +%license LICENSE +%doc examples +%if %{with docs} +%doc doc/source/_build/html +%endif + +%changelog +* Sun Jun 27 2021 Ankur Sinha - 0.3-1 +- Initial package + diff --git a/sources b/sources new file mode 100644 index 0000000..28e6630 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (LFPykit-0.3.tar.gz) = f1a4d3a14c91777b25f67f4a2937d7038c053f6926d3aea61ca7814299f62083f0bc16cbd5179a0d271ccbbdbb23e3611aa70daed319eb0f0322d7e3c2e5e906