Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' into add_read_nwbmethod
Browse files Browse the repository at this point in the history
h-mayorquin authored Jan 15, 2025
2 parents 9019e7a + 3d04646 commit 12f7faa
Showing 7 changed files with 50 additions and 62 deletions.
56 changes: 28 additions & 28 deletions .github/workflows/run_all_tests.yml
Original file line number Diff line number Diff line change
@@ -22,30 +22,30 @@ jobs:
fail-fast: false
matrix:
include:
- { name: linux-python3.9-minimum , test-tox-env: test-py39-minimum , build-tox-env: build-py39-minimum , python-ver: "3.9" , os: ubuntu-latest }
- { name: linux-python3.10 , test-tox-env: test-py310 , build-tox-env: build-py310 , python-ver: "3.10", os: ubuntu-latest }
- { name: linux-python3.11 , test-tox-env: test-py311 , build-tox-env: build-py311 , python-ver: "3.11", os: ubuntu-latest }
- { name: linux-python3.11-opt , test-tox-env: test-py311-optional , build-tox-env: build-py311 , python-ver: "3.11", os: ubuntu-latest }
- { name: linux-python3.12 , test-tox-env: test-py312 , build-tox-env: build-py312 , python-ver: "3.12", os: ubuntu-latest }
- { name: linux-python3.13 , test-tox-env: test-py313 , build-tox-env: build-py313 , python-ver: "3.13", os: ubuntu-latest }
- { name: linux-python3.13-upgraded , test-tox-env: test-py313-upgraded , build-tox-env: build-py313-upgraded , python-ver: "3.13", os: ubuntu-latest }
- { name: linux-python3.13-prerelease , test-tox-env: test-py313-prerelease, build-tox-env: build-py313-prerelease, python-ver: "3.13", os: ubuntu-latest }
- { name: windows-python3.9-minimum , test-tox-env: test-py39-minimum , build-tox-env: build-py39-minimum , python-ver: "3.9" , os: windows-latest }
- { name: windows-python3.10 , test-tox-env: test-py310 , build-tox-env: build-py310 , python-ver: "3.10", os: windows-latest }
- { name: windows-python3.11 , test-tox-env: test-py311 , build-tox-env: build-py311 , python-ver: "3.11", os: windows-latest }
- { name: windows-python3.11-opt , test-tox-env: test-py311-optional , build-tox-env: build-py311 , python-ver: "3.11", os: windows-latest }
- { name: windows-python3.12 , test-tox-env: test-py312 , build-tox-env: build-py312 , python-ver: "3.12", os: windows-latest }
- { name: windows-python3.13 , test-tox-env: test-py313 , build-tox-env: build-py313 , python-ver: "3.13", os: windows-latest }
- { name: windows-python3.13-upgraded , test-tox-env: test-py313-upgraded , build-tox-env: build-py313-upgraded , python-ver: "3.13", os: windows-latest }
- { name: windows-python3.13-prerelease, test-tox-env: test-py313-prerelease, build-tox-env: build-py313-prerelease, python-ver: "3.13", os: windows-latest }
- { name: macos-python3.9-minimum , test-tox-env: test-py39-minimum , build-tox-env: build-py39-minimum , python-ver: "3.9" , os: macos-13 }
- { name: macos-python3.10 , test-tox-env: test-py310 , build-tox-env: build-py310 , python-ver: "3.10", os: macos-latest }
- { name: macos-python3.11 , test-tox-env: test-py311 , build-tox-env: build-py311 , python-ver: "3.11", os: macos-latest }
- { name: macos-python3.11-opt , test-tox-env: test-py311-optional , build-tox-env: build-py311 , python-ver: "3.11", os: macos-latest }
- { name: macos-python3.12 , test-tox-env: test-py312 , build-tox-env: build-py312 , python-ver: "3.12", os: macos-latest }
- { name: macos-python3.13 , test-tox-env: test-py313 , build-tox-env: build-py313 , python-ver: "3.13", os: macos-latest }
- { name: macos-python3.13-upgraded , test-tox-env: test-py313-upgraded , build-tox-env: build-py313-upgraded , python-ver: "3.13", os: macos-latest }
- { name: macos-python3.13-prerelease , test-tox-env: test-py313-prerelease, build-tox-env: build-py313-prerelease, python-ver: "3.13", os: macos-latest }
- { name: linux-python3.9-minimum , test-tox-env: test-py39-minimum , build-tox-env: build-py39-minimum , python-ver: "3.9" , os: ubuntu-latest }
- { name: linux-python3.10 , test-tox-env: test-py310-pinned , build-tox-env: build-py310-pinned , python-ver: "3.10", os: ubuntu-latest }
- { name: linux-python3.11 , test-tox-env: test-py311-pinned , build-tox-env: build-py311-pinned , python-ver: "3.11", os: ubuntu-latest }
- { name: linux-python3.11-opt , test-tox-env: test-py311-optional-pinned, build-tox-env: build-py311-pinned , python-ver: "3.11", os: ubuntu-latest }
- { name: linux-python3.12 , test-tox-env: test-py312-pinned , build-tox-env: build-py312-pinned , python-ver: "3.12", os: ubuntu-latest }
- { name: linux-python3.13 , test-tox-env: test-py313-pinned , build-tox-env: build-py313-pinned , python-ver: "3.13", os: ubuntu-latest }
- { name: linux-python3.13-upgraded , test-tox-env: test-py313-upgraded , build-tox-env: build-py313-upgraded , python-ver: "3.13", os: ubuntu-latest }
- { name: linux-python3.13-prerelease , test-tox-env: test-py313-prerelease , build-tox-env: build-py313-prerelease, python-ver: "3.13", os: ubuntu-latest }
- { name: windows-python3.9-minimum , test-tox-env: test-py39-minimum , build-tox-env: build-py39-minimum , python-ver: "3.9" , os: windows-latest }
- { name: windows-python3.10 , test-tox-env: test-py310-pinned , build-tox-env: build-py310-pinned , python-ver: "3.10", os: windows-latest }
- { name: windows-python3.11 , test-tox-env: test-py311-pinned , build-tox-env: build-py311-pinned , python-ver: "3.11", os: windows-latest }
- { name: windows-python3.11-opt , test-tox-env: test-py311-optional-pinned, build-tox-env: build-py311-pinned , python-ver: "3.11", os: windows-latest }
- { name: windows-python3.12 , test-tox-env: test-py312-pinned , build-tox-env: build-py312-pinned , python-ver: "3.12", os: windows-latest }
- { name: windows-python3.13 , test-tox-env: test-py313-pinned , build-tox-env: build-py313-pinned , python-ver: "3.13", os: windows-latest }
- { name: windows-python3.13-upgraded , test-tox-env: test-py313-upgraded , build-tox-env: build-py313-upgraded , python-ver: "3.13", os: windows-latest }
- { name: windows-python3.13-prerelease, test-tox-env: test-py313-prerelease , build-tox-env: build-py313-prerelease, python-ver: "3.13", os: windows-latest }
- { name: macos-python3.9-minimum , test-tox-env: test-py39-minimum , build-tox-env: build-py39-minimum , python-ver: "3.9" , os: macos-13 }
- { name: macos-python3.10 , test-tox-env: test-py310-pinned , build-tox-env: build-py310-pinned , python-ver: "3.10", os: macos-latest }
- { name: macos-python3.11 , test-tox-env: test-py311-pinned , build-tox-env: build-py311-pinned , python-ver: "3.11", os: macos-latest }
- { name: macos-python3.11-opt , test-tox-env: test-py311-optional-pinned, build-tox-env: build-py311-pinned , python-ver: "3.11", os: macos-latest }
- { name: macos-python3.12 , test-tox-env: test-py312-pinned , build-tox-env: build-py312-pinned , python-ver: "3.12", os: macos-latest }
- { name: macos-python3.13 , test-tox-env: test-py313-pinned , build-tox-env: build-py313-pinned , python-ver: "3.13", os: macos-latest }
- { name: macos-python3.13-upgraded , test-tox-env: test-py313-upgraded , build-tox-env: build-py313-upgraded , python-ver: "3.13", os: macos-latest }
- { name: macos-python3.13-prerelease , test-tox-env: test-py313-prerelease , build-tox-env: build-py313-prerelease, python-ver: "3.13", os: macos-latest }
steps:
- name: Cancel non-latest runs
uses: styfle/cancel-workflow-action@0.11.0
@@ -139,10 +139,10 @@ jobs:
matrix:
include:
- { name: conda-linux-python3.9-minimum , test-tox-env: test-py39-minimum , build-tox-env: build-py39-minimum , python-ver: "3.9" , os: ubuntu-latest }
- { name: conda-linux-python3.10 , test-tox-env: test-py310 , build-tox-env: build-py310 , python-ver: "3.10", os: ubuntu-latest }
- { name: conda-linux-python3.11 , test-tox-env: test-py311 , build-tox-env: build-py311 , python-ver: "3.11", os: ubuntu-latest }
- { name: conda-linux-python3.12 , test-tox-env: test-py312 , build-tox-env: build-py312 , python-ver: "3.12", os: ubuntu-latest }
- { name: conda-linux-python3.13 , test-tox-env: test-py313 , build-tox-env: build-py313 , python-ver: "3.13", os: ubuntu-latest }
- { name: conda-linux-python3.10 , test-tox-env: test-py310-pinned , build-tox-env: build-py310-pinned , python-ver: "3.10", os: ubuntu-latest }
- { name: conda-linux-python3.11 , test-tox-env: test-py311-pinned , build-tox-env: build-py311-pinned , python-ver: "3.11", os: ubuntu-latest }
- { name: conda-linux-python3.12 , test-tox-env: test-py312-pinned , build-tox-env: build-py312-pinned , python-ver: "3.12", os: ubuntu-latest }
- { name: conda-linux-python3.13 , test-tox-env: test-py313-pinned , build-tox-env: build-py313-pinned , python-ver: "3.13", os: ubuntu-latest }
- { name: conda-linux-python3.13-upgraded , test-tox-env: test-py313-upgraded , build-tox-env: build-py313-upgraded , python-ver: "3.13", os: ubuntu-latest }
- { name: conda-linux-python3.13-prerelease, test-tox-env: test-py313-prerelease, build-tox-env: build-py313-prerelease, python-ver: "3.13", os: ubuntu-latest }
steps:
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -12,6 +12,10 @@
- Deprecated `ImageMaskSeries` neurodata type. @rly [#1941](https://github.com/NeurodataWithoutBorders/pynwb/pull/1941)
- Removed python 3.8 support, added python 3.13 support. @stephprince [#2007](https://github.com/NeurodataWithoutBorders/pynwb/pull/2007)

### Documentation and tutorial enhancements
- Updated `SpikeEventSeries`, `DecompositionSeries`, and `FilteredEphys` examples. @stephprince [#2012](https://github.com/NeurodataWithoutBorders/pynwb/pull/2012)
- Replaced deprecated `scipy.misc.face` dataset in the images tutorial with another example. @stephprince [#2016](https://github.com/NeurodataWithoutBorders/pynwb/pull/2016)

## PyNWB 2.8.3 (November 19, 2024)

### Enhancements and minor changes
18 changes: 9 additions & 9 deletions docs/gallery/domain/ecephys.py
Original file line number Diff line number Diff line change
@@ -208,6 +208,7 @@
name="ElectricalSeries",
description="LFP data",
data=lfp_data,
filtering='Low-pass filter at 300 Hz',
electrodes=all_table_region,
starting_time=0.0,
rate=200.0,
@@ -237,8 +238,8 @@
lfp = LFP(electrical_series=lfp_electrical_series)

####################
# Unlike the raw data, which we put into the acquisition group of the :py:class:`~pynwb.file.NWBFile`,
# LFP data is typically considered processed data because the raw data was filtered and downsampled to generate the LFP.
# LFP refers to data that has been low-pass filtered, typically below 300 Hz. This data may also be downsampled.
# Because it is filtered and potentially resampled, it is categorized as processed data.
#
# Create a processing module named ``"ecephys"`` and add the :py:class:`~pynwb.ecephys.LFP` object to it.
# This is analogous to how we can store the :py:class:`~pynwb.behavior.Position` object in a processing module
@@ -250,9 +251,9 @@
ecephys_module.add(lfp)

#######################
# If the derived data is filtered but not downsampled, you can store the data in an
# :py:class:`~pynwb.ecephys.ElectricalSeries` object in a :py:class:`~pynwb.ecephys.FilteredEphys` object
# instead of a :py:class:`~pynwb.ecephys.LFP` object.
# If your data is filtered for frequency ranges other than LFP — such as Gamma or Theta — you should store it in an
# :py:class:`~pynwb.ecephys.ElectricalSeries` and encapsulate it within a
# :py:class:`~pynwb.ecephys.FilteredEphys` object.

from pynwb.ecephys import FilteredEphys

@@ -261,6 +262,7 @@
name="FilteredElectricalSeries",
description="Filtered data",
data=filtered_data,
filtering='Band-pass filtered between 4 and 8 Hz',
electrodes=all_table_region,
starting_time=0.0,
rate=200.0,
@@ -300,8 +302,6 @@
decomp_series.add_band(
band_name=band_name,
band_limits=band_limits,
band_mean=np.nan,
band_stdev=np.nan,
)

ecephys_module.add(decomp_series)
@@ -355,7 +355,7 @@
# unsorted spiking activity (e.g., multi-unit activity detected via threshold crossings during data acquisition).
# This information can be stored using :py:class:`~pynwb.ecephys.SpikeEventSeries` objects.

spike_snippets = np.random.rand(20, 3, 40) # 20 events, 3 channels, 40 samples per event
spike_snippets = np.random.rand(40, 3, 30) # 40 events, 3 channels, 30 samples per event
shank0 = nwbfile.create_electrode_table_region(
region=[0, 1, 2],
description="shank0",
@@ -365,7 +365,7 @@
name='SpikeEvents_Shank0',
description="events detected with 100uV threshold",
data=spike_snippets,
timestamps=np.arange(20),
timestamps=np.arange(40).astype(float),
electrodes=shank0,
)
nwbfile.add_acquisition(spike_events)
20 changes: 2 additions & 18 deletions docs/gallery/domain/images.py
Original file line number Diff line number Diff line change
@@ -296,30 +296,14 @@
# :py:class:`~pynwb.image.IndexSeries` that indexes into the
# :py:class:`~pynwb.base.Images`.

from scipy import misc

from pynwb.base import ImageReferences
from pynwb.image import GrayscaleImage, Images, IndexSeries, RGBImage

gs_face = GrayscaleImage(
name="gs_face",
data=misc.face(gray=True),
description="Grayscale version of a raccoon.",
resolution=35.433071,
)

rgb_face = RGBImage(
name="rgb_face",
data=misc.face(),
resolution=70.0,
description="RGB version of a raccoon.",
)

images = Images(
name="raccoons",
images=[rgb_face, gs_face],
images=[rgb_logo, gs_logo],
description="A collection of raccoons.",
order_of_images=ImageReferences("order_of_images", [rgb_face, gs_face]),
order_of_images=ImageReferences("order_of_images", [rgb_logo, gs_logo]),
)

idx_series = IndexSeries(
2 changes: 1 addition & 1 deletion docs/gallery/general/plot_read_basics.py
Original file line number Diff line number Diff line change
@@ -82,7 +82,7 @@
# .. seealso::
#
# Learn about all the different ways you can download data from the DANDI Archive
# `here <https://www.dandiarchive.org/handbook/12_download/>`_
# `here <https://docs.dandiarchive.org/12_download/>`_
#
# .. seealso:: Streaming data
#
8 changes: 4 additions & 4 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -147,8 +147,8 @@ def __call__(self, filename):
'fsspec': ("https://filesystem-spec.readthedocs.io/en/latest/", None),
'nwbwidgets': ("https://nwb-widgets.readthedocs.io/en/latest/", None),
'nwb-overview': ("https://nwb-overview.readthedocs.io/en/latest/", None),
'zarr': ("https://zarr.readthedocs.io/en/stable/", None),
'hdmf-zarr': ("https://hdmf-zarr.readthedocs.io/en/latest/", None),
'zarr': ("https://zarr.readthedocs.io/en/v2.18.4/", None), # TODO - update when hdmf-zarr supports Zarr 3.0
'hdmf-zarr': ("https://hdmf-zarr.readthedocs.io/en/stable/", None),
'numcodecs': ("https://numcodecs.readthedocs.io/en/latest/", None),
}

@@ -159,9 +159,9 @@ def __call__(self, filename):
'pynwb': ('https://github.com/NeurodataWithoutBorders/pynwb/%s', '%s'),
'nwb_overview': ('https://nwb-overview.readthedocs.io/en/latest/%s', '%s'),
'hdmf-docs': ('https://hdmf.readthedocs.io/en/stable/%s', '%s'),
'dandi': ('https://www.dandiarchive.org/%s', '%s'),
'dandi': ('https://dandiarchive.org/%s', '%s'),
"nwbinspector": ("https://nwbinspector.readthedocs.io/en/dev/%s", "%s"),
'hdmf-zarr': ('https://hdmf-zarr.readthedocs.io/en/latest/%s', '%s'),
'hdmf-zarr': ('https://hdmf-zarr.readthedocs.io/en/stable/%s', '%s'),
}

nitpicky = True
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -4,6 +4,7 @@
# and then run "tox" from this directory.

[tox]
envlist = test-py{39,310,311,312,313}-pinned
requires = pip >= 22.0

[testenv]
@@ -32,8 +33,7 @@ commands =
build: python -m build
wheelinstall: python -c "import pynwb"

# list of pre-defined environments. (Technically environments not listed here
# like build-py312 can also be used.)
# list of pre-defined environments.
[testenv:test-py313-upgraded]
[testenv:test-py313-prerelease]
[testenv:test-py311-optional-pinned] # some optional reqs not compatible with py312 yet

0 comments on commit 12f7faa

Please sign in to comment.