## START: Set by rpmautospec ## (rpmautospec version 0.3.5) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 2; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec # Sphinx-generated HTML documentation is not suitable for packaging; see # https://bugzilla.redhat.com/show_bug.cgi?id=2006555 for discussion. # # We can generate PDF documentation as a substitute. %bcond_without doc_pdf Name: python-probeinterface Version: 0.2.16 Release: %autorelease Summary: Handles probe layout, geometry, and wiring to device # SPDX License: MIT URL: https://github.com/SpikeInterface/probeinterface # The GitHub tarball has documentation, examples, and tests; the PyPI one does # not. Source0: %{url}/archive/%{version}/probeinterface-%{version}.tar.gz # Probe definitions are normally downloaded at runtime. We can get tests and # examples that rely on probe definitions to work in an offline environment by # pre-populating the local cache. See also # https://github.com/SpikeInterface/probeinterface/issues/70. # # This URL comes from probeinterface/library.py, where it is called public_url. %global probe_url https://web.gin.g-node.org/spikeinterface/probeinterface_library/raw/master Source1: %{probe_url}/neuronexus/A1x32-Poly3-10mm-50-177/A1x32-Poly3-10mm-50-177.json Source2: %{probe_url}/cambridgeneurotech/ASSY-156-P-1/ASSY-156-P-1.json BuildArch: noarch BuildRequires: python3-devel %if %{with doc_pdf} BuildRequires: make BuildRequires: python3dist(sphinx) BuildRequires: python3-sphinx-latex BuildRequires: latexmk %endif %global common_description %{expand: A Python package to handle the layout, geometry, and wiring of silicon probes for extracellular electrophysiology experiments. Goals Make a lightweight package to handle: • probe contact geometry (both 2D and 3D layouts) • probe shape (contour of the probe, shape of channel contact, …) • probe wiring to device (the physical layout often doesn’t match the channel ordering) • combining several probes into a device with global geometry + global wiring • exporting probe geometry data into JSON files • loading existing probe geometry files (Neuronexus, imec, Cambridge Neurotech…) Started here Bonus: • optional plotting (based on matplotlib) • load/save geometry using common formats (PRB, CSV, NWB, …) • handle SI length units correctly um/mm/… Target users/project: • spikeinterface team: integrate this into spikeextractor for channel location • neo team: handle array_annotations for AnalogSignal • spikeforest team: use this package for plotting probe activity • phy team: integrate for probe display • spyking-circus team: handle probe with this package • kilosort team: handle probe with this package • tridesclous team: handle probe with this package • open ephys team: automatically generate channel map configuration files} %description %{common_description} %package -n python3-probeinterface Summary: %{summary} %description -n python3-probeinterface %{common_description} %package doc Summary: Documentation for probeinterface %description doc %{common_description} %prep %autosetup -n probeinterface-%{version} -p1 # Do not require an exact matplotlib version to build documentation: sed -r -i 's/(matplotlib)==/\1>=/' pyproject.toml # Pre-populate the probe definition cache PROBE_CACHE="${HOME}/.config/probeinterface/library" install -t "${PROBE_CACHE}/neuronexus" -p -m 0644 -D '%{SOURCE1}' install -t "${PROBE_CACHE}/cambridgeneurotech" -p -m 0644 -D '%{SOURCE2}' %generate_buildrequires %pyproject_buildrequires -x test%{?with_doc_pdf:,docs} %build %pyproject_wheel %if %{with doc_pdf} PYTHONPATH="${PWD}" %make_build -C doc latex \ SPHINXOPTS='-j%{?_smp_build_ncpus}' %make_build -C doc/_build/latex LATEXMKOPTS='-quiet' %endif %install %pyproject_install %pyproject_save_files probeinterface %check # Skip tests that unconditionally download probe interface definitions and # bypass the cache. # https://github.com/SpikeInterface/probeinterface/issues/70. k="${k-}${k+ and }not test_download_probeinterface_file" k="${k-}${k+ and }not test_get_from_cache" %pytest -k "${k-}" %files -n python3-probeinterface -f %{pyproject_files} # pyproject-rpm-macros handles the LICENSE file; verify with “rpm -qL -p …” %doc README.md %files doc %license LICENSE %doc examples %if %{with doc_pdf} %doc doc/_build/latex/probeinterface.pdf %endif %changelog * Sat Mar 18 2023 Benjamin A. Beasley - 0.2.16-2 - Don’t assume %%_smp_mflags is -j%%_smp_build_ncpus * Thu Feb 09 2023 Benjamin A. Beasley - 0.2.16-1 - Update to 0.2.16 (close RHBZ#2168525) * Fri Jan 20 2023 Fedora Release Engineering - 0.2.15-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Mon Dec 12 2022 Benjamin A. Beasley - 0.2.15-1 - Update to 0.2.15 (close RHBZ#2152539) * Thu Oct 27 2022 Benjamin A. Beasley - 0.2.14-1 - Update to 0.2.14 (close RHBZ#2138117) * Fri Oct 21 2022 Benjamin A. Beasley - 0.2.13-1 - Update to 0.2.13 (close RHBZ#2136599) * Mon Oct 10 2022 Benjamin A. Beasley - 0.2.12-1 - Update to 0.2.12 (close RHBZ#2133405) * Mon Oct 10 2022 Benjamin A. Beasley - 0.2.11-2 - Confirm License is SPDX MIT * Wed Sep 14 2022 Benjamin A. Beasley - 0.2.11-1 - Update to 0.2.11 (close RHBZ#2126799) * Thu Sep 01 2022 Benjamin A. Beasley - 0.2.10-1 - Update to 0.2.10 (close RHBZ#2123300) * Fri Jul 22 2022 Fedora Release Engineering - 0.2.9-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Wed Jun 15 2022 Python Maint - 0.2.9-2 - Rebuilt for Python 3.11 * Fri Apr 15 2022 Benjamin A. Beasley - 0.2.9-1 - Update to 0.2.9 (close RHBZ#2075767) * Wed Mar 23 2022 Benjamin A. Beasley - 0.2.8-1 - Update to 0.2.8 (close RHBZ#2067101) * Tue Mar 01 2022 Benjamin A. Beasley - 0.2.7-1 - Update to 0.2.7 (close RHBZ#2059621) * Fri Jan 21 2022 Fedora Release Engineering - 0.2.6-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Tue Dec 28 2021 Benjamin A. Beasley - 0.2.6-1 - Initial package (close RHBZ#2012917)