Skip to content

Commit

Permalink
Improve comments
Browse files Browse the repository at this point in the history
  • Loading branch information
rly committed Jul 6, 2022
1 parent 0cad34f commit b5ebda4
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 11 deletions.
3 changes: 2 additions & 1 deletion docs/gallery/general/read_basics.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,8 @@
#
# (200, 400, 300, 3)
#
# This :py:class:`~pynwb.image.OpticalSeries` data contains 200 images of size 400x300 pixels with three channels (red, green, and blue).
# This :py:class:`~pynwb.image.OpticalSeries` data contains 200 images of size 400x300 pixels with three channels
# (red, green, and blue).
#
# Slicing datasets
# ----------------
Expand Down
3 changes: 2 additions & 1 deletion requirements-doc.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# dependencies to generate the documentation for PyNWB
# dependencies to generate the documentation for PyNWB and test run the sphinx gallery examples that do not require
# ROS3 support in h5py. For those examples, use the conda env specified in environment-ros3.yml
sphinx>=4 # improved support for docutils>=0.17
sphinx_rtd_theme>=1 # <1 does not work with docutils>=0.17
matplotlib
Expand Down
12 changes: 7 additions & 5 deletions test.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ def _import_from_file(script):


def run_example_tests():
"""Run the Sphinx gallery example files, excluding ROS3-dependent ones, to check for errors."""
logging.info('running example tests')
examples_scripts = list()
for root, dirs, files in os.walk(os.path.join(os.path.dirname(__file__), "docs", "gallery")):
Expand All @@ -88,6 +89,7 @@ def run_example_tests():


def run_example_ros3_tests():
"""Run the Sphinx gallery example files that depend on ROS3 to check for errors."""
logging.info('running example ros3 tests')
examples_scripts = list()
for root, dirs, files in os.walk(os.path.join(os.path.dirname(__file__), "docs", "gallery")):
Expand Down Expand Up @@ -273,17 +275,17 @@ def main():
run_test_suite("tests/unit", "pynwb unit tests", verbose=args.verbosity)

# Run example tests
if flags['example'] in args.suites:
if flags['example'] in args.suites or flags['validation'] in args.suites:
run_example_tests()

# Run example tests with ros3 streaming examples
if flags['example-ros3'] in args.suites:
# NOTE this requires h5py to be built with ROS3 support and the dandi package to be installed
# this is most easily done by creating a conda environment using environment-ros3.yml
if flags['example-ros3'] in args.suites or flags['validation'] in args.suites:
run_example_ros3_tests()

# Run validation tests
# Run validation tests on the example NWB files generated above
if flags['validation'] in args.suites:
run_example_tests()
run_example_ros3_tests()
validate_nwbs()

# Run integration tests
Expand Down
8 changes: 4 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ commands = {[testenv:build]commands}
deps = null
commands = python -c "import hdmf"

# Envs that will execute gallery tests
# Envs that will execute gallery tests that do not require ROS3
[testenv:gallery]
install_command =
pip install -U {opts} {packages}
Expand All @@ -110,7 +110,7 @@ deps =

commands =
pip install -r requirements-doc.txt
# installing allensdk may downgrade certain requirements so
# NOTE: installing allensdk may downgrade certain requirements so
# reinstall the repo with its requirements
pip install -r requirements-dev.txt -r requirements.txt
pip install -U -e .
Expand Down Expand Up @@ -143,7 +143,7 @@ deps =

commands =
pip install -r requirements-doc.txt
# installing allensdk may downgrade certain requirements so
# NOTE: installing allensdk may downgrade certain requirements so
# reinstall the repo with its requirements
pip install -r requirements-dev.txt -r requirements.txt
pip install -U -e .
Expand All @@ -161,7 +161,7 @@ deps =

commands =
pip install -r requirements-doc.txt
# installing allensdk may downgrade certain requirements so
# NOTE: installing allensdk may downgrade certain requirements so
# reinstall the repo with its requirements
pip install -r requirements-dev.txt -r requirements.txt
pip install -U --pre -e .
Expand Down

0 comments on commit b5ebda4

Please sign in to comment.