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

Add new API Documentation Generation #541

Closed
wants to merge 9 commits into from
Closed
Show file tree
Hide file tree
Changes from all 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
2 changes: 2 additions & 0 deletions +tests/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pynwb
hdf5plugin
49 changes: 30 additions & 19 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,29 +18,40 @@ steps:

- bash: |
python -m pip install --upgrade pip
pip install pynwb
pip install hdf5plugin
pip install -r +tests/requirements.txt
echo "##vso[task.setvariable variable=plugin_path]$(python -c "import hdf5plugin; print(hdf5plugin.PLUGINS_PATH)")"
displayName: 'Install PyNWB'

- task: RunMATLABCommand@0
inputs:
command: "results = assertSuccess(nwbtest); assert(~isempty(results), 'No tests ran');"
env:
HDF5_PLUGIN_PATH: $(plugin_path)
#- task: RunMATLABCommand@0
# inputs:
# command: "results = assertSuccess(nwbtest); assert(~isempty(results), 'No tests ran');"
# env:
# HDF5_PLUGIN_PATH: $(plugin_path)

- task: PublishTestResults@2
condition: succeededOrFailed()
inputs:
testResultsFiles: testResults.xml
# - task: PublishTestResults@2
# condition: succeededOrFailed()
# inputs:
# testResultsFiles: testResults.xml

- task: PublishCodeCoverageResults@1
# - task: PublishCodeCoverageResults@1
# inputs:
# codeCoverageTool: Cobertura
# summaryFileLocation: coverage.xml
#
# - script: |
# bash <(curl -s https://codecov.io/bash)
# displayName: 'Upload coverage to codecov'

- task: RunMATLABCommand@0
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: coverage.xml

- script: |
bash <(curl -s https://codecov.io/bash)
displayName: 'Upload coverage to codecov'

command: "generateCore();"
displayName: 'Generating Core Namespace'

- bash: |
pip install -r docs/requirements.txt
mkdir build
sphinx-build -v docs build
displayName: 'Generating API Documentation'

- publish: build
artifact: api-pages
35 changes: 35 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = 'MatNWB'
copyright = '2023, The NeurodataWithoutBorders Team'
author = 'The NeurodataWithoutBorders Team'
release = '2.6.0.2'

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = ['sphinxcontrib.matlab', 'sphinx.ext.autodoc']

templates_path = ['_templates']
exclude_patterns = []
matlab_src_dir = "."


# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

primary_domain = "mat"

html_theme = "sphinx_rtd_theme"
html_logo = "../../logo/logo_matnwb.svg"
html_static_path = ['_static']

matlab_auto_link = "all"
matlab_show_property_default_value = True
matlab_class_signature = True
11 changes: 11 additions & 0 deletions docs/core.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.. _core:

NWB Core Classes
================

`Full Module Index <mat-modindex.html>`_

.. automodule:: +types.+core
:members:
:undoc-members:
:show-inheritance:
14 changes: 14 additions & 0 deletions docs/hdmf_common.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.. _hdmf_common:

HDMF Classes
============

`Full Module Index <mat-modindex.html>`_

These classes are provided by HDMF and describe helper classes used by NWB files.


.. automodule:: +types.+hdmf_common
:members:
:undoc-members:
:show-inheritance:
14 changes: 14 additions & 0 deletions docs/hdmf_experimental.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.. _hdmf_experimental:

HDMF Experimental Classes
=========================

`Full Module Index <mat-modindex.html>`_

.. warning::
These classes are not guaranteed to be stable across NWB Schema Versions. Use these classes with caution

.. automodule:: +types.+hdmf_experimental
:members:
:undoc-members:
:show-inheritance:
22 changes: 22 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
.. MatNWB documentation master file, created by
sphinx-quickstart on Thu Sep 7 17:44:10 2023.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.

Welcome to MatNWB's API documentation!
======================================

.. toctree::
:maxdepth: 2
:caption: Classes:

NWB Core (+core) <core>
HDMF Common (+hdmf_common) <hdmf_common>
HDMF Experimental (+hdmf_experimental) <hdmf_experimental>
Utility Types (+untyped) <utility>

Indices and tables
==================

* :ref:`genindex`
* `MATLAB Module Index <mat-modindex.html>`_
3 changes: 3 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
sphinx
sphinxcontrib-matlabdomain
sphinx-rtd-theme
13 changes: 13 additions & 0 deletions docs/utility.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.. _utility:

Utility Classes
===============

`Full Module Index <mat-modindex.html>`_

These classes are provided by MatNWB for more advanced interfacing with HDF data representations.

.. automodule:: +types.+untyped
:members:
:undoc-members:
:show-inheritance: