Skip to content

Commit

Permalink
Merge branch 'dev' into propose_more_stimulus_types
Browse files Browse the repository at this point in the history
  • Loading branch information
rly authored Jan 9, 2024
2 parents 9d46daa + f631baf commit ee2de3b
Show file tree
Hide file tree
Showing 16 changed files with 103 additions and 26 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/check_sphinx_links.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Check Sphinx external links and references
on:
pull_request:
schedule:
- cron: '0 5 * * *' # once per day at midnight ET
workflow_dispatch:

jobs:
check-external-links:
runs-on: ubuntu-latest
steps:
- name: Cancel non-latest runs
uses: styfle/[email protected]
with:
all_but_latest: true
access_token: ${{ github.token }}

- uses: actions/checkout@v4
with:
submodules: 'recursive'
fetch-depth: 0 # tags are required for versioneer to determine the version

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12'

- name: Install Sphinx dependencies and package
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements-doc.txt
- name: Check Sphinx links and references
run: sphinx-build -n -b linkcheck ./docs/format/source ./test_build
4 changes: 2 additions & 2 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Codespell
uses: codespell-project/actions-codespell@v1
uses: codespell-project/actions-codespell@v2
6 changes: 3 additions & 3 deletions .github/workflows/validate_schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ jobs:
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.12"
- name: Install dev branch of HDMF
run: |
pip install git+https://github.com/hdmf-dev/hdmf.git
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ __pycache__/

# Sphinx documentation
docs/format/_build/
docs/language/_build/
docs/storage/_build/
docs/general/_build

# Autogenerated Sphinx sources
docs/format/source/_format_auto_docs/
Expand All @@ -17,3 +15,5 @@ docs/format/source/_format_auto_docs/

#PyCharm
.idea/

.DS_Store
2 changes: 1 addition & 1 deletion core/nwb.file.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ groups:
attributes:
- name: nwb_version
dtype: text
value: "2.6.0"
value: "2.7.0-alpha"
doc: File version string. Use semantic versioning, e.g. 1.2.1. This will be the
name of the format with trailing major, minor and patch numbers.
datasets:
Expand Down
2 changes: 1 addition & 1 deletion core/nwb.namespace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@ namespaces:
- doc: This source module contains neurodata_type for retinotopy data.
source: nwb.retinotopy.yaml
title: Retinotopy
version: "2.6.0-alpha"
version: "2.7.0-alpha"
12 changes: 9 additions & 3 deletions core/nwb.ogen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,16 @@ groups:
- name: data
dtype: numeric
dims:
- num_times
- - num_times
- - num_times
- num_rois
shape:
- null
doc: Applied power for optogenetic stimulus, in watts.
- - null
- - null
- null
doc: Applied power for optogenetic stimulus, in watts. Shape can be 1D or 2D.
2D data is meant to be used in an extension of OptogeneticSeries that
defines what the second dimension represents.
attributes:
- name: unit
dtype: text
Expand Down
4 changes: 2 additions & 2 deletions core/nwb.ophys.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -340,12 +340,12 @@ groups:
each point in time is assumed to be 2-D (has only x & y dimensions).'
groups:
- neurodata_type_inc: CorrectedImageStack
doc: Reuslts from motion correction of an image stack.
doc: Results from motion correction of an image stack.
quantity: '+'

- neurodata_type_def: CorrectedImageStack
neurodata_type_inc: NWBDataInterface
doc: Reuslts from motion correction of an image stack.
doc: Results from motion correction of an image stack.
groups:
- name: corrected
neurodata_type_inc: ImageSeries
Expand Down
27 changes: 27 additions & 0 deletions docs/format/.readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Read the Docs configuration file for https://nwb-schema.readthedocs.io/
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

build:
os: ubuntu-22.04
tools:
python: "3.12"

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/format/source/conf.py

# Optionally build your docs in additional formats such as PDF and ePub
formats: all

# Optionally set the version of Python and requirements required to build your docs
python:
install:
- requirements: requirements-doc.txt

# Optionally include all submodules
submodules:
include: all
recursive: true
2 changes: 1 addition & 1 deletion docs/format/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ changes:
@echo "The overview file is in $(BUILDDIR)/changes."

linkcheck:
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
$(SPHINXBUILD) -n -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in $(BUILDDIR)/linkcheck/output.txt."
Expand Down
2 changes: 1 addition & 1 deletion docs/format/make.bat
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ if "%1" == "changes" (
)

if "%1" == "linkcheck" (
%SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
%SPHINXBUILD% -n -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
if errorlevel 1 exit /b 1
echo.
echo.Link check complete; look for any errors in the above output ^
Expand Down
4 changes: 2 additions & 2 deletions docs/format/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ def setup(app):
# built documents.
#
# The short X.Y version.
version = '2.6.0'
version = '2.7.0'
# The full version, including alpha/beta/rc tags.
release = '2.6.0'
release = '2.7.0-alpha'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
4 changes: 2 additions & 2 deletions docs/format/source/format_description.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The NWB format uses the following main primitives to hierarchically organize neu

The NWB format is formally described via formal specification documents using the `NWB specification language <http://schema-language.readthedocs.io/en/latest/>`_ .
HDF5 currently serves as the main format for storing data in the NWB format (see http://nwb-storage.readthedocs.io/en/latest/ for details).
The `PyNWB <http://pynwb.readthedocs.io/en/latest/>`_ API is available to enable users to efficiently interact with NWB format files.
The `PyNWB <http://pynwb.readthedocs.io/en/stable/>`_ API is available to enable users to efficiently interact with NWB format files.

The NWB format uses a modular design in which all main semantic components of the format have
a unique *neurodata_type* (similar to a Class in object-oriented design)(:numref:`sec_neurodata_type_intro`).
Expand Down Expand Up @@ -172,7 +172,7 @@ To ease development of extensions, the PyNWB_
(and `HDMF <https://github.com/hdmf-dev/hdmf>`_ used by PyNWB) API provides dedicated
data structures that support programmatic creation and use of extensions. An
example for extending NWB using PyNWB_ is available at
https://pynwb.readthedocs.io/en/stable/extensions.html and
https://pynwb.readthedocs.io/en/stable/tutorials/general/extensions.html and
additional details are also available as part of the PyNWB_ tutorials
https://pynwb.readthedocs.io/en/stable/tutorials/index.html .

Expand Down
17 changes: 12 additions & 5 deletions docs/format/source/format_release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
Release Notes
=============

2.7.0 (Upcoming)
----------------

Minor changes
^^^^^^^^^^^^^
- Fixed typos in docstrings. (#560)
- Modified `OptogeneticSeries` to allow 2D data, primarily in extensions of `OptogeneticSeries`. (#564)

2.6.0 (January 17, 2023)
-----------------------
Expand Down Expand Up @@ -170,7 +177,7 @@ Bug Fixes

- Use "text" data type for electrode table columns "location" and "group_name". Previously, only ASCII was allowed.

- Added to description to make electrode x,y,z consistent with CCF reference. http://help.brain-map.org/display/mousebrain/API#API-DownloadAtlas3-DReferenceModels
- Added to description to make electrode x,y,z consistent with CCF reference. https://allensdk.readthedocs.io/en/latest/reference_space.html

- Added "position" dataset with compound data type x,y,z in ElectrodeGroup.

Expand Down Expand Up @@ -372,7 +379,7 @@ Support row-based and column-based tables
easy to add rows by appending to a single dataset, 3) make it easy to read individual rows
of a table (but require reading the full table to extract the data of a single column).
Row-based tables are used to simplify, e.g., the organization of electrode-metadata in NWB 2 (see above).
(See the `specification language release notes <http://schema-language.readthedocs.io/en/latest/specification_language_release_notes.html#release-notes>`_
(See the `specification language release notes <https://schema-language.readthedocs.io/en/latest/release_notes.html>`_
for details about the addition of compound data types in the schema).

* *Referencing rows in a row-based tables:* Subsets of rows can referenced directly via a region-reference to the
Expand Down Expand Up @@ -655,7 +662,7 @@ To address this challenge, NWB 2 added an optional top-level group ``units/`` (w
``/intervals/units``) which is a :ref:`DynamicTable <sec-DynamicTable>`
with ``id`` and ``description`` columns and optional additional user-defined table columns.
See `PR597 on PyNWB <https://github.com/NeurodataWithoutBorders/pynwb/pull/597>`_ for detailed code changes. See
the `PyNWB docs <https://pynwb.readthedocs.io/en/latest/tutorials/general/file.html#units>`__ for a
the `PyNWB docs <https://pynwb.readthedocs.io/en/stable/tutorials/general/plot_read_basics.html#access-single-unit-data>`__ for a
short tutorial on how to use unit metadata. See :ref:`NWBFile <sec-NWBFile>` *Groups: /units* for an overview of the
unit schema.

Expand Down Expand Up @@ -786,7 +793,7 @@ Improved support for trial-based data
**Format Changes:** Added optional group ``/intervals/trials/`` which is a :ref:`DynamicTable <sec-DynamicTable>`
with ``id``, ``start_time``, and ``stop_time`` columns and optional additional user-defined table columns.
See `PR536 on PyNWB <https://github.com/NeurodataWithoutBorders/pynwb/pull/536/files>`_ for detailed code changes. See
the `PyNWB docs <https://pynwb.readthedocs.io/en/latest/tutorials/general/file.html?highlight=Trial#trials>`__ for a
the `PyNWB docs <https://pynwb.readthedocs.io/en/stable/tutorials/general/plot_file.html#trials>`__ for a
short tutorial on how to use trials. See :ref:`NWBFile <sec-NWBFile>` *Groups: /trials* for an overview of the trial
schema. **Note:** Originally trials was added a top-level group trials which was then later moved to ``/intervals/trials``
as part of the generalization of time interval storage as part of
Expand Down Expand Up @@ -1046,7 +1053,7 @@ Specification language changes
**Change:** Numerous changes have been made to the specification language itself in NWB 2.0. Most changes to
the specification language effect mainly how the format is specified, rather than the actual structure of the format.
The changes that have implications on the format itself are described next. For an overview and discussion of the
changes to the specification language see `specification language release notes <http://schema-language.readthedocs.io/en/latest/specification_language_release_notes.html#release-notes>`_.
changes to the specification language see `specification language release notes <https://schema-language.readthedocs.io/en/latest/release_notes.html>`_.

Specification of dataset dimensions
"""""""""""""""""""""""""""""""""""
Expand Down
2 changes: 1 addition & 1 deletion docs/format/source/software_process.rst
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ could point to two different versions of the schema.
For the same reason, it is important that all public releases of the APIs, PyNWB and MatNWB, contain a publicly
released version of nwb-schema. Starting with nwb-schema version 2.2.0, the dev branch and all public releases of PyNWB
and MatNWB include only publicly released versions of nwb-schema. For more details, see the
[PyNWB software process documentation](https://pynwb.readthedocs.io/en/latest/software_process.html).
[PyNWB software process documentation](https://pynwb.readthedocs.io/en/stable/software_process.html).

The [NWB Extensions Versioning Guidelines](https://nwb-extensions.github.io/versioning_guidelines) are used to guide
versioning of the NWB core schema, as well as extensions to NWB.
3 changes: 3 additions & 0 deletions requirements-doc.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
hdmf-docutils
pynwb
sphinx
sphinx_rtd_theme
matplotlib

0 comments on commit ee2de3b

Please sign in to comment.