From 21a86983704ef0bcf3be7bc9baa2af807d61eb40 Mon Sep 17 00:00:00 2001 From: Michael Beyeler Date: Thu, 5 May 2022 14:30:26 -0700 Subject: [PATCH] Release 0.8.0 (#489) * Release 0.8.0 --- doc/developers/releases.rst | 14 +----- doc/users/release_notes.rst | 53 +++++++++++++++++++--- pulse2percept/percepts/tests/test_base.py | 19 ++++---- pulse2percept/stimuli/tests/test_videos.py | 9 ++-- pulse2percept/version.py | 2 +- pulse2percept/viz/tests/test_argus.py | 13 +++--- pulse2percept/viz/tests/test_base.py | 7 +-- 7 files changed, 75 insertions(+), 42 deletions(-) diff --git a/doc/developers/releases.rst b/doc/developers/releases.rst index 9e202250..b16405ef 100644 --- a/doc/developers/releases.rst +++ b/doc/developers/releases.rst @@ -17,17 +17,7 @@ Before the Release Uploading the Release to PyPI ----------------------------- -pulse2percept wheels are built using Azure Pipelines to support the following: - -- Python 3.5 - 3.7 -- Linux: manylinux1, manylinux2010 for i686 and x86_64 -- macOS: OS X 10.6 and up -- Windows: Server 2016 with VS 2017 for win-32 and amd64 (closes issue #88) - -Wheels are built using the `cibuildwheel`_ package. Once their `PR194`_ is merged, -we can start automating the PyPI upload whenever a tag is pushed using GitHub Actions. - -Until then, the artifacts need to be downloaded from Azure Pipelines. +pulse2percept wheels are built using GitHub Actions. .. important:: @@ -74,7 +64,7 @@ Releasing the code on GitHub branch should be a release. * Draft a new release on PR and tag it with "vX.Y". - Upload all the wheels you downloaded as artifacts from Azure Pipelines + Upload all the wheels you downloaded as artifacts from GitHub Actions above. After the release diff --git a/doc/users/release_notes.rst b/doc/users/release_notes.rst index 718116c1..008214b4 100644 --- a/doc/users/release_notes.rst +++ b/doc/users/release_notes.rst @@ -4,26 +4,54 @@ Release Notes ============= -.. important:: - - **pulse2percept 0.6 was the last version to support Python <= 3.5.** - pulse2percept 0.7+ requires Python 3.6+. - -v0.8.0 (2021, planned) ----------------------- +v0.8.0 (2022-05-05) +------------------- Highlights ~~~~~~~~~~ +* New implants: :py:class:`~pulse2percept.implants.BVT44` [Petoe2021]_ + (:pull:`465`) +* New models: :py:class:`~pulse2percept.models.BiphasicAxonMapModel` + [Granley2021]_ (:pull:`398`) and + :py:class:`~pulse2percept.models.Thompson2003Model` [Thompson2003]_ + (:pull:`448`) +* New datasets: :py:func:`~pulse2percept.datasets.load_greenwald2009` + [Greenwald2009]_ (:pull:`459`) and + :py:func:`~pulse2percept.datasets.load_perezfornos2012` + [PerezFornos2012]_ (:pull:`457`) +* New stimuli: :py:class:`~pulse2percept.stimuli.BarStimulus`, + :py:class:`~pulse2percept.stimuli.GratingStimulus` (:pull:`310`) +* Python 3.10 support (:pull:`479`) + New features ~~~~~~~~~~~~ +* New gallery examples for visual field maps (:pull:`432`), Nanduri + dataset (:pull:`452`), psychophysics stimuli (:pull:`480`), and + :py:class:`~pulse2percept.models.BiphasicAxonMapModel` (:pull:`484`) +* Crop method for :py:class:`~pulse2percept.stimuli.ImageStimulus` and + :py:class:`~pulse2percept.stimuli.VideoStimulus` objects (:pull:`455`) +* Specify number of OpenMP threads (:pull:`453`) +* Ignore stimuli of deactivated electrodes (:pull:`444`) +* Percepts can now have a limited number of gray levels (:pull:`443`) +* Automatic stimulus reshaping for + :py:class:`~pulse2percept.stimuli.ImageStimulus` and + :py:class:`~pulse2percept.stimuli.VideoStimulus` objects (:pull:`434`) +* :py:class:`~pulse2percept.implants.ElectrodeGrid` can now have different + spacings in x and y direction (:pull:`430`) +* Add new plotting styles for a grid's ``plot`` method (:pull:`426`, + :pull:`433`, :pull:`446`) +* Additional options for :py:func:`~pulse2percept.viz.scatter_correlation` + (:pull:`422`) + API changes ~~~~~~~~~~~ Backward-incompatible changes ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +* ``RetinalCoordTransform`` has been renamed to ``VisualFieldMap`` (:pull:`432`) * ``plot_axon_map`` was removed: Use :py:meth:`pulse2percept.models.AxonMapModel.plot` * ``plot_implant_on_axon_map`` was removed: Use :py:meth:`pulse2percept.implants.ProsthesisSystem.plot` on top of @@ -32,9 +60,20 @@ Backward-incompatible changes Deprecations ^^^^^^^^^^^^ +None. + Bug fixes ~~~~~~~~~ +* Fix handling of multi-channel images for scikit-image >= 0.19 (:pull:`473`) +* Fix corrupted stimuli when created from multiple stimuli (:pull:`469`) +* :py:func:`~pulse2percept.viz.plot_argus_phosphenes` now works for sliced subsets of data + (:pull:`415`) +* Fix plot window for the :py:class:`~pulse2percept.models.AxonMapModel` ``plot`` method + (:pull:`414`) +* Keep metadata intact when stimuli are created from other stimuli (:pull:`396`) +* Be able to run :py:class:`~pulse2percept.models.AxonMapModel` on a single pixel (:pull:`395`) +* Mirror-flip the :py:class:`~pulse2percept.implants.BVT24` implant (:pull:`393`) v0.7.1 (2021-06-21) ------------------- diff --git a/pulse2percept/percepts/tests/test_base.py b/pulse2percept/percepts/tests/test_base.py index dbc2d46d..c293045e 100644 --- a/pulse2percept/percepts/tests/test_base.py +++ b/pulse2percept/percepts/tests/test_base.py @@ -1,16 +1,17 @@ +from pulse2percept.utils import Grid2D +from pulse2percept.percepts import Percept +from skimage.io import imread +from skimage import img_as_float +from imageio import mimread +from matplotlib.animation import FuncAnimation +from matplotlib.axes import Subplot +import matplotlib.pyplot as plt import os import numpy as np import pytest import numpy.testing as npt -import matplotlib.pyplot as plt -from matplotlib.axes import Subplot -from matplotlib.animation import FuncAnimation -from imageio import mimread -from skimage import img_as_float -from skimage.io import imread - -from pulse2percept.percepts import Percept -from pulse2percept.utils import Grid2D +import matplotlib +matplotlib.use('Agg') def test_Percept(): diff --git a/pulse2percept/stimuli/tests/test_videos.py b/pulse2percept/stimuli/tests/test_videos.py index b17847a8..aeea7d16 100644 --- a/pulse2percept/stimuli/tests/test_videos.py +++ b/pulse2percept/stimuli/tests/test_videos.py @@ -1,12 +1,13 @@ +from pulse2percept.stimuli import VideoStimulus, BostonTrain +from skimage.io import imsave +from matplotlib.animation import FuncAnimation import os import numpy as np import numpy.testing as npt import pytest from imageio import mimwrite -from matplotlib.animation import FuncAnimation -from skimage.io import imsave - -from pulse2percept.stimuli import VideoStimulus, BostonTrain +import matplotlib +matplotlib.use('Agg') def test_VideoStimulus(): diff --git a/pulse2percept/version.py b/pulse2percept/version.py index 7556fbd9..32a90a3b 100644 --- a/pulse2percept/version.py +++ b/pulse2percept/version.py @@ -1 +1 @@ -__version__ = '0.8.0.dev0' +__version__ = '0.8.0' diff --git a/pulse2percept/viz/tests/test_argus.py b/pulse2percept/viz/tests/test_argus.py index 57287899..2c44b165 100644 --- a/pulse2percept/viz/tests/test_argus.py +++ b/pulse2percept/viz/tests/test_argus.py @@ -1,13 +1,14 @@ +from pulse2percept.viz import (plot_argus_phosphenes, + plot_argus_simulated_phosphenes) +from pulse2percept.implants import ArgusI, ArgusII, AlphaAMS +from pulse2percept.models import AxonMapModel, ScoreboardModel +import matplotlib.pyplot as plt import numpy as np import pandas as pd import numpy.testing as npt import pytest -import matplotlib.pyplot as plt - -from pulse2percept.models import AxonMapModel, ScoreboardModel -from pulse2percept.implants import ArgusI, ArgusII, AlphaAMS -from pulse2percept.viz import (plot_argus_phosphenes, - plot_argus_simulated_phosphenes) +import matplotlib +matplotlib.use('Agg') def test_plot_argus_phosphenes(): diff --git a/pulse2percept/viz/tests/test_base.py b/pulse2percept/viz/tests/test_base.py index fd68d7c1..28f01bf4 100644 --- a/pulse2percept/viz/tests/test_base.py +++ b/pulse2percept/viz/tests/test_base.py @@ -1,10 +1,11 @@ +from pulse2percept.viz import scatter_correlation, correlation_matrix +import matplotlib.pyplot as plt import numpy as np import pandas as pd import pytest import numpy.testing as npt -import matplotlib.pyplot as plt - -from pulse2percept.viz import scatter_correlation, correlation_matrix +import matplotlib +matplotlib.use('Agg') def test_scatter_correlation():