diff options
author | Alyssa Ross <hi@alyssa.is> | 2023-11-16 12:53:32 +0100 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-11-16 12:53:32 +0100 |
commit | 67419f0e56f99b0ebbe14574d3492110ac84c8d6 (patch) | |
tree | 3abc8e1606a2c80b6f5d14fef175e50800202163 /nixpkgs/pkgs/development/python-modules/stytra | |
parent | a2c1eff83c3118a9aee8076c7f84f58137416b6e (diff) | |
parent | 9008bc4eb62c878d0812105ea1b34255d651df88 (diff) | |
download | nixlib-67419f0e56f99b0ebbe14574d3492110ac84c8d6.tar nixlib-67419f0e56f99b0ebbe14574d3492110ac84c8d6.tar.gz nixlib-67419f0e56f99b0ebbe14574d3492110ac84c8d6.tar.bz2 nixlib-67419f0e56f99b0ebbe14574d3492110ac84c8d6.tar.lz nixlib-67419f0e56f99b0ebbe14574d3492110ac84c8d6.tar.xz nixlib-67419f0e56f99b0ebbe14574d3492110ac84c8d6.tar.zst nixlib-67419f0e56f99b0ebbe14574d3492110ac84c8d6.zip |
Merge branch 'nixos-unstable-small' of https://github.com/NixOS/nixpkgs into HEAD
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/stytra')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/stytra/0000-workaround-pyqtgraph.patch | 26 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/stytra/default.nix | 21 |
2 files changed, 39 insertions, 8 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/stytra/0000-workaround-pyqtgraph.patch b/nixpkgs/pkgs/development/python-modules/stytra/0000-workaround-pyqtgraph.patch new file mode 100644 index 000000000000..ad0ecbb11301 --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/stytra/0000-workaround-pyqtgraph.patch @@ -0,0 +1,26 @@ +diff --git a/stytra/gui/fishplots.py b/stytra/gui/fishplots.py +index 49ef1fe..fd1cc50 100644 +--- a/stytra/gui/fishplots.py ++++ b/stytra/gui/fishplots.py +@@ -13,7 +13,7 @@ from lightparam.gui import ParameterGui + from scipy.ndimage.filters import gaussian_filter1d + + +-class StreamingPositionPlot(pg.GraphicsWindow): ++class StreamingPosition(pg.GraphicsView): + """Plot that displays the virtual position of the fish""" + + def __init__(self, *args, data_accumulator, n_points=500, **kwargs): +diff --git a/stytra/utilities.py b/stytra/utilities.py +index f79c4db..feaa7ef 100644 +--- a/stytra/utilities.py ++++ b/stytra/utilities.py +@@ -239,7 +239,7 @@ def recursive_update(d, u): + :return: + """ + for k, v in u.items(): +- if isinstance(v, collections.Mapping): ++ if isinstance(v, collections.ChainMap): + d[k] = recursive_update(d.get(k, {}), v) + else: + d[k] = v diff --git a/nixpkgs/pkgs/development/python-modules/stytra/default.nix b/nixpkgs/pkgs/development/python-modules/stytra/default.nix index 5bc0a4af75e6..821aaa41437c 100644 --- a/nixpkgs/pkgs/development/python-modules/stytra/default.nix +++ b/nixpkgs/pkgs/development/python-modules/stytra/default.nix @@ -15,7 +15,7 @@ , nose , numba , numpy -, opencv3 +, opencv4 , pandas , pims , pyqt5 @@ -33,8 +33,7 @@ buildPythonPackage rec { pname = "stytra"; version = "0.8.34"; - format = "setuptools"; - + pyproject = true; disabled = pythonOlder "3.7"; src = fetchPypi { @@ -42,13 +41,13 @@ buildPythonPackage rec { sha256 = "aab9d07575ef599a9c0ae505656e3c03ec753462df3c15742f1f768f2b578f0a"; }; - # crashes python - preCheck = '' - rm stytra/tests/test_z_experiments.py - ''; + patches = [ + # https://github.com/portugueslab/stytra/issues/87 + ./0000-workaround-pyqtgraph.patch + ]; propagatedBuildInputs = [ - opencv3 + opencv4 pyqt5 pyqtgraph numpy @@ -79,10 +78,16 @@ buildPythonPackage rec { pyserial ]; + disabledTestPaths = [ + # Crashes python + "stytra/tests/test_z_experiments.py" + ]; + meta = with lib; { description = "A modular package to control stimulation and track behaviour"; homepage = "https://github.com/portugueslab/stytra"; license = licenses.gpl3Plus; maintainers = with maintainers; [ tbenst ]; + broken = true; # incompatible with pyqtgraph>0.13.0: https://github.com/portugueslab/stytra/issues/87 }; } |