Skip to content

Commit 46627b5

Browse files
rlyoruebel
andauthored
Upgrade requirements and generate test files workflow (#1550)
Co-authored-by: Oliver Ruebel <[email protected]>
1 parent fc78e34 commit 46627b5

17 files changed

+104
-80
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ body:
6060
attributes:
6161
label: Python Version
6262
options:
63-
- 3.7
64-
- 3.8
65-
- 3.9
66-
- 3.10
63+
- "3.7"
64+
- "3.8"
65+
- "3.9"
66+
- "3.10"
6767
validations:
6868
required: true
6969
- type: textarea

.github/workflows/generate_test_files.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,4 @@ jobs:
3939
with:
4040
name: test-files-${{ matrix.name }}
4141
path: |
42-
tests/back_compat/*.nwb
42+
src/pynwb/testing/*.nwb

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,5 +69,8 @@ tests/coverage/htmlcov
6969
# vscode
7070
.vscode/
7171

72-
#mypy
72+
# mypy
7373
.mypy_cache/
74+
75+
# macos
76+
.DS_Store

CHANGELOG.md

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,39 @@
11
# PyNWB Changelog
22

3-
## PyNWB 2.1.1 (Upcoming)
3+
## PyNWB 2.1.1 (September 1, 2022)
44

55
### Documentation and tutorial enhancements:
6-
- Support explicit ordering of sphinx gallery tutorials in the docs. @oruebel (#1504), @bdichter (#1495)
7-
- Add developer guide on how to create a new tutorial. @oruebel (#1504)
8-
- Add images tutorial. @weiglszonja (#1470)
9-
- Add example code for s3fs in the streaming tutorial. @bdichter (#1499)
6+
- Added support for explicit ordering of sphinx gallery tutorials in the docs. @oruebel
7+
[#1504](https://github.com/NeurodataWithoutBorders/pynwb/pull/1504), @bdichter
8+
[#1495](https://github.com/NeurodataWithoutBorders/pynwb/pull/1495)
9+
- Added developer guide on how to create a new tutorial. @oruebel
10+
[#1504](https://github.com/NeurodataWithoutBorders/pynwb/pull/1504)
11+
- Added images tutorial. @weiglszonja
12+
[#1470](https://github.com/NeurodataWithoutBorders/pynwb/pull/1470)
13+
- Added example code for fsspec in the streaming tutorial. @bdichter
14+
[#1499](https://github.com/NeurodataWithoutBorders/pynwb/pull/1499)
1015

1116
### Enhancements and minor changes
12-
- Update coverage workflow, report separate unit vs integration coverage. @rly (#1509)
13-
- Delete test files generated from running sphinx gallery examples. @rly (#1517)
14-
- Enable passing an S3File created through s3fs, which provides a method for reading an NWB file directly
17+
- Updated coverage workflow, report separate unit vs integration coverage. @rly
18+
[#1509](https://github.com/NeurodataWithoutBorders/pynwb/pull/1509)
19+
- Deleted test files generated from running sphinx gallery examples. @rly
20+
[#1517](https://github.com/NeurodataWithoutBorders/pynwb/pull/1517)
21+
- Enabled passing an S3File created through s3fs, which provides a method for reading an NWB file directly
1522
from s3 that is an alternative to ros3. This required relaxing of `NWBHDF5IO` input validation. The `path`
1623
arg is not needed if `file` is provided. `mode` now has a default value of "r".
17-
@bendichter (#1499)
24+
@bendichter
25+
[#1499](https://github.com/NeurodataWithoutBorders/pynwb/pull/1499)
1826
- Added a method to `NWBMixin` that only raises an error when a check is violated on instance creation,
1927
otherwise throws a warning when reading from a file. The new checks in `ImageSeries` when `external_file`
2028
is provided is used with this method to ensure that that files with invalid data can be read, but prohibits
21-
the user from creating new instances when these checks are violated. @weiglszonja (#1516)
29+
the user from creating new instances when these checks are violated. @weiglszonja
30+
[#1516](https://github.com/NeurodataWithoutBorders/pynwb/pull/1516)
2231
- Created a GitHub Actions workflow to generate test files for testing backward compatibility. @rly
2332
[#1548](https://github.com/NeurodataWithoutBorders/pynwb/pull/1548)
24-
- Enhanced docs for ``LabMetaData`` to clarify its usage @oruebel [#1546](https://github.com/NeurodataWithoutBorders/pynwb/pull/1546)
33+
- Updated requirements, including allowing numpy 1.23. @rly
34+
[#1550](https://github.com/NeurodataWithoutBorders/pynwb/pull/1550)
35+
- Enhanced docs for ``LabMetaData`` to clarify its usage. @oruebel
36+
[#1546](https://github.com/NeurodataWithoutBorders/pynwb/pull/1546)
2537

2638
## PyNWB 2.1.0 (July 6, 2022)
2739

requirements-dev.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# pinned dependencies to reproduce an entire development environment to use PyNWB, run PyNWB tests, check code style,
22
# compute coverage, and create test environments
33
codecov==2.1.12
4-
coverage==6.3.2
5-
flake8==4.0.1
4+
coverage==6.4.2
5+
flake8==5.0.4
66
flake8-debugger==4.1.2
77
flake8-print==5.0.0
88
importlib-metadata==4.2.0
99
pytest==7.1.2
1010
pytest-cov==3.0.0
11-
tox==3.25.0
11+
tox==3.25.1

requirements.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# pinned dependencies to reproduce an entire development environment to use PyNWB
2-
h5py==3.6.0
3-
hdmf==3.4.0
2+
h5py==3.7.0
3+
hdmf==3.4.2
44
numpy==1.21.5 # note that numpy 1.22 dropped python 3.7 support
55
pandas==1.3.5 # note that pandas 1.4 dropped python 3.7 support
66
python-dateutil==2.8.2
7-
setuptools==62.2.0
7+
setuptools==63.4.1

setup.cfg

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,16 @@ exclude =
2525
src/pynwb/_version.py
2626
src/pynwb/_due.py
2727
per-file-ignores =
28-
docs/gallery/*:E402,T001
29-
docs/source/tutorials/*:E402,T001
28+
docs/gallery/*:E402,E501,T201
29+
docs/source/tutorials/*:E402,T201
3030
src/pynwb/io/__init__.py:F401
3131
src/pynwb/legacy/io/__init__.py:F401
3232
tests/integration/__init__.py:F401
3333
src/pynwb/testing/__init__.py:F401
34-
src/pynwb/validate.py:T001
35-
setup.py:T001
36-
test.py:T001
37-
scripts/*:T001
34+
src/pynwb/validate.py:T201
35+
setup.py:T201
36+
test.py:T201
37+
scripts/*:T201
3838
extend-ignore = E203
3939

4040
[metadata]

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020

2121
reqs = [
2222
'h5py>=2.10,<4',
23-
'hdmf>=3.3.2,<4',
24-
'numpy>=1.16,<1.23',
23+
'hdmf>=3.4.2,<4',
24+
'numpy>=1.16,<1.24',
2525
'pandas>=1.0.5,<2',
2626
'python-dateutil>=2.7,<3',
2727
'setuptools'

src/pynwb/testing/make_test_files.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import numpy as np
2+
from pathlib import Path
23

34
from datetime import datetime
45
from pynwb import NWBFile, NWBHDF5IO, __version__, TimeSeries
@@ -11,8 +12,7 @@
1112

1213

1314
def _write(test_name, nwbfile):
14-
filename = 'tests/back_compat/%s_%s.nwb' % (__version__, test_name)
15-
15+
filename = str("%s/%s_%s.nwb") % (Path(__file__).parent, __version__, test_name)
1616
with NWBHDF5IO(filename, 'w') as io:
1717
io.write(nwbfile)
1818

@@ -83,7 +83,7 @@ def _make_imageseries_no_data():
8383
image_series = ImageSeries(
8484
name='test_imageseries',
8585
external_file=['external_file'],
86-
starting_frame=[1, 2, 3],
86+
starting_frame=[1],
8787
format='external',
8888
timestamps=[1., 2., 3.]
8989
)
@@ -152,6 +152,8 @@ def _make_imageseries_nonmatch_starting_frame():
152152
if __name__ == '__main__':
153153
# install these versions of PyNWB and run this script to generate new files
154154
# python src/pynwb/testing/make_test_files.py
155+
# files will be made in src/pynwb/testing/
156+
# files should be moved to tests/back_compat/
155157

156158
if __version__ == '1.1.2':
157159
_make_empty()
0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)