#1 Update to 0.2.8 (close RHBZ#2067101)
Merged 2 years ago by music. Opened 2 years ago by music.
rpms/ music/python-probeinterface v0.2.8  into  rawhide

file modified
+1
@@ -1,2 +1,3 @@ 

  /probeinterface-0.2.6.tar.gz

  /probeinterface-0.2.7.tar.gz

+ /probeinterface-0.2.8.tar.gz

file added
+62
@@ -0,0 +1,62 @@ 

+ From 8728c2e2ff673bd7c1715ee2f052949d63defdd6 Mon Sep 17 00:00:00 2001

+ From: "Benjamin A. Beasley" <code@musicinmybrain.net>

+ Date: Wed, 23 Mar 2022 07:23:42 -0400

+ Subject: [PATCH] =?UTF-8?q?Adjust=20examples=20to=20use=20to=5F3d(axes=3D?=

+  =?UTF-8?q?=E2=80=A6)?=

+ MIME-Version: 1.0

+ Content-Type: text/plain; charset=UTF-8

+ Content-Transfer-Encoding: 8bit

+ 

+ API changed in d2cd928. Fixes:

+ 

+   TypeError: to_3d() got an unexpected keyword argument 'plane'

+ 

+ when running the examples.

+ ---

+  examples/ex_01_generate_probe_from_sratch.py | 4 ++--

+  examples/ex_02_probe_2d_probe_3d.py          | 6 +++---

+  2 files changed, 5 insertions(+), 5 deletions(-)

+ 

+ diff --git a/examples/ex_01_generate_probe_from_sratch.py b/examples/ex_01_generate_probe_from_sratch.py

+ index e26947f..e979285 100644

+ --- a/examples/ex_01_generate_probe_from_sratch.py

+ +++ b/examples/ex_01_generate_probe_from_sratch.py

+ @@ -60,10 +60,10 @@

+  plot_probe(probe)

+  

+  ##############################################################################

+ -# A 2d `Probe` can be transformed to a 3d `Probe` by indicating the `plane`

+ +# A 2d `Probe` can be transformed to a 3d `Probe` by indicating the `axes`

+  # on which contacts will lie (Here the 'y' coordinate will be 0 for all contacts):

+  

+ -probe_3d = probe.to_3d(plane='xz')

+ +probe_3d = probe.to_3d(axes='xz')

+  plot_probe(probe_3d)

+  

+  plt.show()

+ diff --git a/examples/ex_02_probe_2d_probe_3d.py b/examples/ex_02_probe_2d_probe_3d.py

+ index 2755872..a3efd55 100644

+ --- a/examples/ex_02_probe_2d_probe_3d.py

+ +++ b/examples/ex_02_probe_2d_probe_3d.py

+ @@ -33,10 +33,10 @@

+  ##############################################################################

+  # Let's transform it into a 3d probe.

+  # 

+ -# Here the plane is 'xz' so y will be 0 for all contacts.

+ +# Here the axes are 'xz' so y will be 0 for all contacts.

+  # The shape of probe_3d.contact_positions is now (n_elec, 3)

+  

+ -probe_3d = probe_2d.to_3d(plane='xz')

+ +probe_3d = probe_2d.to_3d(axes='xz')

+  print(probe_2d.contact_positions.shape)

+  print(probe_3d.contact_positions.shape)

+  

+ @@ -55,7 +55,7 @@

+  # We can create another probe lying on another plane:

+  

+  

+ -other_3d = probe_2d.to_3d(plane='yz')

+ +other_3d = probe_2d.to_3d(axes='yz')

+  plot_probe(other_3d)

+  

+  ##############################################################################

file modified
+5 -2
@@ -5,7 +5,7 @@ 

  %bcond_without doc_pdf

  

  Name:           python-probeinterface

- Version:        0.2.7

+ Version:        0.2.8

  Release:        %autorelease

  Summary:        Handles probe layout, geometry, and wiring to device

  
@@ -24,6 +24,9 @@ 

  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

  

+ # Adjust examples to use to_3d(axes=…)

+ Patch0:         %{url}/pull/97.patch

+ 

  BuildArch:      noarch

  

  BuildRequires:  python3-devel
@@ -87,7 +90,7 @@ 

  

  

  %prep

- %autosetup -n probeinterface-%{version}

+ %autosetup -n probeinterface-%{version} -p1

  

  # Do not require exact dependency versions to build documentation:

  sed -r -i 's/==/>=/' requirements_rtd.txt

file modified
+1 -1
@@ -1,1 +1,1 @@ 

- SHA512 (probeinterface-0.2.7.tar.gz) = 531066bf1999c56f09551e47820d74d657ca614e144e502e6539ff2bbe00a01dc28455b9ad657d783bcb608846037adfd404897857324501f77c49abfccc0d14

+ SHA512 (probeinterface-0.2.8.tar.gz) = 7eac5d987222571971c2f7af3fc758520c984612b8bd58b197f19deddb506c8c8b664f472687cc7b8621cc33e86b89793ed4db2960aa74931138cacd8930190e

This breaks the API by renaming:

  • probeinterface.probe.select_dimensions to probeinterface.probe.select_axes
  • the plane keyword argument of probeinterface.probe.to_3d to axes
  • the dimensions keyword argument of probeinterface.probe.to_3d to axes

The only dependent package, python-neo, does not use the affected parts of the API.

Upstream release notes:

probeinterface 0.2.8
--------------------


March, 23rd 2022

* wiring CambridgeNeurotec mini-amp-64
* expose function select_dimensions (2d>3d and 3d>2d)
* add to_dict/from_dict in ProbeGroup
* Add "text_on_contact" in plot_probe()
* Add read_openephys function for Neuropux-PXI plugin

Announced to the devel list. Merge and build no earlier than 2022-03-30.

+1 (but weird of upstream to break API without even noting it in the changelog)

If they hadn’t forgotten to update the examples to match, or if I hadn’t been running the examples as extra tests, I might have missed it. I always review source diffs, but sometimes less carefully when upstream seems to keep careful changelogs.

Pull-Request has been merged by music

2 years ago