Skip to content

Commit

Permalink
Merge branch 'dev' into fix/electrodegroup_position
Browse files Browse the repository at this point in the history
  • Loading branch information
stephprince committed Jul 16, 2024
2 parents c7962f7 + 570fb3b commit 6cdd381
Show file tree
Hide file tree
Showing 61 changed files with 927 additions and 606 deletions.
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ Show how to reproduce the new behavior (can be a bug fix or a new feature)
- [ ] Did you update CHANGELOG.md with your changes?
- [ ] Have you checked our [Contributing](https://github.com/NeurodataWithoutBorders/pynwb/blob/dev/docs/CONTRIBUTING.rst) document?
- [ ] Have you ensured the PR clearly describes the problem and the solution?
- [ ] Is your contribution compliant with our coding style? This can be checked running `flake8` from the source directory.
- [ ] Is your contribution compliant with our coding style? This can be checked running `ruff check . && codespell` from the source directory.
- [ ] Have you checked to ensure that there aren't other open [Pull Requests](https://github.com/NeurodataWithoutBorders/pynwb/pulls) for the same change?
- [ ] Have you included the relevant issue number using "Fix #XXX" notation where XXX is the issue number? By including "Fix #XXX" you allow GitHub to close issue #XXX when the PR is merged.
2 changes: 1 addition & 1 deletion .github/workflows/check_sphinx_links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Install Sphinx dependencies and package
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements-doc.txt
python -m pip install -r requirements-doc.txt -r requirements-opt.txt
python -m pip install .
- name: Check Sphinx internal and external links
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/run_all_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,24 @@ jobs:
- { name: linux-python3.9 , test-tox-env: py39 , build-tox-env: build-py39 , python-ver: "3.9" , os: ubuntu-latest }
- { name: linux-python3.10 , test-tox-env: py310 , build-tox-env: build-py310 , python-ver: "3.10", os: ubuntu-latest }
- { name: linux-python3.11 , test-tox-env: py311 , build-tox-env: build-py311 , python-ver: "3.11", os: ubuntu-latest }
- { name: linux-python3.11-opt , test-tox-env: py311-optional , build-tox-env: build-py311 , python-ver: "3.11", os: ubuntu-latest }
- { name: linux-python3.12 , test-tox-env: py312 , build-tox-env: build-py312 , python-ver: "3.12", os: ubuntu-latest }
- { name: linux-python3.12-upgraded , test-tox-env: py312-upgraded , build-tox-env: build-py312-upgraded , python-ver: "3.12", os: ubuntu-latest }
- { name: linux-python3.12-prerelease , test-tox-env: py312-prerelease, build-tox-env: build-py312-prerelease, python-ver: "3.12", os: ubuntu-latest }
- { name: windows-python3.8-minimum , test-tox-env: py38-minimum , build-tox-env: build-py38-minimum , python-ver: "3.8" , os: windows-latest }
- { name: windows-python3.9 , test-tox-env: py39 , build-tox-env: build-py39 , python-ver: "3.9" , os: windows-latest }
- { name: windows-python3.10 , test-tox-env: py310 , build-tox-env: build-py310 , python-ver: "3.10", os: windows-latest }
- { name: windows-python3.11 , test-tox-env: py311 , build-tox-env: build-py311 , python-ver: "3.11", os: windows-latest }
- { name: windows-python3.11-opt , test-tox-env: py311-optional , build-tox-env: build-py311 , python-ver: "3.11", os: windows-latest }
- { name: windows-python3.12 , test-tox-env: py312 , build-tox-env: build-py312 , python-ver: "3.12", os: windows-latest }
- { name: windows-python3.12-upgraded , test-tox-env: py312-upgraded , build-tox-env: build-py312-upgraded , python-ver: "3.12", os: windows-latest }
- { name: windows-python3.12-prerelease, test-tox-env: py312-prerelease, build-tox-env: build-py312-prerelease, python-ver: "3.11", os: windows-latest }
# minimum versions of dependencies do not have wheels or cannot be built on macos-arm64
- { name: macos-python3.8-minimum , test-tox-env: py38-minimum , build-tox-env: build-py38-minimum , python-ver: "3.8" , os: macos-13 }
- { name: macos-python3.9 , test-tox-env: py39 , build-tox-env: build-py39 , python-ver: "3.9" , os: macos-13 }
- { name: macos-python3.9 , test-tox-env: py39 , build-tox-env: build-py39 , python-ver: "3.9" , os: macos-latest }
- { name: macos-python3.10 , test-tox-env: py310 , build-tox-env: build-py310 , python-ver: "3.10", os: macos-latest }
- { name: macos-python3.11 , test-tox-env: py311 , build-tox-env: build-py311 , python-ver: "3.11", os: macos-latest }
- { name: macos-python3.11-opt , test-tox-env: py311-optional , build-tox-env: build-py311 , python-ver: "3.11", os: macos-latest }
- { name: macos-python3.12 , test-tox-env: py312 , build-tox-env: build-py312 , python-ver: "3.12", os: macos-latest }
- { name: macos-python3.12-upgraded , test-tox-env: py312-upgraded , build-tox-env: build-py312-upgraded , python-ver: "3.12", os: macos-latest }
- { name: macos-python3.12-prerelease , test-tox-env: py312-prerelease, build-tox-env: build-py312-prerelease, python-ver: "3.12", os: macos-latest }
Expand Down Expand Up @@ -95,6 +99,7 @@ jobs:
- { name: windows-gallery-python3.8-minimum , test-tox-env: gallery-py38-minimum , python-ver: "3.8" , os: windows-latest }
- { name: windows-gallery-python3.12-upgraded , test-tox-env: gallery-py312-upgraded , python-ver: "3.12", os: windows-latest }
- { name: windows-gallery-python3.12-prerelease, test-tox-env: gallery-py312-prerelease, python-ver: "3.12", os: windows-latest }
# minimum versions of dependencies do not have wheels or cannot be built on macos-arm64
- { name: macos-gallery-python3.8-minimum , test-tox-env: gallery-py38-minimum , python-ver: "3.8" , os: macos-13 }
- { name: macos-gallery-python3.12-upgraded , test-tox-env: gallery-py312-upgraded , python-ver: "3.12", os: macos-latest }
- { name: macos-gallery-python3.12-prerelease , test-tox-env: gallery-py312-prerelease, python-ver: "3.12", os: macos-latest }
Expand Down Expand Up @@ -198,7 +203,7 @@ jobs:
include:
- { name: conda-linux-python3.12-ros3 , python-ver: "3.12", os: ubuntu-latest }
- { name: conda-windows-python3.12-ros3, python-ver: "3.12", os: windows-latest }
- { name: conda-macos-python3.12-ros3 , python-ver: "3.12", os: macos-13 } # This is due to DANDI not supporting osx-arm64. Will support macos-latest when this changes.
- { name: conda-macos-python3.12-ros3 , python-ver: "3.12", os: macos-latest }
steps:
- name: Cancel non-latest runs
uses: styfle/[email protected]
Expand Down Expand Up @@ -245,7 +250,7 @@ jobs:
include:
- { name: conda-linux-gallery-python3.12-ros3 , python-ver: "3.12", os: ubuntu-latest }
- { name: conda-windows-gallery-python3.12-ros3, python-ver: "3.12", os: windows-latest }
- { name: conda-macos-gallery-python3.12-ros3 , python-ver: "3.12", os: macos-13 } # This is due to DANDI not supporting osx-arm64. Will support macos-latest when this changes.
- { name: conda-macos-gallery-python3.12-ros3 , python-ver: "3.12", os: macos-latest }
steps:
- name: Cancel non-latest runs
uses: styfle/[email protected]
Expand All @@ -270,7 +275,6 @@ jobs:

- name: Install run dependencies
run: |
pip install matplotlib
pip install .
pip list
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/run_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:

jobs:
run-coverage:
name: ${{ matrix.os }}
name: ${{ matrix.os }}, opt reqs ${{ matrix.opt_req }}
runs-on: ${{ matrix.os }}
# TODO handle forks
# run pipeline on either a push event or a PR event on a fork
Expand All @@ -21,7 +21,11 @@ jobs:
shell: bash
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
include:
- { os: ubuntu-latest , opt_req: true }
- { os: ubuntu-latest , opt_req: false }
- { os: windows-latest, opt_req: false }
- { os: macos-latest , opt_req: false }
env:
OS: ${{ matrix.os }}
PYTHON: '3.12'
Expand All @@ -47,9 +51,9 @@ jobs:
python -m pip install --upgrade pip
python -m pip install -r requirements-dev.txt -r requirements.txt
# - name: Install optional dependencies
# if: ${{ matrix.opt_req }}
# run: python -m pip install -r requirements-opt.txt
- name: Install optional dependencies
if: ${{ matrix.opt_req }}
run: python -m pip install -r requirements-opt.txt

- name: Install package
run: |
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
- { name: linux-python3.12-upgraded , test-tox-env: py312-upgraded , build-tox-env: build-py312-upgraded , python-ver: "3.12", os: ubuntu-latest , upload-wheels: true }
- { name: windows-python3.8-minimum , test-tox-env: py38-minimum , build-tox-env: build-py38-minimum , python-ver: "3.8" , os: windows-latest }
- { name: windows-python3.12-upgraded , test-tox-env: py312-upgraded , build-tox-env: build-py312-upgraded , python-ver: "3.12", os: windows-latest }
# minimum versions of dependencies do not have wheels or cannot be built on macos-arm64
- { name: macos-python3.8-minimum , test-tox-env: py38-minimum , build-tox-env: build-py38-minimum , python-ver: "3.8" , os: macos-13 }
steps:
- name: Cancel non-latest runs
Expand Down
1 change: 1 addition & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ formats: all
python:
install:
- requirements: requirements-doc.txt
- requirements: requirements-opt.txt
- requirements: requirements.txt

# Optionally include all submodules
Expand Down
29 changes: 27 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,31 @@
# PyNWB Changelog

## PyNWB 2.7.0 (Upcoming)
## PyNWB 2.8.2 (Upcoming)

### Documentation and tutorial enhancements
- Added pre-release pull request instructions to release process documentation @stephprince [#1928](https://github.com/NeurodataWithoutBorders/pynwb/pull/1928)

## PyNWB 2.8.1 (July 3, 2024)

### Documentation and tutorial enhancements
- Simplified the introduction to NWB tutorial. @rly [#1914](https://github.com/NeurodataWithoutBorders/pynwb/pull/1914)
- Simplified the ecephys and ophys tutorials. [#1915](https://github.com/NeurodataWithoutBorders/pynwb/pull/1915)
- Add comments to `src/pynwb/io/file.py` to improve developer documentation. @rly [#1925](https://github.com/NeurodataWithoutBorders/pynwb/pull/1925)

### Bug fixes
- Fixed use of `channel_conversion` in `TimeSeries` `get_data_in_units`. @rohanshah [1923](https://github.com/NeurodataWithoutBorders/pynwb/pull/1923)

## PyNWB 2.8.0 (May 28, 2024)

### Enhancements and minor changes
- Set rate default value inside `mock_ElectricalSeries` to avoid having to set `rate=None` explicitly when passing timestamps. @h-mayorquin [#1894](https://github.com/NeurodataWithoutBorders/pynwb/pull/1894)
- Integrate validation through the `TypeConfigurator`. @mavaylon1 [#1829](https://github.com/NeurodataWithoutBorders/pynwb/pull/1829)
- Exposed `aws_region` to `NWBHDF5IO`. @rly [#1903](https://github.com/NeurodataWithoutBorders/pynwb/pull/1903)

### Bug fixes
- Revert changes in PyNWB 2.7.0 that allow datetimes without a timezone and without a time while issues with DANDI upload of NWB files missing timezone are resolved. @rly [#1908](https://github.com/NeurodataWithoutBorders/pynwb/pull/1908)

## PyNWB 2.7.0 (May 2, 2024)

### Enhancements and minor changes
- Added `bounds` field to `SpatialSeries` to set optional boundary range (min, max) for each dimension of data. @mavaylon1 [#1869](https://github.com/NeurodataWithoutBorders/pynwb/pull/1869/files)
Expand Down Expand Up @@ -321,7 +346,7 @@

### Tutorial enhancements:
- Added new tutorial for intracellular electrophysiology to describe the use of the new metadata tables
and declared the previous tutoral using ``SweepTable`` as deprecated. @oruebel (#1349)
and declared the previous tutorial using ``SweepTable`` as deprecated. @oruebel (#1349)
- Added new tutorial for querying intracellular electrophysiology metadata
(``docs/gallery/domain/plot_icephys_pandas.py``). @oruebel (#1349, #1383)
- Added thumbnails for tutorials to improve presentation of online docs. @oruebel (#1349)
Expand Down
5 changes: 0 additions & 5 deletions MANIFEST.in

This file was deleted.

6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ Overall Health
:target: https://github.com/neurodatawithoutborders/pynwb/blob/dev/license.txt
:alt: PyPI - License

**Conda**
**Conda Feedstock**

.. image:: https://circleci.com/gh/conda-forge/pynwb-feedstock.svg?style=shield
:target: https://circleci.com/gh/conda-forge/pynwb-feedstock
.. image:: https://dev.azure.com/conda-forge/feedstock-builds/_apis/build/status/pynwb-feedstock?branchName=main
:target: https://dev.azure.com/conda-forge/feedstock-builds/_build/latest?definitionId=5703&branchName=main
:alt: Conda Feedstock Status

NWB Format API
Expand Down
6 changes: 5 additions & 1 deletion docs/gallery/advanced_io/h5dataio.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,20 @@
#

from datetime import datetime

from dateutil.tz import tzlocal

from pynwb import NWBFile

start_time = datetime(2017, 4, 3, hour=11, minute=0)
start_time = datetime(2017, 4, 3, 11, tzinfo=tzlocal())

nwbfile = NWBFile(
session_description="demonstrate advanced HDF5 I/O features",
identifier="NWB123",
session_start_time=start_time,
)


####################
# Normally if we create a :py:class:`~pynwb.base.TimeSeries` we would do

Expand Down
7 changes: 5 additions & 2 deletions docs/gallery/advanced_io/linking_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,15 @@
# sphinx_gallery_thumbnail_path = 'figures/gallery_thumbnails_linking_data.png'

from datetime import datetime
from uuid import uuid4

import numpy as np
from dateutil.tz import tzlocal

from pynwb import NWBHDF5IO, NWBFile, TimeSeries
from uuid import uuid4

# Create the base data
start_time = datetime(2017, 4, 3, hour=11, minute=0)
start_time = datetime(2017, 4, 3, 11, tzinfo=tzlocal())
data = np.arange(1000).reshape((100, 10))
timestamps = np.arange(100)
filename1 = "external1_example.nwb"
Expand Down
2 changes: 1 addition & 1 deletion docs/gallery/advanced_io/parallelio.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
# from datetime import datetime
# from hdmf.backends.hdf5.h5_utils import H5DataIO
#
# start_time = datetime(2018, 4, 25, hour=2, minute=30, second=3)
# start_time = datetime(2018, 4, 25, 2, 30, 3, tzinfo=tz.gettz("US/Pacific"))
# fname = "test_parallel_pynwb.nwb"
# rank = MPI.COMM_WORLD.rank # The process ID (integer 0-3 for 4-process run)
#
Expand Down
8 changes: 6 additions & 2 deletions docs/gallery/advanced_io/plot_iterative_write.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,13 @@

# sphinx_gallery_thumbnail_path = 'figures/gallery_thumbnails_iterative_write.png'
from datetime import datetime
from pynwb import NWBHDF5IO, NWBFile, TimeSeries
from uuid import uuid4

from dateutil.tz import tzlocal

from pynwb import NWBHDF5IO, NWBFile, TimeSeries


def write_test_file(filename, data, close_io=True):
"""
Expand All @@ -125,7 +129,7 @@ def write_test_file(filename, data, close_io=True):
"""

# Create a test NWBfile
start_time = datetime(2017, 4, 3, hour=11, minute=30)
start_time = datetime(2017, 4, 3, 11, tzinfo=tzlocal())
nwbfile = NWBFile(
session_description="demonstrate iterative write",
identifier=str(uuid4()),
Expand Down
Loading

0 comments on commit 6cdd381

Please sign in to comment.