-
Notifications
You must be signed in to change notification settings - Fork 84
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
update ophys tutorial #1375
update ophys tutorial #1375
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #1375 +/- ##
==========================================
- Coverage 76.78% 73.53% -3.26%
==========================================
Files 37 37
Lines 2731 2331 -400
Branches 455 357 -98
==========================================
- Hits 2097 1714 -383
- Misses 552 556 +4
+ Partials 82 61 -21
Continue to review full report at Codecov.
|
I fixed it. Not sure if there is a better way than putting the image in I have not tested whether the image appears in the generated notebooks. Also see warning |
@rly @bendichter Note, the SVG figure will most likely not work right now with non-HTML formats (e.g., PDF etc.) that are being generated on readthedocs. For this to work we should either add a PNG version of the figure as well so that we can use the SVG in HTML and otherwise use the PNG version or add the "sphinx.ext.imgconverter" if that that extension is working on readthedocs. See sphinx-doc/sphinx#1907 |
@oruebel I understand that outputting the docs as pdfs is a feature sphinx supports, but does anyone use it? I think it makes sense to optimize for website content, since that's what our users have access to |
ReadTheDocs automatically generates the PDFs and they are available for download. I don't have a measure for how many folks are downloading the PDF or are generating it themselves. I think including the image as both SVG and PNG in the docs should be simple enough and then we can simply do the following to keep the docs working in all format.
|
I'm working on updating the content and figures; however I have an issue when trying to view the changes with Configuration error:
There is a programmable error in your configuration file:
File "/Users/weian/venv/pynwb/lib/python3.7/site-packages/hdmf/spec/namespace.py", line 316, in get_spec
raise KeyError("'%s' not a namespace" % namespace)
KeyError: "'core' not a namespace" I installed I copied the full traceback here: Traceback (most recent call last):
File "/Users/weian/venv/pynwb/lib/python3.7/site-packages/sphinx/config.py", line 327, in eval_config_file
exec(code, namespace)
File "/Users/weian/catalystneuro/pynwb/docs/source/conf.py", line 35, in <module>
from pynwb._version import get_versions
File "/Users/weian/catalystneuro/pynwb/src/pynwb/__init__.py", line 260, in <module>
from . import io as __io # noqa: F401,E402
File "/Users/weian/catalystneuro/pynwb/src/pynwb/io/__init__.py", line 1, in <module>
from . import base as __base
File "/Users/weian/catalystneuro/pynwb/src/pynwb/io/base.py", line 1, in <module>
from .core import NWBContainerMapper
File "/Users/weian/catalystneuro/pynwb/src/pynwb/io/core.py", line 9, in <module>
from pynwb.file import NWBFile
File "/Users/weian/catalystneuro/pynwb/src/pynwb/file.py", line 13, in <module>
from .base import TimeSeries, ProcessingModule
File "/Users/weian/catalystneuro/pynwb/src/pynwb/base.py", line 9, in <module>
from .core import NWBDataInterface, MultiContainerInterface, NWBData
File "/Users/weian/catalystneuro/pynwb/src/pynwb/core.py", line 36, in <module>
class NWBContainer(NWBMixin, Container):
File "/Users/weian/catalystneuro/pynwb/src/pynwb/__init__.py", line 130, in _dec
__TYPE_MAP.register_container_type(namespace, neurodata_type, cls)
File "/Users/weian/venv/pynwb/lib/python3.7/site-packages/hdmf/utils.py", line 580, in func_call
return func(args[0], **pargs)
File "/Users/weian/venv/pynwb/lib/python3.7/site-packages/hdmf/build/manager.py", line 725, in register_container_type
spec = self.__ns_catalog.get_spec(namespace, data_type) # make sure the spec exists
File "/Users/weian/venv/pynwb/lib/python3.7/site-packages/hdmf/utils.py", line 580, in func_call
return func(args[0], **pargs)
File "/Users/weian/venv/pynwb/lib/python3.7/site-packages/hdmf/spec/namespace.py", line 316, in get_spec
raise KeyError("'%s' not a namespace" % namespace)
KeyError: "'core' not a namespace" Thank you for the help! |
@weiglszonja I think you may be missing the git submodules for the nwb-schema in your instillation. Did you include the
The instructions for installing from Git are here https://pynwb.readthedocs.io/en/stable/getting_started.html#install-from-git-repository |
@oruebel Thanks for the quick reply! you're right, I forgot to add the submodules option. It works now, thank you! |
@weiglszonja this looks great!
Does anything else need to be done for this tutorial? |
* update ophys tutorial from nwb_tutorial notebook * add ophys tutorial SVG files * fix flake8 over-indent error * align images to center * fix NWBFile class reference * cross-reference NWB Basics tutorial * fix compatibility with generating pdfs from docs * fix too short lines under title * add PNG files
BTW, I noticed you are using matplotlib in the tutorial. If you want the plots to show up in the HTML docs (and on ReadTheDocs) then simply renaming the file to add the prefix |
@bendichter this is good to go! |
Motivation
The pynwb ophys tutorial is outdated. We need to update with content and figures from nwb_tutorial ophys tutorial.
To render changes, run
make htmldoc
in terminal.You may need to remove the allensdk requirement first in order to get it to run, but don't commit that change.