Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix various documentation build warnings and broken links #1472

Merged
merged 7 commits into from
May 5, 2022
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/gallery/advanced_io/h5dataio.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,9 @@
# .. note::
#
# Chunking can help improve data read/write performance by allowing us to align chunks with common
# read/write operations. The following blog post provides an example
# `http://geology.beer/2015/02/10/hdf-for-large-arrays/ <http://geology.beer/2015/02/10/hdf-for-large-arrays/>`__.
# for this. But you should also know that, with great power comes great responsibility! I.e., if you choose a
# read/write operations. You can find a discussion on how chunking can help in the
# `Python and HDF5 book <https://www.oreilly.com/library/view/python-and-hdf5/9781491944981/ch04.html>`__.
# by Andrew Collette. But you should also know that, with great power comes great responsibility! I.e., if you choose a
# bad chunk size e.g., too small chunks that don't align with our read/write operations, then chunking can
# also harm I/O performance.

Expand Down Expand Up @@ -208,7 +208,7 @@
# how ``h5py.Dataset`` objects should be handled on write by the PyNWBs HDF5 backend via the ``link_data``
# parameter. If ``link_data`` is set to ``True`` then a ``SoftLink`` or ``ExternalLink`` will be created to
# point to the HDF5 dataset On the other hand, if ``link_data`` is set to ``False`` then the dataset
# be copied using `h5py.Group.copy <http://docs.h5py.org/en/latest/high/group.html#Group.copy>`__
# be copied using `h5py.Group.copy <https://docs.h5py.org/en/latest/high/group.html#h5py.Group.copy>`__
# **without copying attributes** and **without expanding soft links, external links, or references**.
#
# .. note::
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 @@ -286,7 +286,7 @@
#
# As mentioned above, :py:class:`~pynwb.ecephys.ElectricalSeries` objects
# are meant for storing specific types of extracellular recordings. In addition to this
# :py:class:`~pynwb.base.TimeSeries` class, NWB provides some :ref:`basic_data_interfaces`
# :py:class:`~pynwb.base.TimeSeries` class, NWB provides some :ref:`modules_overview`
# for designating the type of data you are storing. We will briefly discuss them here, and refer the reader to
# :py:mod:`API documentation <pynwb.ecephys>` and :ref:`basics` for more details on
# using these objects.
Expand Down
6 changes: 3 additions & 3 deletions docs/gallery/domain/plot_behavior.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* create an object:

* :py:class:`~pynwb.base.TimeSeries` for continuous time series data,
* :py:class:`~pynwb.base.SpatialSeries` for continuous spatial data (e.g. position, direction relative to some reference frame),
* :py:class:`~pynwb.behavior.SpatialSeries` for continuous spatial data (e.g. position, direction relative to some reference frame),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We noticed some incorrect class references with @bendichter in the behavior tutorial. I thought they would fit in this PR, let me know if not.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@weiglszonja sure, go ahead, feel free to add changes to this PR as you see fit. I noticed a few link issues while working on another PR, and figured I'd be a good citizen and make a PR to fix what I found.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@oruebel, it is not related here, but the behavior tutorial lacks a thumbnail image. do you create these thumbnails usually for the tutorials?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I opened #1473 to make the thumbnail. I use the PowerPoint file at pynwb/docs/source/figures/gallery_thumbnails.pptx to create the thumbnails and then export as PNG. This may not be the optimal workflow, but its simple and keeps all thumbnails in one place where we can edit them.

* :py:class:`~pynwb.misc.IntervalSeries` or :py:class:`~pynwb.epoch.TimeIntervals` for time intervals

* store that object inside a behavior interface object:
Expand Down Expand Up @@ -239,7 +239,7 @@
####################
# Storing only the timestamps of the events is possible with the `ndx-events <https://pypi.org/project/ndx-events/>`_
# NWB extension. You can also add labels associated with the events with this extension.
# You can find information about installation and example usage `here <https://github.com/rly/ndx-events#ndx-events-extension-for-nwb>`_.
# You can find information about installation and example usage `here <https://github.com/nwb-extensions/ndx-events-record>`_.
#
# .. seealso::
# You can learn more about using extensions in the :ref:`tutorial-extending-nwb` tutorial.
Expand Down Expand Up @@ -284,7 +284,7 @@
####################
# Using :py:class:`~pynwb.epoch.TimeIntervals` representing time intervals
# is often preferred over :py:class:`~pynwb.behavior.BehavioralEpochs` and :py:class:`~pynwb.misc.IntervalSeries`.
# :py:class:`~pynwb.epoch.TimeIntervals` is a subclass of :py:class:`~pynwb.core.DynamicTable` which offers
# :py:class:`~pynwb.epoch.TimeIntervals` is a subclass of :py:class:`~hdmf.common.table.DynamicTable` which offers
# flexibility for tabular data by allowing the addition of optional columns which are not defined in the standard.
#
# Create a :py:class:`~pynwb.epoch.TimeIntervals` object that represents the time
Expand Down
13 changes: 8 additions & 5 deletions docs/gallery/general/extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,16 @@
The NWB format was designed to be easily extendable. Here we discuss some of the basic functionality
in PyNWB for creating Neurodata Extensions (NDX).

.. note::
.. seealso::

For a more in-depth, step-by-step guide on how to create, document, and publish NWB extensions, we highly
recommend visiting the :nwb-overview:`extension tutorial <extensions_tutorial/6_documenting_extension.html>`
on the :nwb-overview:`nwb overview <>` website.
recommend visiting the :nwb_overview:`extension tutorial <extensions_tutorial/6_documenting_extension.html>`
on the :nwb_overview:`nwb overview <>` website.

.. seealso::

For more information on available tools for creating extensions, see
:nwb_overview:`here <core_tools/core_tools_home.html#svg-version-1-1-width-1-5em-height-1-5em-class-sd-octicon-sd-octicon-diff-added-viewbox-0-0-16-16-aria-hidden-true-path-fill-rule-evenodd-d-m13-25-2-5h2-75a-25-25-0-00-25-25v10-5c0-138-112-25-25-25h10-5a-25-25-0-00-25-25v2-75a-25-25-0-00-25-25zm2-75-1h10-5c-966-0-1-75-784-1-75-1-75v10-5a1-75-1-75-0-0113-25-15h2-75a1-75-1-75-0-011-13-25v2-75c1-1-784-1-784-1-2-75-1zm8-4a-75-75-0-01-75-75v2-5h2-5a-75-75-0-010-1-5h-2-5v2-5a-75-75-0-01-1-5-0v-2-5h-2-5a-75-75-0-010-1-5h2-5v-2-5a-75-75-0-018-4z-path-svg-extending-nwb>`.

'''

Expand All @@ -24,8 +29,6 @@
# Extensions should be defined separately from the code that uses the extensions. This design decision is
# based on the assumption that the extension will be written once, and read or used multiple times. Here, we
# provide an example of how to create an extension for subsequent use.
# (For more information on the available tools for creating extensions, see :ref:`extending-nwb`).
#
#
# The following block of code demonstrates how to create a new namespace, and then add a new `neurodata_type`
# to this namespace. Finally,
Expand Down