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

Cross-reference docs to other extensions #1

Open
rly opened this issue May 2, 2019 · 1 comment
Open

Cross-reference docs to other extensions #1

rly opened this issue May 2, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@rly
Copy link
Contributor

rly commented May 2, 2019

Currently, intersphinx is used to create cross-references to other documentation, e.g. the core schema. However, this reference to the core is hard-coded in docs/source/conf.py:

intersphinx_mapping = {'core': ('https://nwb-schema.readthedocs.io/en/latest/', None)}

Change this behavior to allow cross-reference to docs of other extensions if the current extension uses other extensions.

Namespace YAML files will have to include an (optional) URL to the documentation of the included neurodatatypes:

namespaces:
- author: Ben Dichter
  contact: [email protected]
  doc: ecog extensions
  name: ecog
  schema:
  - namespace: core
  - neurodata_types:
    - NWBDataInterface
    - Subject
  - documentation: https://nwb-schema.readthedocs.io/en/latest/
  - source: ecog.extensions.yaml
  version: 1.2.1

This will also require a change to NWBNamespaceBuilder in PyNWB and NamespaceBuilder in HDMF:

ns_builder.add_spec(ext_path, neurodata_type, doc_url)

Useful refs:
https://stackoverflow.com/questions/30939867/how-to-properly-write-cross-references-to-external-documentation-with-intersphin

@rly rly added the enhancement New feature or request label May 2, 2019
@jcfr
Copy link
Contributor

jcfr commented May 19, 2019

Since after integrating #8 , conf.py will be generated using nwb_docutils.init_sphinx_extension_doc, I suggest to implement this in the associated cli.

See https://github.com/NeurodataWithoutBorders/nwb-docutils/blob/4c555353e9ec0f47af6bbc185a9a5492d1114344/nwb_docutils/init_sphinx_extension_doc.py#L357-L358

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants