Skip to content

Commit

Permalink
Merge branch 'dev' into enh/add_rtd_badge
Browse files Browse the repository at this point in the history
  • Loading branch information
rly authored Apr 22, 2021
2 parents 19e526e + 9ed85e6 commit 39c64d8
Show file tree
Hide file tree
Showing 40 changed files with 669 additions and 533 deletions.
282 changes: 175 additions & 107 deletions .circleci/config.yml

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ assignees: ''
Python Executable: Conda or Python
Python Version: Python 3.5, 3.6, or 3.7
Operating System: Windows, macOS or Linux
HDMF Version: Version of PyNWB used
HDMF Version:
PyNWB Version:

## Checklist

Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Run coverage
on:
push:
branches:
- '**'
tags:
- '**'
- '!latest'
- '!latest-tmp'
jobs:
run:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
env:
OS: ${{ matrix.os }}
PYTHON: '3.8'
steps:
- name: Cancel Workflow Action
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -U -r requirements-dev.txt -r requirements.txt
python setup.py develop
- name: Run tests and generate coverage report
run: |
python -m coverage run test.py --pynwb
coverage report -m
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
fail_ci_if_error: true
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
### New features:
- `NWBFile.add_scratch(...)` and `ScratchData.__init__(...)` now accept scalar data in addition to the currently
accepted types. @rly (#1309)
- Support `pathlib.Path` paths when opening files with `NWBHDF5IO`. @dsleiter (#1314)
- Use HDMF 2.4.0. See the [HDMF 2.4.0 release notes](https://github.com/hdmf-dev/hdmf/releases/tag/2.4.0) for details.
- Support `driver='ros3'` in `NWBHDF5IO` for streaming NWB files directly from s3. @bendichter (#1331)

## PyNWB 1.4.0 (August 12, 2020)

Expand Down
2 changes: 1 addition & 1 deletion Legal.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
“pynwb” Copyright (c) 2017-2020, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy). All rights reserved.
“pynwb” Copyright (c) 2017-2021, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy). All rights reserved.

If you have questions about your rights to use or distribute this software, please contact Berkeley Lab's Innovation & Partnerships Office at [email protected].

Expand Down
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ For details on how to contribute to PyNWB see our `contribution guidelines <docs
LICENSE
=======

"pynwb" Copyright (c) 2017-2019, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy). All rights reserved.
"pynwb" Copyright (c) 2017-2021, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy). All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

(1) Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Expand All @@ -101,7 +101,7 @@ You are under no obligation whatsoever to provide any bug fixes, patches, or upg
COPYRIGHT
=========

"pynwb" Copyright (c) 2017-2020, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy). All rights reserved.
"pynwb" Copyright (c) 2017-2021, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy). All rights reserved.
If you have questions about your rights to use or distribute this software, please contact Berkeley Lab's Innovation & Partnerships Office at [email protected].

NOTICE. This Software was developed under funding from the U.S. Department of Energy and the U.S. Government consequently retains certain rights. As such, the U.S. Government has been granted for itself and others acting on its behalf a paid-up, nonexclusive, irrevocable, worldwide license in the Software to reproduce, distribute copies to the public, prepare derivative works, and perform publicly and display publicly, and to permit other to do so.
149 changes: 149 additions & 0 deletions azure-pipelines-nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
trigger: none

pr: none

schedules:
- cron: "0 5 * * *"
displayName: nightly
branches:
include: dev

jobs:

- job: 'Test'
displayName: "Test PyNWB"

strategy:
matrix:
macOS-py3.9:
imageName: 'macos-10.15'
pythonVersion: '3.9'
testToxEnv: 'py39'
coverageToxEnv: ''
buildToxEnv: 'build-py39'
testWheelInstallEnv: 'wheelinstall'

macOS-py3.8-upgrade-dev-pre:
imageName: 'macos-10.15'
pythonVersion: '3.8'
testToxEnv: 'py38-upgrade-dev-pre'
coverageToxEnv: ''
buildToxEnv: 'build-py38-upgrade-dev-pre'
testWheelInstallEnv: 'wheelinstall'

macOS-py3.8-upgrade-dev:
imageName: 'macos-10.15'
pythonVersion: '3.8'
testToxEnv: 'py38-upgrade-dev'
buildToxEnv: 'build-py38-upgrade-dev'
testWheelInstallEnv: 'wheelinstall'

macOS-py3.8:
imageName: 'macos-10.15'
pythonVersion: '3.8'
testToxEnv: 'py38'
buildToxEnv: 'build-py38'
testWheelInstallEnv: 'wheelinstall'

macOS-py3.7:
imageName: 'macos-10.15'
pythonVersion: '3.7'
testToxEnv: 'py37'
buildToxEnv: 'build-py37'
testWheelInstallEnv: 'wheelinstall'

macOS-py3.6:
imageName: 'macos-10.15'
pythonVersion: '3.6'
testToxEnv: 'py36'
buildToxEnv: 'build-py36'
testWheelInstallEnv: 'wheelinstall'

macOS-py3.6-min-req:
imageName: 'macos-10.15'
pythonVersion: '3.6'
testToxEnv: 'py36-min-req'
buildToxEnv: 'build-py36-min-req'
testWheelInstallEnv: 'wheelinstall'

Windows-py3.9:
imageName: 'vs2017-win2016'
pythonVersion: '3.9'
testToxEnv: 'py39'
coverageToxEnv: ''
buildToxEnv: 'build-py39'
testWheelInstallEnv: 'wheelinstall'

Windows-py3.8-upgrade-dev-pre:
imageName: 'vs2017-win2016'
pythonVersion: '3.8'
testToxEnv: 'py38-upgrade-dev-pre'
coverageToxEnv: ''
buildToxEnv: 'build-py38-upgrade-dev-pre'
testWheelInstallEnv: 'wheelinstall'

Windows-py3.8-upgrade-dev:
imageName: 'vs2017-win2016'
pythonVersion: '3.8'
testToxEnv: 'py38-upgrade-dev'
buildToxEnv: 'build-py38-upgrade-dev'
testWheelInstallEnv: 'wheelinstall'

Windows-py3.8:
imageName: 'vs2017-win2016'
pythonVersion: '3.8'
testToxEnv: 'py38'
buildToxEnv: 'build-py38'
testWheelInstallEnv: 'wheelinstall'

Windows-py3.7:
imageName: 'vs2017-win2016'
pythonVersion: '3.7'
testToxEnv: 'py37'
buildToxEnv: 'build-py37'
testWheelInstallEnv: 'wheelinstall'

Windows-py3.6:
imageName: 'vs2017-win2016'
pythonVersion: '3.6'
testToxEnv: 'py36'
buildToxEnv: 'build-py36'
testWheelInstallEnv: 'wheelinstall'

Windows-py3.6-min-req:
imageName: 'vs2017-win2016'
pythonVersion: '3.6'
testToxEnv: 'py36-min-req'
buildToxEnv: 'build-py36-min-req'
testWheelInstallEnv: 'wheelinstall'

pool:
vmImage: $(imageName)

steps:

- checkout: self
submodules: true

- task: UsePythonVersion@0
inputs:
versionSpec: '$(pythonVersion)'
architecture: 'x64'

- script: |
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools
python -m pip install setuptools wheel virtualenv tox
displayName: 'Install build dependencies'
- bash: |
tox -e $(testToxEnv)
displayName: 'Run tox tests'
- bash: |
tox -e $(buildToxEnv)
displayName: 'Run build tests'
- bash: |
tox -e $(testWheelInstallEnv) --recreate --installpkg dist/*-none-any.whl
displayName: 'Run wheel install tests'
66 changes: 4 additions & 62 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,81 +12,29 @@ jobs:
imageName: 'macos-10.15'
pythonVersion: '3.8'
testToxEnv: 'py38'
coverageToxEnv: 'coverage'
buildToxEnv: 'build-py38'
testWheelInstallEnv: 'wheelinstall-py38'

macOS-py3.7:
imageName: 'macos-10.15'
pythonVersion: '3.7'
testToxEnv: 'py37'
coverageToxEnv: 'coverage'
buildToxEnv: 'build-py37'
testWheelInstallEnv: 'wheelinstall-py37'

macOS-py3.6:
imageName: 'macos-10.15'
pythonVersion: '3.6'
testToxEnv: 'py36'
coverageToxEnv: ''
buildToxEnv: 'build-py36'
testWheelInstallEnv: 'wheelinstall-py36'

macOS-py3.5:
imageName: 'macos-10.15'
pythonVersion: '3.5'
testToxEnv: 'py35'
coverageToxEnv: ''
buildToxEnv: 'build-py35'
testWheelInstallEnv: 'wheelinstall-py35'
testWheelInstallEnv: 'wheelinstall'

macOS-py3.6-min-req:
imageName: 'macos-10.15'
pythonVersion: '3.6'
testToxEnv: 'py36-min-req'
coverageToxEnv: ''
buildToxEnv: 'build-py36-min-req'
testWheelInstallEnv: 'wheelinstall-py36-min-req'
testWheelInstallEnv: 'wheelinstall'

Windows-py3.8:
imageName: 'vs2017-win2016'
pythonVersion: '3.8'
testToxEnv: 'py38'
coverageToxEnv: 'coverage'
buildToxEnv: 'build-py38'
testWheelInstallEnv: 'wheelinstall-py38'

Windows-py3.7:
imageName: 'vs2017-win2016'
pythonVersion: '3.7'
testToxEnv: 'py37'
coverageToxEnv: 'coverage'
buildToxEnv: 'build-py37'
testWheelInstallEnv: 'wheelinstall-py37'

Windows-py3.6:
imageName: 'vs2017-win2016'
pythonVersion: '3.6'
testToxEnv: 'py36'
coverageToxEnv: ''
buildToxEnv: 'build-py36'
testWheelInstallEnv: 'wheelinstall-py36'

Windows-py3.5:
imageName: 'vs2017-win2016'
pythonVersion: '3.5'
testToxEnv: 'py35'
coverageToxEnv: ''
buildToxEnv: 'build-py35'
testWheelInstallEnv: 'wheelinstall-py35'
testWheelInstallEnv: 'wheelinstall'

Windows-py3.6-min-req:
imageName: 'vs2017-win2016'
pythonVersion: '3.6'
testToxEnv: 'py36-min-req'
coverageToxEnv: ''
buildToxEnv: 'build-py36-min-req'
testWheelInstallEnv: 'wheelinstall-py36-min-req'
testWheelInstallEnv: 'wheelinstall'

pool:
vmImage: $(imageName)
Expand All @@ -111,12 +59,6 @@ jobs:
tox -e $(testToxEnv)
displayName: 'Run tox tests'
- bash: |
if [[ "$(coverageToxEnv)" != "" ]]; then
tox -e $(coverageToxEnv)
fi
displayName: 'Run coverage tests if coverageToxEnv != ""'
- bash: |
tox -e $(buildToxEnv)
displayName: 'Run build tests'
Expand Down
12 changes: 6 additions & 6 deletions docs/gallery/domain/brain_observatory.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"""

########################################
# This example demostrates the basic functionality of several parts of the pynwb write API, centered around the optical
# This example demonstrates the basic functionality of several parts of the pynwb write API, centered around the optical
# physiology submodule (pynwb.ophys). We will use the allensdk as a read API, while leveraging the pynwb data model and
# write api to transform and write the data back to disk.
#
Expand Down Expand Up @@ -84,7 +84,7 @@
nwbfile.add_stimulus(image_index)

########################################
# 3) Besides the two-photon calcium image stack, the running speed of the animal was also recordered in this experiment.
# 3) Besides the two-photon calcium image stack, the running speed of the animal was also recorded in this experiment.
# We can store this data as a TimeSeries, in the acquisition portion of the file.

running_speed = TimeSeries(
Expand Down Expand Up @@ -115,7 +115,7 @@

########################################
# 5) In the brain observatory, a two-photon microscope is used to acquire images of the calcium activity of neurons
# expressing a fluorescent protien indicator. Essentially the microscope captures picture (30 times a second) at a
# expressing a fluorescent protein indicator. Essentially the microscope captures picture (30 times a second) at a
# single depth in the visual cortex (the imaging plane). Let's use pynwb to store the metadata associated with this
# hardware and experimental setup:
optical_channel = OpticalChannel(
Expand All @@ -142,10 +142,10 @@
)

########################################
# The Allen Insitute does not include the raw imaging signal, as this data would make the file too large. Instead, these
# data are preprocessed, and a dF/F flourescence signal extracted for each region-of-interest (ROI). To store the chain
# The Allen Institute does not include the raw imaging signal, as this data would make the file too large. Instead, these
# data are preprocessed, and a dF/F fluorescence signal extracted for each region-of-interest (ROI). To store the chain
# of computations necessary to describe this data processing pipeline, pynwb provides a "processing module" with
# interfaces that simplify and standarize the process of adding the steps in this provenance chain to the file:
# interfaces that simplify and standardize the process of adding the steps in this provenance chain to the file:
ophys_module = nwbfile.create_processing_module(
name='ophys_module',
description='Processing module for 2P calcium responses',
Expand Down
2 changes: 1 addition & 1 deletion docs/gallery/domain/ecephys.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
# top-level :py:class:`~pynwb.misc.Units` table.
#
# In addition to the *data* and *timestamps* fields inherited
# from :py:class:`~pynwb.base.TimeSeries` class, these two classs will require metadata about the elctrodes
# from :py:class:`~pynwb.base.TimeSeries` class, these two classes will require metadata about the electrodes
# from which *data* was generated. This is done by providing an :py:class:`~pynwb.core.DynamicTableRegion`,
# which you can create using the :py:class:`~pynwb.file.NWBFile.create_electrode_table_region`
#
Expand Down
2 changes: 1 addition & 1 deletion docs/gallery/domain/ophys.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@
# .. [#] You can also store dF/F data using the :py:class:`~pynwb.ophys.DfOverF` class.
#
# .. [#] Neurodata sets can be *very* large, so individual components of the dataset are only loaded into memory when
# you requst them. This functionality is only possible if closing of the :py:class:`~pynwb.NWBHDF5IO`
# you request them. This functionality is only possible if closing of the :py:class:`~pynwb.NWBHDF5IO`
# object is handled by the user.
#
# .. [#] If you added more than one :py:class:`~pynwb.ophys.RoiResponseSeries`, you will need to
Expand Down
Loading

0 comments on commit 39c64d8

Please sign in to comment.