From b34e6c388dc8838b9e179c74884e3a3dde7f1bd9 Mon Sep 17 00:00:00 2001 From: IanCa Date: Wed, 18 Oct 2023 16:28:20 -0500 Subject: [PATCH 1/2] Initial pass of javascript docs --- common/schema/types.js | 6 ++ converter/splitHedString.js | 4 +- docs/Makefile | 34 ++++++++- docs/source/bids.rst | 13 ++++ docs/source/{api2.rst => bids.schema.rst} | 3 +- docs/source/bids.tsvParser.rst | 5 ++ docs/source/bids.types.rst | 23 ++++++ docs/source/bids.utils.rst | 5 ++ docs/source/bids.validate.rst | 22 ++++++ docs/source/common.issues.data.rst | 4 + docs/source/common.issues.issues.rst | 5 ++ docs/source/common.issues.rst | 8 ++ docs/source/common.rst | 8 ++ docs/source/common.schema.config.rst | 4 + docs/source/common.schema.loader.rst | 16 ++++ docs/source/common.schema.rst | 9 +++ docs/source/common.schema.types.rst | 18 +++++ docs/source/conf.py | 64 ++++++---------- docs/source/converter.converter.rst | 15 ++++ docs/source/converter.issues.rst | 4 + docs/source/converter.rst | 11 +++ docs/source/converter.schema.rst | 4 + docs/source/converter.splitHedString.rst | 3 + docs/source/converter.types.rst | 7 ++ docs/source/index.rst | 76 ++++++++++--------- docs/source/introduction.rst | 50 ------------ docs/source/utils.array.rst | 6 ++ docs/source/utils.files.rst | 4 + docs/source/utils.hedData.rst | 7 ++ docs/source/utils.hedStrings.rst | 15 ++++ docs/source/utils.map.rst | 6 ++ docs/source/utils.rst | 15 ++++ docs/source/utils.string.rst | 13 ++++ docs/source/utils.types.rst | 5 ++ docs/source/utils.xml2js.rst | 3 + docs/source/utils.xpath.rst | 5 ++ docs/source/validator.dataset.rst | 13 ++++ docs/source/validator.event.hed3.rst | 2 + docs/source/validator.event.init.rst | 7 ++ docs/source/validator.event.rst | 9 +++ docs/source/validator.event.validator.rst | 2 + .../validator.hed2.event.hed2Validator.rst | 2 + docs/source/validator.hed2.event.rst | 8 ++ docs/source/validator.hed2.event.units.rst | 7 ++ .../validator.hed2.parser.parsedHed2Tag.rst | 2 + docs/source/validator.hed2.parser.rst | 7 ++ docs/source/validator.hed2.rst | 9 +++ ...validator.hed2.schema.hed2SchemaParser.rst | 2 + docs/source/validator.hed2.schema.rst | 8 ++ ...validator.hed2.schema.schemaAttributes.rst | 2 + docs/source/validator.parser.main.rst | 14 ++++ .../validator.parser.parsedHedGroup.rst | 3 + .../validator.parser.parsedHedString.rst | 2 + .../validator.parser.parsedHedSubstring.rst | 2 + docs/source/validator.parser.parsedHedTag.rst | 6 ++ docs/source/validator.parser.rst | 12 +++ .../validator.parser.splitHedString.rst | 8 ++ docs/source/validator.rst | 11 +++ docs/source/validator.schema.hed3.rst | 3 + docs/source/validator.schema.init.rst | 9 +++ docs/source/validator.schema.parser.rst | 2 + docs/source/validator.schema.rst | 10 +++ docs/source/validator.schema.types.rst | 32 ++++++++ readthedocs.yml | 1 - utils/types.js | 3 + validator/dataset.js | 2 +- validator/event/hed3.js | 3 + validator/event/validator.js | 4 +- validator/hed2/event/hed2Validator.js | 3 + validator/hed2/parser/parsedHed2Tag.js | 3 + validator/hed2/schema/hed2SchemaParser.js | 3 + validator/parser/parsedHedGroup.js | 4 +- validator/parser/parsedHedString.js | 4 +- validator/parser/parsedHedSubstring.js | 4 +- validator/parser/parsedHedTag.js | 3 + validator/parser/splitHedString.js | 3 + validator/schema/parser.js | 3 + validator/schema/types.js | 24 ++++++ 78 files changed, 625 insertions(+), 136 deletions(-) create mode 100644 docs/source/bids.rst rename docs/source/{api2.rst => bids.schema.rst} (50%) create mode 100644 docs/source/bids.tsvParser.rst create mode 100644 docs/source/bids.types.rst create mode 100644 docs/source/bids.utils.rst create mode 100644 docs/source/bids.validate.rst create mode 100644 docs/source/common.issues.data.rst create mode 100644 docs/source/common.issues.issues.rst create mode 100644 docs/source/common.issues.rst create mode 100644 docs/source/common.rst create mode 100644 docs/source/common.schema.config.rst create mode 100644 docs/source/common.schema.loader.rst create mode 100644 docs/source/common.schema.rst create mode 100644 docs/source/common.schema.types.rst create mode 100644 docs/source/converter.converter.rst create mode 100644 docs/source/converter.issues.rst create mode 100644 docs/source/converter.rst create mode 100644 docs/source/converter.schema.rst create mode 100644 docs/source/converter.splitHedString.rst create mode 100644 docs/source/converter.types.rst delete mode 100644 docs/source/introduction.rst create mode 100644 docs/source/utils.array.rst create mode 100644 docs/source/utils.files.rst create mode 100644 docs/source/utils.hedData.rst create mode 100644 docs/source/utils.hedStrings.rst create mode 100644 docs/source/utils.map.rst create mode 100644 docs/source/utils.rst create mode 100644 docs/source/utils.string.rst create mode 100644 docs/source/utils.types.rst create mode 100644 docs/source/utils.xml2js.rst create mode 100644 docs/source/utils.xpath.rst create mode 100644 docs/source/validator.dataset.rst create mode 100644 docs/source/validator.event.hed3.rst create mode 100644 docs/source/validator.event.init.rst create mode 100644 docs/source/validator.event.rst create mode 100644 docs/source/validator.event.validator.rst create mode 100644 docs/source/validator.hed2.event.hed2Validator.rst create mode 100644 docs/source/validator.hed2.event.rst create mode 100644 docs/source/validator.hed2.event.units.rst create mode 100644 docs/source/validator.hed2.parser.parsedHed2Tag.rst create mode 100644 docs/source/validator.hed2.parser.rst create mode 100644 docs/source/validator.hed2.rst create mode 100644 docs/source/validator.hed2.schema.hed2SchemaParser.rst create mode 100644 docs/source/validator.hed2.schema.rst create mode 100644 docs/source/validator.hed2.schema.schemaAttributes.rst create mode 100644 docs/source/validator.parser.main.rst create mode 100644 docs/source/validator.parser.parsedHedGroup.rst create mode 100644 docs/source/validator.parser.parsedHedString.rst create mode 100644 docs/source/validator.parser.parsedHedSubstring.rst create mode 100644 docs/source/validator.parser.parsedHedTag.rst create mode 100644 docs/source/validator.parser.rst create mode 100644 docs/source/validator.parser.splitHedString.rst create mode 100644 docs/source/validator.rst create mode 100644 docs/source/validator.schema.hed3.rst create mode 100644 docs/source/validator.schema.init.rst create mode 100644 docs/source/validator.schema.parser.rst create mode 100644 docs/source/validator.schema.rst create mode 100644 docs/source/validator.schema.types.rst diff --git a/common/schema/types.js b/common/schema/types.js index 68e259b4..62540709 100644 --- a/common/schema/types.js +++ b/common/schema/types.js @@ -61,6 +61,9 @@ export class Schema { tagHasAttribute(tag, tagAttribute) {} } +/** + * Hed2Schema class + */ export class Hed2Schema extends Schema { /** * The description of tag attributes. @@ -91,6 +94,9 @@ export class Hed2Schema extends Schema { } } +/** + * Hed3Schema class + */ export class Hed3Schema extends Schema { /** * The collection of schema entries. diff --git a/converter/splitHedString.js b/converter/splitHedString.js index 3993e86d..c499047d 100644 --- a/converter/splitHedString.js +++ b/converter/splitHedString.js @@ -7,7 +7,7 @@ const tagDelimiters = new Set([',', '(', ')', '~']) * @returns {Array[]} A list of string parts. The boolean is true if the part is * a tag and false if it is a delimiter. The numbers are the bounds of the part. */ -export default function splitHedString(hedString) { +export function splitHedString(hedString) { const resultPositions = [] let currentSpacing = 0 let insideDelimiter = true @@ -62,3 +62,5 @@ export default function splitHedString(hedString) { return resultPositions } + +export default splitHedString diff --git a/docs/Makefile b/docs/Makefile index 92dd33a1..b8808422 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -1,5 +1,26 @@ -# Minimal makefile for Sphinx documentation -# +# We avoid $(CURDIR) because it spits out /cygdrive/c/... on Windows Cygwin +# installs and leads to things that don't work. +VIRTUAL_ENV = venv +PYTHON3 ?= python3 + +# Let us find jsdoc and sphinx: +export PATH := node_modules/.bin:$(VIRTUAL_ENV)/bin:$(VIRTUAL_ENV)/Scripts:$(PATH) + +# I'm not entirely sure why this line is needed yet... +.PHONY: js + +# Verify venv exists +.PHONY: venv +venv: $(VIRTUAL_ENV)/pyvenv.cfg + +$(VIRTUAL_ENV)/pyvenv.cfg: + $(PYTHON3) -m venv $(VIRTUAL_ENV) + PATH="$(PATH)" pip3 install -r requirements.txt + +# Not sure if this is needed... +# .npm_installed: ../package.json +# npm install +# touch $@ # You can set these variables from the command line, and also # from the environment for the first two. @@ -18,3 +39,12 @@ help: # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). %: Makefile @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + + + +# Delete just the built docs, not the whole venv, which is expensive to +# reconstitute: +.PHONY: clean +clean: + rm -rf $(BUILDDIR) + rm -rf node_modules .npm_installed \ No newline at end of file diff --git a/docs/source/bids.rst b/docs/source/bids.rst new file mode 100644 index 00000000..a8858dac --- /dev/null +++ b/docs/source/bids.rst @@ -0,0 +1,13 @@ +bids +==== + +Bids functionality + +.. toctree:: + :maxdepth: 5 + + bids.schema.rst + bids.tsvParser.rst + bids.types.rst + bids.utils.rst + bids.validate.rst diff --git a/docs/source/api2.rst b/docs/source/bids.schema.rst similarity index 50% rename from docs/source/api2.rst rename to docs/source/bids.schema.rst index ec25fbcd..cc7a1cbd 100644 --- a/docs/source/api2.rst +++ b/docs/source/bids.schema.rst @@ -1,3 +1,4 @@ -HED API reference (Auto style) +Schema ============================== +Intentionally Blank diff --git a/docs/source/bids.tsvParser.rst b/docs/source/bids.tsvParser.rst new file mode 100644 index 00000000..10e8635e --- /dev/null +++ b/docs/source/bids.tsvParser.rst @@ -0,0 +1,5 @@ +tsvParse +============================== + +.. js:autofunction:: parseTSV + diff --git a/docs/source/bids.types.rst b/docs/source/bids.types.rst new file mode 100644 index 00000000..7936bcbc --- /dev/null +++ b/docs/source/bids.types.rst @@ -0,0 +1,23 @@ +types +============================== + +.. js:autoclass:: BidsData + :members: + +.. js:autoclass:: BidsFile + :members: + +.. js:autoclass:: BidsJsonFile + :members: + +.. js:autoclass:: BidsTsvFile + :members: + +.. js:autoclass:: BidsEventFile + :members: + +.. js:autoclass:: BidsTabularFile + :members: + +.. js:autoclass:: BidsSidecar + :members: diff --git a/docs/source/bids.utils.rst b/docs/source/bids.utils.rst new file mode 100644 index 00000000..659ed160 --- /dev/null +++ b/docs/source/bids.utils.rst @@ -0,0 +1,5 @@ +utils +============================== + +.. js:autofunction:: sidecarValueHasHed + diff --git a/docs/source/bids.validate.rst b/docs/source/bids.validate.rst new file mode 100644 index 00000000..f864dee6 --- /dev/null +++ b/docs/source/bids.validate.rst @@ -0,0 +1,22 @@ +validate +============================== + +.. js:autofunction:: sidecarValueHasHed + +.. js:autofunction:: validateBidsDataset + +.. js:autofunction:: validateFullDataset + +.. js:autofunction:: validateBidsTsvFile + +.. js:autofunction:: validateSidecars + +.. js:autofunction:: validateHedColumn + +.. js:autofunction:: parseTsvHed + +.. js:autofunction:: validateCombinedDataset + +.. js:autofunction:: validateStrings + +.. js:autofunction:: convertHedIssuesToBidsIssues diff --git a/docs/source/common.issues.data.rst b/docs/source/common.issues.data.rst new file mode 100644 index 00000000..66992cc7 --- /dev/null +++ b/docs/source/common.issues.data.rst @@ -0,0 +1,4 @@ +data +====== + +Intentionally blank for now \ No newline at end of file diff --git a/docs/source/common.issues.issues.rst b/docs/source/common.issues.issues.rst new file mode 100644 index 00000000..9c798b60 --- /dev/null +++ b/docs/source/common.issues.issues.rst @@ -0,0 +1,5 @@ +.. js:autoclass:: Issue + :members: + +.. js:autofunction:: generateIssue + diff --git a/docs/source/common.issues.rst b/docs/source/common.issues.rst new file mode 100644 index 00000000..0d27171d --- /dev/null +++ b/docs/source/common.issues.rst @@ -0,0 +1,8 @@ +issues +====== + +.. toctree:: + :maxdepth: 8 + + common.issues.issues + common.issues.data \ No newline at end of file diff --git a/docs/source/common.rst b/docs/source/common.rst new file mode 100644 index 00000000..5554cf43 --- /dev/null +++ b/docs/source/common.rst @@ -0,0 +1,8 @@ +common +====== + +.. toctree:: + :maxdepth: 8 + + common.schema + common.issues \ No newline at end of file diff --git a/docs/source/common.schema.config.rst b/docs/source/common.schema.config.rst new file mode 100644 index 00000000..0be67493 --- /dev/null +++ b/docs/source/common.schema.config.rst @@ -0,0 +1,4 @@ +config +====== + +Intentionally blank for now \ No newline at end of file diff --git a/docs/source/common.schema.loader.rst b/docs/source/common.schema.loader.rst new file mode 100644 index 00000000..e7df2075 --- /dev/null +++ b/docs/source/common.schema.loader.rst @@ -0,0 +1,16 @@ + +.. js:autofunction:: loadSchema + +.. js:autofunction:: loadSchemaFromSpec + +.. js:autofunction:: loadPromise + +.. js:autofunction:: loadRemoteSchema + +.. js:autofunction:: loadLocalSchema + +.. js:autofunction:: loadBundledSchema + +.. js:autofunction:: loadSchemaFile + +.. js:autofunction:: parseSchemaXML diff --git a/docs/source/common.schema.rst b/docs/source/common.schema.rst new file mode 100644 index 00000000..783e8233 --- /dev/null +++ b/docs/source/common.schema.rst @@ -0,0 +1,9 @@ +schema +====== + +.. toctree:: + :maxdepth: 8 + + common.schema.types + common.schema.loader + common.schema.config \ No newline at end of file diff --git a/docs/source/common.schema.types.rst b/docs/source/common.schema.types.rst new file mode 100644 index 00000000..90effd5d --- /dev/null +++ b/docs/source/common.schema.types.rst @@ -0,0 +1,18 @@ + +.. js:autoclass:: Schema + :members: + +.. js:autoclass:: Hed2Schema + :members: + +.. js:autoclass:: Hed3Schema + :members: + +.. js:autoclass:: Schemas + :members: + +.. js:autoclass:: SchemaSpec + :members: + +.. js:autoclass:: SchemasSpec + :members: diff --git a/docs/source/conf.py b/docs/source/conf.py index 32c49374..632ec4ff 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -14,7 +14,7 @@ import sys import sphinx_rtd_theme from datetime import date -import subprocess + sys.path.insert(0, os.path.abspath('../../../')) @@ -42,30 +42,29 @@ # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ - "myst_parser", - "sphinx.ext.autodoc", - "sphinx.ext.autosummary", - "sphinx.ext.autosectionlabel", - "sphinx.ext.intersphinx", - "sphinx.ext.coverage", - "sphinx.ext.mathjax", - "sphinx.ext.viewcode", - "sphinx.ext.githubpages", - "sphinx.ext.napoleon", - "sphinx.ext.extlinks", - "sphinx_js" + # 'sphinx.ext.autodoc', + # 'sphinx.ext.viewcode', + # 'sphinx_click.ext', + 'sphinx_js' ] -js_source_path = '../../' +root_for_relative_js_paths = "../../" +base_folders = ["../../bids", "../../validator", "../../converter", "../../common", "../../utils"] -primary_domain = 'js' +def find_all_folders(directory): + all_folders = [directory] + + for root, dirs, _ in os.walk(directory): + for d in dirs: + all_folders.append(os.path.join(root, d)) -autosummary_generate = True -autodoc_default_flags = ['members', 'inherited-members'] -add_module_names = False -myst_all_links_external = False -myst_heading_anchors = 2 -myst_enable_extensions = ["deflist"] + return all_folders + +js_source_path = [] +for folder in base_folders: + js_source_path += find_all_folders(folder) +print(js_source_path) +primary_domain = 'js' # Add any paths that contain templates here, relative to this directory. @@ -76,7 +75,7 @@ # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. # This pattern also affects html_static_path and html_extra_path. -exclude_patterns = ['_build', '_templates', 'Thumbs.db', '.DS_Store'] +exclude_patterns = ['_build', '_templates', 'Thumbs.db', '.DS_Store', 'venv'] # -- Options for HTML output ------------------------------------------------- @@ -100,29 +99,14 @@ # Toc options 'collapse_navigation': False, 'sticky_navigation': True, - 'navigation_depth': 4, + 'navigation_depth': 6, 'includehidden': True, 'titles_only': False } # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] - - -def run_jsdoc(app): - source_dir = app.builder.srcdir - jsdoc_output_dir = os.path.join(source_dir, 'jsdoc_output') - jsdoc_command = [ - 'npx', # Use npx to run locally installed npm packages - 'jsdoc', - '-c', os.path.join(source_dir, 'path/to/jsdoc/config.json'), # Adjust the path to your JSDoc config - '-d', jsdoc_output_dir, - 'path/to/javascript/files', # Adjust the path to your JavaScript files - ] - subprocess.call(jsdoc_command) - +import sphinx_rtd_theme +html_static_path = [os.path.join(sphinx_rtd_theme.get_html_theme_path(), 'sphinx_rtd_theme', 'static')] -def setup(app): - app.connect('builder-inited', run_jsdoc) diff --git a/docs/source/converter.converter.rst b/docs/source/converter.converter.rst new file mode 100644 index 00000000..097f7b41 --- /dev/null +++ b/docs/source/converter.converter.rst @@ -0,0 +1,15 @@ +.. js:autofunction:: removeSlashesAndSpaces + +.. js:autofunction:: convertTagToLong + +.. js:autofunction:: convertTagToShort + +.. js:autofunction:: convertPartialHedStringToLong + +# This one is not marked for export +# .. js:autofunction:: convertHedString + +.. js:autofunction:: convertHedStringToLong + +.. js:autofunction:: convertHedStringToShort + diff --git a/docs/source/converter.issues.rst b/docs/source/converter.issues.rst new file mode 100644 index 00000000..a4ee0e3b --- /dev/null +++ b/docs/source/converter.issues.rst @@ -0,0 +1,4 @@ +issues +====== + +Intentionally blank for now \ No newline at end of file diff --git a/docs/source/converter.rst b/docs/source/converter.rst new file mode 100644 index 00000000..f35eb0c3 --- /dev/null +++ b/docs/source/converter.rst @@ -0,0 +1,11 @@ +converter +========= + +.. toctree:: + :maxdepth: 8 + + converter.types + converter.schema + converter.issues + converter.splitHedString + converter.converter diff --git a/docs/source/converter.schema.rst b/docs/source/converter.schema.rst new file mode 100644 index 00000000..6c265764 --- /dev/null +++ b/docs/source/converter.schema.rst @@ -0,0 +1,4 @@ +.. js:autofunction:: buildMappingObject + +.. js:autofunction:: schema.buildSchema + diff --git a/docs/source/converter.splitHedString.rst b/docs/source/converter.splitHedString.rst new file mode 100644 index 00000000..cce68dc2 --- /dev/null +++ b/docs/source/converter.splitHedString.rst @@ -0,0 +1,3 @@ +.. js:autofunction:: splitHedString + + diff --git a/docs/source/converter.types.rst b/docs/source/converter.types.rst new file mode 100644 index 00000000..43e05b77 --- /dev/null +++ b/docs/source/converter.types.rst @@ -0,0 +1,7 @@ +.. js:autoclass:: TagEntry + :members: + +.. js:autoclass:: Mapping + :members: + + diff --git a/docs/source/index.rst b/docs/source/index.rst index 2555732c..124741f1 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -1,36 +1,40 @@ -Hierarchical Event Descriptor (HED) JavaScript Tools -==================================================== - -.. image:: _static/images/croppedWideLogo.png - :width: 220 - :alt: HedLogo - -.. sidebar:: **Links** - - * `PDF docs `_ - - * `Source code `_ - -Note: this is a work in progress. More information is coming. - -.. toctree:: - :maxdepth: 5 - :caption: Contents: - - introduction.md - user_guide.rst - -.. toctree:: - :maxdepth: 5 - :caption: HED JavaScript API: - - api2.rst - - -Indices and tables -==================== - -* :ref:`genindex` -* :ref:`modindex` -* :ref:`search` - +Hierarchical Event Descriptor (HED) JavaScript Tools +==================================================== + +.. image:: _static/images/croppedWideLogo.png + :width: 220 + :alt: HedLogo + +.. sidebar:: **Links** + + * `PDF docs `_ + + * `Source code `_ + +Note: this is a work in progress. More information is coming. + +.. toctree:: + :maxdepth: 5 + :caption: Contents: + + introduction.md + user_guide.rst + +.. toctree:: + :maxdepth: 8 + :caption: HED JavaScript API: + + bids.rst + common.rst + converter.rst + utils.rst + validator.rst + + +Indices and tables +==================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` + diff --git a/docs/source/introduction.rst b/docs/source/introduction.rst deleted file mode 100644 index 71f63261..00000000 --- a/docs/source/introduction.rst +++ /dev/null @@ -1,50 +0,0 @@ -.. _introduction: - -===================================================== -Introduction to HED -===================================================== - -.. contents:: **Contents** - :local: - :depth: 1 - -Why HED? -======== - -.. topic:: Why use HED? - - HED (Hierarchical Event Descriptors) is an infrastructure and - a controlled vocabulary that allows researchers to annotate - their experimental data, especially events, - so that tools can automatically use this information in analysis. - -For more information on using Hierarchical Event Descriptors (HED) -visit `HED examples `_: - - -Installing hed-javascript -========================= -The hed-javascript tools are available on npm and can be installed using -using the following command: - ->>> npm install hed-validator - - -Finding help -============ - -:Documentation: - - See `HED resources `_ for user documentation and tutorials. - - -:Mailing lists and forums: - - * Don't hesitate to ask questions about the python hedtools on `NeuroStars - `_. - -:Issues and problems: - * If you notice a bug in the python hedtools code or encounter other problems using the tools, please `open an issue`_ in the - hed-javascript repository on github. - -.. _open an issue: https://github.com/hed-standard/hed-javascript/issues diff --git a/docs/source/utils.array.rst b/docs/source/utils.array.rst new file mode 100644 index 00000000..53d973d7 --- /dev/null +++ b/docs/source/utils.array.rst @@ -0,0 +1,6 @@ +.. js:autofunction:: getElementCount + +.. js:autofunction:: asArray + +.. js:autofunction:: recursiveMap + diff --git a/docs/source/utils.files.rst b/docs/source/utils.files.rst new file mode 100644 index 00000000..7d45fee6 --- /dev/null +++ b/docs/source/utils.files.rst @@ -0,0 +1,4 @@ +.. js:autofunction:: readFile + +.. js:autofunction:: readHTTPSFile + diff --git a/docs/source/utils.hedData.rst b/docs/source/utils.hedData.rst new file mode 100644 index 00000000..624fc573 --- /dev/null +++ b/docs/source/utils.hedData.rst @@ -0,0 +1,7 @@ +.. js:autofunction:: getGenerationForSchemaVersion + +# No documentation yet +# .. js:autofunction:: mergeParsingIssues + +.. js:autofunction:: getParsedParentTags + diff --git a/docs/source/utils.hedStrings.rst b/docs/source/utils.hedStrings.rst new file mode 100644 index 00000000..cbe39f57 --- /dev/null +++ b/docs/source/utils.hedStrings.rst @@ -0,0 +1,15 @@ +.. js:autofunction:: replaceTagNameWithPound + +# .. js:autofunction:: getTagSlashIndices + +.. js:autofunction:: getTagLevels + +.. js:autofunction:: hedStrings.getTagName + +.. js:autofunction:: hedStrings.getParentTag + +.. js:autofunction:: hedStringIsAGroup + +.. js:autofunction:: loadSchemaFile + +.. js:autofunction:: removeGroupParentheses diff --git a/docs/source/utils.map.rst b/docs/source/utils.map.rst new file mode 100644 index 00000000..0cceb576 --- /dev/null +++ b/docs/source/utils.map.rst @@ -0,0 +1,6 @@ +map +=== + +Intentionally blank for now +# .. js:autofunction:: filterNonEqualDuplicates + diff --git a/docs/source/utils.rst b/docs/source/utils.rst new file mode 100644 index 00000000..902978ef --- /dev/null +++ b/docs/source/utils.rst @@ -0,0 +1,15 @@ +utils +===== + +.. toctree:: + :maxdepth: 8 + + utils.xml2js + utils.map + utils.types + utils.files + utils.xpath + utils.string + utils.hedData + utils.array + utils.hedStrings \ No newline at end of file diff --git a/docs/source/utils.string.rst b/docs/source/utils.string.rst new file mode 100644 index 00000000..5067adb1 --- /dev/null +++ b/docs/source/utils.string.rst @@ -0,0 +1,13 @@ +.. js:autofunction:: stringIsEmpty + +.. js:autofunction:: getCharacterCount + +.. js:autofunction:: capitalizeString + +.. js:autofunction:: isClockFaceTime + +.. js:autofunction:: isDateTime + +.. js:autofunction:: isNumber + +.. js:autofunction:: stringTemplate diff --git a/docs/source/utils.types.rst b/docs/source/utils.types.rst new file mode 100644 index 00000000..c822ac40 --- /dev/null +++ b/docs/source/utils.types.rst @@ -0,0 +1,5 @@ +.. js:autoclass:: MemoizerMixin + :members: + +.. js:autoclass:: Memoizer + :members: diff --git a/docs/source/utils.xml2js.rst b/docs/source/utils.xml2js.rst new file mode 100644 index 00000000..8feed4dd --- /dev/null +++ b/docs/source/utils.xml2js.rst @@ -0,0 +1,3 @@ +# .. js:autofunction:: setNodeParent + +.. js:autofunction:: setParent diff --git a/docs/source/utils.xpath.rst b/docs/source/utils.xpath.rst new file mode 100644 index 00000000..97f4273c --- /dev/null +++ b/docs/source/utils.xpath.rst @@ -0,0 +1,5 @@ +.. js:autofunction:: find + +.. js:autofunction:: parseXPath + +.. js:autofunction:: search diff --git a/docs/source/validator.dataset.rst b/docs/source/validator.dataset.rst new file mode 100644 index 00000000..a64fc284 --- /dev/null +++ b/docs/source/validator.dataset.rst @@ -0,0 +1,13 @@ +.. js:autofunction:: parseDefinitions + +.. js:autofunction:: checkGroupForTemporalOrder + +.. js:autofunction:: validateTemporalOrder + +.. js:autofunction:: validateDataset + +.. js:autofunction:: validateHedEvents + +.. js:autofunction:: validateHedDataset + +.. js:autofunction:: validateHedDatasetWithContext diff --git a/docs/source/validator.event.hed3.rst b/docs/source/validator.event.hed3.rst new file mode 100644 index 00000000..cbaf5cf9 --- /dev/null +++ b/docs/source/validator.event.hed3.rst @@ -0,0 +1,2 @@ +.. js:autoclass:: Hed3Validator + :members: \ No newline at end of file diff --git a/docs/source/validator.event.init.rst b/docs/source/validator.event.init.rst new file mode 100644 index 00000000..deb86791 --- /dev/null +++ b/docs/source/validator.event.init.rst @@ -0,0 +1,7 @@ +.. js:autofunction:: initiallyValidateHedString + +.. js:autofunction:: validateHedString + +.. js:autofunction:: validateHedEvent + +.. js:autofunction:: validateHedEventWithDefinitions \ No newline at end of file diff --git a/docs/source/validator.event.rst b/docs/source/validator.event.rst new file mode 100644 index 00000000..a77be92a --- /dev/null +++ b/docs/source/validator.event.rst @@ -0,0 +1,9 @@ +event +===== + +.. toctree:: + :maxdepth: 8 + + validator.event.init + validator.event.validator + validator.event.hed3 \ No newline at end of file diff --git a/docs/source/validator.event.validator.rst b/docs/source/validator.event.validator.rst new file mode 100644 index 00000000..b874a3b6 --- /dev/null +++ b/docs/source/validator.event.validator.rst @@ -0,0 +1,2 @@ +.. js:autoclass:: HedValidator + :members: \ No newline at end of file diff --git a/docs/source/validator.hed2.event.hed2Validator.rst b/docs/source/validator.hed2.event.hed2Validator.rst new file mode 100644 index 00000000..c2a13b1d --- /dev/null +++ b/docs/source/validator.hed2.event.hed2Validator.rst @@ -0,0 +1,2 @@ +.. js:autoclass:: Hed2Validator + :members: diff --git a/docs/source/validator.hed2.event.rst b/docs/source/validator.hed2.event.rst new file mode 100644 index 00000000..c94f5857 --- /dev/null +++ b/docs/source/validator.hed2.event.rst @@ -0,0 +1,8 @@ +event +===== + +.. toctree:: + :maxdepth: 8 + + validator.hed2.event.hed2Validator + validator.hed2.event.units \ No newline at end of file diff --git a/docs/source/validator.hed2.event.units.rst b/docs/source/validator.hed2.event.units.rst new file mode 100644 index 00000000..657d223d --- /dev/null +++ b/docs/source/validator.hed2.event.units.rst @@ -0,0 +1,7 @@ +.. js:autofunction:: units.validateUnits + +.. js:autofunction:: isPrefixUnit + +.. js:autofunction:: getValidDerivativeUnits + +.. js:autofunction:: getAllUnits \ No newline at end of file diff --git a/docs/source/validator.hed2.parser.parsedHed2Tag.rst b/docs/source/validator.hed2.parser.parsedHed2Tag.rst new file mode 100644 index 00000000..fe5341f9 --- /dev/null +++ b/docs/source/validator.hed2.parser.parsedHed2Tag.rst @@ -0,0 +1,2 @@ +.. js:autoclass:: ParsedHed2Tag + :members: diff --git a/docs/source/validator.hed2.parser.rst b/docs/source/validator.hed2.parser.rst new file mode 100644 index 00000000..c1235721 --- /dev/null +++ b/docs/source/validator.hed2.parser.rst @@ -0,0 +1,7 @@ +parser +====== + +.. toctree:: + :maxdepth: 8 + + validator.hed2.parser.parsedHed2Tag \ No newline at end of file diff --git a/docs/source/validator.hed2.rst b/docs/source/validator.hed2.rst new file mode 100644 index 00000000..8d1170d0 --- /dev/null +++ b/docs/source/validator.hed2.rst @@ -0,0 +1,9 @@ +hed2 +==== + +.. toctree:: + :maxdepth: 8 + + validator.hed2.schema + validator.hed2.event + validator.hed2.parser \ No newline at end of file diff --git a/docs/source/validator.hed2.schema.hed2SchemaParser.rst b/docs/source/validator.hed2.schema.hed2SchemaParser.rst new file mode 100644 index 00000000..29111c20 --- /dev/null +++ b/docs/source/validator.hed2.schema.hed2SchemaParser.rst @@ -0,0 +1,2 @@ +.. js:autoclass:: Hed2SchemaParser + :members: diff --git a/docs/source/validator.hed2.schema.rst b/docs/source/validator.hed2.schema.rst new file mode 100644 index 00000000..7e969611 --- /dev/null +++ b/docs/source/validator.hed2.schema.rst @@ -0,0 +1,8 @@ +schema +====== + +.. toctree:: + :maxdepth: 8 + + validator.hed2.schema.schemaAttributes + validator.hed2.schema.hed2SchemaParser \ No newline at end of file diff --git a/docs/source/validator.hed2.schema.schemaAttributes.rst b/docs/source/validator.hed2.schema.schemaAttributes.rst new file mode 100644 index 00000000..327caf5c --- /dev/null +++ b/docs/source/validator.hed2.schema.schemaAttributes.rst @@ -0,0 +1,2 @@ +.. js:autoclass:: SchemaAttributes + :members: \ No newline at end of file diff --git a/docs/source/validator.parser.main.rst b/docs/source/validator.parser.main.rst new file mode 100644 index 00000000..45f7db0a --- /dev/null +++ b/docs/source/validator.parser.main.rst @@ -0,0 +1,14 @@ + +.. js:autofunction:: substituteCharacters + +.. js:autofunction:: countTagGroupParentheses + +.. js:autofunction:: isCommaMissingAfterClosingParenthesis + +.. js:autofunction:: findDelimiterIssuesInHedString + +.. js:autofunction:: validateFullUnparsedHedString + +.. js:autofunction:: parseHedString + +.. js:autofunction:: parseHedStrings diff --git a/docs/source/validator.parser.parsedHedGroup.rst b/docs/source/validator.parser.parsedHedGroup.rst new file mode 100644 index 00000000..037cd839 --- /dev/null +++ b/docs/source/validator.parser.parsedHedGroup.rst @@ -0,0 +1,3 @@ + +.. js:autoclass:: ParsedHedGroup + :members: \ No newline at end of file diff --git a/docs/source/validator.parser.parsedHedString.rst b/docs/source/validator.parser.parsedHedString.rst new file mode 100644 index 00000000..a376e3e0 --- /dev/null +++ b/docs/source/validator.parser.parsedHedString.rst @@ -0,0 +1,2 @@ +.. js:autoclass:: ParsedHedString + :members: \ No newline at end of file diff --git a/docs/source/validator.parser.parsedHedSubstring.rst b/docs/source/validator.parser.parsedHedSubstring.rst new file mode 100644 index 00000000..3445ffd8 --- /dev/null +++ b/docs/source/validator.parser.parsedHedSubstring.rst @@ -0,0 +1,2 @@ +.. js:autoclass:: ParsedHedSubstring + :members: \ No newline at end of file diff --git a/docs/source/validator.parser.parsedHedTag.rst b/docs/source/validator.parser.parsedHedTag.rst new file mode 100644 index 00000000..da2e3e4e --- /dev/null +++ b/docs/source/validator.parser.parsedHedTag.rst @@ -0,0 +1,6 @@ + +.. js:autoclass:: ParsedHedTag + :members: + +.. js:autoclass:: ParsedHed3Tag + :members: \ No newline at end of file diff --git a/docs/source/validator.parser.rst b/docs/source/validator.parser.rst new file mode 100644 index 00000000..676d7570 --- /dev/null +++ b/docs/source/validator.parser.rst @@ -0,0 +1,12 @@ +parser +====== + +.. toctree:: + :maxdepth: 8 + + validator.parser.parsedHedTag + validator.parser.splitHedString + validator.parser.parsedHedString + validator.parser.parsedHedSubstring + validator.parser.parsedHedGroup + validator.parser.main \ No newline at end of file diff --git a/docs/source/validator.parser.splitHedString.rst b/docs/source/validator.parser.splitHedString.rst new file mode 100644 index 00000000..d0bd566c --- /dev/null +++ b/docs/source/validator.parser.splitHedString.rst @@ -0,0 +1,8 @@ +.. js:autoclass:: HedStringTokenizer + :members: + +.. js:autofunction:: checkForInvalidCharacters + +.. js:autofunction:: createParsedTags + +.. js:autofunction:: splitHedString diff --git a/docs/source/validator.rst b/docs/source/validator.rst new file mode 100644 index 00000000..e4434167 --- /dev/null +++ b/docs/source/validator.rst @@ -0,0 +1,11 @@ +validator +========= + +.. toctree:: + :maxdepth: 8 + + validator.dataset + validator.schema + validator.event + validator.parser + validator.hed2 \ No newline at end of file diff --git a/docs/source/validator.schema.hed3.rst b/docs/source/validator.schema.hed3.rst new file mode 100644 index 00000000..270170d8 --- /dev/null +++ b/docs/source/validator.schema.hed3.rst @@ -0,0 +1,3 @@ +hed3 +==== +Intentionally blank for now \ No newline at end of file diff --git a/docs/source/validator.schema.init.rst b/docs/source/validator.schema.init.rst new file mode 100644 index 00000000..f9a32b06 --- /dev/null +++ b/docs/source/validator.schema.init.rst @@ -0,0 +1,9 @@ +.. js:autofunction:: isHed3Schema + +.. js:autofunction:: buildSchemaAttributesObject + +.. js:autofunction:: buildSchemaObject + + .. js:autofunction:: init.buildSchema + +.. js:autofunction:: buildSchemas diff --git a/docs/source/validator.schema.parser.rst b/docs/source/validator.schema.parser.rst new file mode 100644 index 00000000..2ca443f8 --- /dev/null +++ b/docs/source/validator.schema.parser.rst @@ -0,0 +1,2 @@ +.. js:autoclass:: SchemaParser + :members: diff --git a/docs/source/validator.schema.rst b/docs/source/validator.schema.rst new file mode 100644 index 00000000..f453677b --- /dev/null +++ b/docs/source/validator.schema.rst @@ -0,0 +1,10 @@ +schema +====== + +.. toctree:: + :maxdepth: 8 + + validator.schema.init + validator.schema.types + validator.schema.parser + validator.schema.hed3 \ No newline at end of file diff --git a/docs/source/validator.schema.types.rst b/docs/source/validator.schema.types.rst new file mode 100644 index 00000000..e6b359ee --- /dev/null +++ b/docs/source/validator.schema.types.rst @@ -0,0 +1,32 @@ +.. js:autoclass:: SchemaEntries + :members: + +.. js:autoclass:: SchemaEntryManager + :members: + +.. js:autoclass:: SchemaEntry + :members: + +.. js:autoclass:: SchemaProperty + :members: + +.. js:autoclass:: SchemaAttribute + :members: + +.. js:autoclass:: SchemaEntryWithAttributes + :members: + +.. js:autoclass:: SchemaUnit + :members: + +.. js:autoclass:: SchemaUnitClass + :members: + +.. js:autoclass:: SchemaUnitModifier + :members: + +.. js:autoclass:: SchemaValueClass + :members: + +.. js:autoclass:: SchemaTag + :members: diff --git a/readthedocs.yml b/readthedocs.yml index 88c876e6..4354290b 100644 --- a/readthedocs.yml +++ b/readthedocs.yml @@ -11,7 +11,6 @@ build: nodejs: '18' jobs: post_install: - - pip install sphinx-js - npm ci - npm install -g jsdoc diff --git a/utils/types.js b/utils/types.js index 58394024..facb7eec 100644 --- a/utils/types.js +++ b/utils/types.js @@ -33,4 +33,7 @@ export const MemoizerMixin = (Base) => { } } +/** + * Memoizer class + */ export class Memoizer extends MemoizerMixin(Object) {} diff --git a/validator/dataset.js b/validator/dataset.js index 15285420..05549be9 100644 --- a/validator/dataset.js +++ b/validator/dataset.js @@ -110,7 +110,7 @@ export const validateDataset = function (definitions, hedStrings, hedSchemas) { /** * Validate a group of HED strings. * - * @param {(string|ParsedHedString)[]} parsedHedStrings The dataset's parsed HED strings. + * @param {(string[]|ParsedHedString[])} parsedHedStrings The dataset's parsed HED strings. * @param {Schemas} hedSchemas The HED schema container object. * @param {Map} definitions The dataset's parsed definitions. * @param {Object} settings The configuration settings for validation. diff --git a/validator/event/hed3.js b/validator/event/hed3.js index 74ca3b6b..a71c01dc 100644 --- a/validator/event/hed3.js +++ b/validator/event/hed3.js @@ -12,6 +12,9 @@ import { HedValidator } from './validator' const tagGroupType = 'tagGroup' const topLevelTagGroupType = 'topLevelTagGroup' +/** + * Hed3Validator class + */ export class Hed3Validator extends HedValidator { /** * The parsed definitions. diff --git a/validator/event/validator.js b/validator/event/validator.js index e47605ed..652f0894 100644 --- a/validator/event/validator.js +++ b/validator/event/validator.js @@ -9,7 +9,9 @@ const requiredType = 'required' const requireChildType = 'requireChild' // Validation tests - +/** + * HedValidator class + */ export class HedValidator { /** * The parsed HED string to be validated. diff --git a/validator/hed2/event/hed2Validator.js b/validator/hed2/event/hed2Validator.js index 770f59f4..e043f888 100644 --- a/validator/hed2/event/hed2Validator.js +++ b/validator/hed2/event/hed2Validator.js @@ -6,6 +6,9 @@ const clockTimeUnitClass = 'clockTime' const dateTimeUnitClass = 'dateTime' const timeUnitClass = 'time' +/** + * Hed2Validator class + */ export class Hed2Validator extends HedValidator { constructor(parsedString, hedSchemas, options) { super(parsedString, hedSchemas, options) diff --git a/validator/hed2/parser/parsedHed2Tag.js b/validator/hed2/parser/parsedHed2Tag.js index abcca974..08f21cb2 100644 --- a/validator/hed2/parser/parsedHed2Tag.js +++ b/validator/hed2/parser/parsedHed2Tag.js @@ -1,6 +1,9 @@ import { replaceTagNameWithPound } from '../../../utils/hedStrings' import { ParsedHedTag } from '../../parser/parsedHedTag' +/** + * ParsedHedTag class + */ export class ParsedHed2Tag extends ParsedHedTag { /** * Convert this tag to long form. diff --git a/validator/hed2/schema/hed2SchemaParser.js b/validator/hed2/schema/hed2SchemaParser.js index dd05dbb1..bc8cad6c 100644 --- a/validator/hed2/schema/hed2SchemaParser.js +++ b/validator/hed2/schema/hed2SchemaParser.js @@ -38,6 +38,9 @@ const unitModifierElement = 'unitModifier' const lc = (str) => str.toLowerCase() +/** + * Hed2SchemaParser class + */ export class Hed2SchemaParser extends SchemaParser { parse() { this.populateDictionaries() diff --git a/validator/parser/parsedHedGroup.js b/validator/parser/parsedHedGroup.js index c2d9b1e4..acb2da43 100644 --- a/validator/parser/parsedHedGroup.js +++ b/validator/parser/parsedHedGroup.js @@ -9,7 +9,7 @@ import { ParsedHedTag } from './parsedHedTag' /** * A parsed HED tag group. */ -export default class ParsedHedGroup extends ParsedHedSubstring { +export class ParsedHedGroup extends ParsedHedSubstring { static SPECIAL_SHORT_TAGS = new Set(['Definition', 'Def', 'Def-expand', 'Onset', 'Offset', 'Inset']) /** @@ -518,3 +518,5 @@ export default class ParsedHedGroup extends ParsedHedSubstring { } } } + +export default ParsedHedGroup diff --git a/validator/parser/parsedHedString.js b/validator/parser/parsedHedString.js index 7db62204..aafb06e0 100644 --- a/validator/parser/parsedHedString.js +++ b/validator/parser/parsedHedString.js @@ -4,7 +4,7 @@ import ParsedHedGroup from './parsedHedGroup' /** * A parsed HED string. */ -export default class ParsedHedString { +export class ParsedHedString { /** * The original HED string. * @type {string} @@ -63,3 +63,5 @@ export default class ParsedHedString { }) } } + +export default ParsedHedString diff --git a/validator/parser/parsedHedSubstring.js b/validator/parser/parsedHedSubstring.js index 15913ce9..6400a5a0 100644 --- a/validator/parser/parsedHedSubstring.js +++ b/validator/parser/parsedHedSubstring.js @@ -3,7 +3,7 @@ import { Memoizer } from '../../utils/types' /** * A parsed HED substring. */ -export default class ParsedHedSubstring extends Memoizer { +export class ParsedHedSubstring extends Memoizer { /** * The original pre-parsed version of the HED tag. * @type {string} @@ -36,3 +36,5 @@ export default class ParsedHedSubstring extends Memoizer { return this.originalTag } } + +export default ParsedHedSubstring diff --git a/validator/parser/parsedHedTag.js b/validator/parser/parsedHedTag.js index 1287b1f7..115e76ba 100644 --- a/validator/parser/parsedHedTag.js +++ b/validator/parser/parsedHedTag.js @@ -215,6 +215,9 @@ export class ParsedHedTag extends ParsedHedSubstring { } } +/** + * A parsed HED3 tag. + */ export class ParsedHed3Tag extends ParsedHedTag { /** * Convert this tag to long form. diff --git a/validator/parser/splitHedString.js b/validator/parser/splitHedString.js index 6dfb6b71..c8216be8 100644 --- a/validator/parser/splitHedString.js +++ b/validator/parser/splitHedString.js @@ -51,6 +51,9 @@ class GroupSpec { } } +/** + * Class for tokenizing hed strings + */ class HedStringTokenizer { hedString syntaxIssues diff --git a/validator/schema/parser.js b/validator/schema/parser.js index 4a7c5892..61380d98 100644 --- a/validator/schema/parser.js +++ b/validator/schema/parser.js @@ -5,6 +5,9 @@ import flattenDeep from 'lodash/flattenDeep' // Temporary import * as xpath from '../../utils/xpath' +/** + * SchemaParser class + */ export class SchemaParser { constructor(rootElement) { this.rootElement = rootElement diff --git a/validator/schema/types.js b/validator/schema/types.js index 481bfe05..21f5468e 100644 --- a/validator/schema/types.js +++ b/validator/schema/types.js @@ -5,6 +5,9 @@ pluralize.addUncountableRule('hertz') // Old-style types +/** + * SchemaEntries class + */ export class SchemaEntries extends Memoizer { /** * The schema's properties. @@ -165,6 +168,9 @@ export class SchemaEntryManager extends Memoizer { } } +/** + * SchemaEntry class + */ export class SchemaEntry { /** * The name of this schema entry. @@ -203,6 +209,9 @@ const categoryProperty = 'categoryProperty' const typeProperty = 'typeProperty' const roleProperty = 'roleProperty' +/** + * A schema property. + */ export class SchemaProperty extends SchemaEntry { /** * The type of the property. @@ -316,6 +325,9 @@ export class SchemaAttribute extends SchemaEntry { } } +/** + * SchemaEntryWithAttributes class + */ class SchemaEntryWithAttributes extends SchemaEntry { /** * The set of boolean attributes this schema entry has. @@ -412,6 +424,9 @@ class SchemaEntryWithAttributes extends SchemaEntry { } } +/** + * SchemaUnit class + */ export class SchemaUnit extends SchemaEntryWithAttributes { /** * The legal derivatives of this unit. @@ -461,6 +476,9 @@ export class SchemaUnit extends SchemaEntryWithAttributes { } } +/** + * SchemaUnitClass class + */ export class SchemaUnitClass extends SchemaEntryWithAttributes { /** * The units for this unit class. @@ -499,6 +517,9 @@ export class SchemaUnitClass extends SchemaEntryWithAttributes { } } +/** + * SchemaUnitModifier class + */ export class SchemaUnitModifier extends SchemaEntryWithAttributes { constructor(name, booleanAttributes, valueAttributes) { super(name, booleanAttributes, valueAttributes) @@ -513,6 +534,9 @@ export class SchemaUnitModifier extends SchemaEntryWithAttributes { } } +/** + * SchemaValueClass class + */ export class SchemaValueClass extends SchemaEntryWithAttributes { constructor(name, booleanAttributes, valueAttributes) { super(name, booleanAttributes, valueAttributes) From 67c57e4a4978c5bab2a1358f086b81d6f51a62aa Mon Sep 17 00:00:00 2001 From: IanCa Date: Wed, 18 Oct 2023 16:42:46 -0500 Subject: [PATCH 2/2] Add headers to the rest of the files --- docs/source/bids.rst | 2 +- docs/source/common.issues.issues.rst | 3 +++ docs/source/common.schema.loader.rst | 2 ++ docs/source/common.schema.types.rst | 2 ++ docs/source/converter.converter.rst | 7 +++++-- docs/source/converter.schema.rst | 3 +++ docs/source/converter.splitHedString.rst | 3 +++ docs/source/converter.types.rst | 3 +++ docs/source/index.rst | 2 +- docs/source/utils.array.rst | 3 +++ docs/source/utils.files.rst | 2 ++ docs/source/utils.hedData.rst | 7 +++++-- docs/source/utils.hedStrings.rst | 3 +++ docs/source/utils.string.rst | 3 +++ docs/source/utils.types.rst | 3 +++ docs/source/utils.xml2js.rst | 6 +++++- docs/source/utils.xpath.rst | 3 +++ docs/source/validator.dataset.rst | 3 +++ docs/source/validator.event.hed3.rst | 3 +++ docs/source/validator.event.init.rst | 3 +++ docs/source/validator.event.validator.rst | 2 ++ docs/source/validator.hed2.event.hed2Validator.rst | 3 +++ docs/source/validator.hed2.event.units.rst | 3 +++ docs/source/validator.hed2.parser.parsedHed2Tag.rst | 3 +++ docs/source/validator.hed2.schema.hed2SchemaParser.rst | 3 +++ docs/source/validator.hed2.schema.schemaAttributes.rst | 3 +++ docs/source/validator.parser.main.rst | 2 ++ docs/source/validator.parser.parsedHedGroup.rst | 2 ++ docs/source/validator.parser.parsedHedString.rst | 3 +++ docs/source/validator.parser.parsedHedSubstring.rst | 3 +++ docs/source/validator.parser.parsedHedTag.rst | 2 ++ docs/source/validator.parser.splitHedString.rst | 3 +++ docs/source/validator.schema.init.rst | 3 +++ docs/source/validator.schema.parser.rst | 3 +++ docs/source/validator.schema.types.rst | 3 +++ 35 files changed, 100 insertions(+), 7 deletions(-) diff --git a/docs/source/bids.rst b/docs/source/bids.rst index a8858dac..1b5f8076 100644 --- a/docs/source/bids.rst +++ b/docs/source/bids.rst @@ -4,7 +4,7 @@ bids Bids functionality .. toctree:: - :maxdepth: 5 + :maxdepth: 8 bids.schema.rst bids.tsvParser.rst diff --git a/docs/source/common.issues.issues.rst b/docs/source/common.issues.issues.rst index 9c798b60..d9842b32 100644 --- a/docs/source/common.issues.issues.rst +++ b/docs/source/common.issues.issues.rst @@ -1,3 +1,6 @@ +issues +====== + .. js:autoclass:: Issue :members: diff --git a/docs/source/common.schema.loader.rst b/docs/source/common.schema.loader.rst index e7df2075..fc13df03 100644 --- a/docs/source/common.schema.loader.rst +++ b/docs/source/common.schema.loader.rst @@ -1,3 +1,5 @@ +loader +====== .. js:autofunction:: loadSchema diff --git a/docs/source/common.schema.types.rst b/docs/source/common.schema.types.rst index 90effd5d..332a4842 100644 --- a/docs/source/common.schema.types.rst +++ b/docs/source/common.schema.types.rst @@ -1,3 +1,5 @@ +types +====== .. js:autoclass:: Schema :members: diff --git a/docs/source/converter.converter.rst b/docs/source/converter.converter.rst index 097f7b41..60f17848 100644 --- a/docs/source/converter.converter.rst +++ b/docs/source/converter.converter.rst @@ -1,3 +1,6 @@ +converter +========= + .. js:autofunction:: removeSlashesAndSpaces .. js:autofunction:: convertTagToLong @@ -6,8 +9,8 @@ .. js:autofunction:: convertPartialHedStringToLong -# This one is not marked for export -# .. js:autofunction:: convertHedString +.. This one is not marked for export + .. js:autofunction:: convertHedString .. js:autofunction:: convertHedStringToLong diff --git a/docs/source/converter.schema.rst b/docs/source/converter.schema.rst index 6c265764..b693b11e 100644 --- a/docs/source/converter.schema.rst +++ b/docs/source/converter.schema.rst @@ -1,3 +1,6 @@ +schema +========= + .. js:autofunction:: buildMappingObject .. js:autofunction:: schema.buildSchema diff --git a/docs/source/converter.splitHedString.rst b/docs/source/converter.splitHedString.rst index cce68dc2..5fc0b30e 100644 --- a/docs/source/converter.splitHedString.rst +++ b/docs/source/converter.splitHedString.rst @@ -1,3 +1,6 @@ +splitHedString +============== + .. js:autofunction:: splitHedString diff --git a/docs/source/converter.types.rst b/docs/source/converter.types.rst index 43e05b77..5af60b33 100644 --- a/docs/source/converter.types.rst +++ b/docs/source/converter.types.rst @@ -1,3 +1,6 @@ +types +========= + .. js:autoclass:: TagEntry :members: diff --git a/docs/source/index.rst b/docs/source/index.rst index 124741f1..e031bb49 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -14,7 +14,7 @@ Hierarchical Event Descriptor (HED) JavaScript Tools Note: this is a work in progress. More information is coming. .. toctree:: - :maxdepth: 5 + :maxdepth: 8 :caption: Contents: introduction.md diff --git a/docs/source/utils.array.rst b/docs/source/utils.array.rst index 53d973d7..97a67206 100644 --- a/docs/source/utils.array.rst +++ b/docs/source/utils.array.rst @@ -1,3 +1,6 @@ +array +========= + .. js:autofunction:: getElementCount .. js:autofunction:: asArray diff --git a/docs/source/utils.files.rst b/docs/source/utils.files.rst index 7d45fee6..bd33db28 100644 --- a/docs/source/utils.files.rst +++ b/docs/source/utils.files.rst @@ -1,3 +1,5 @@ +files +========= .. js:autofunction:: readFile .. js:autofunction:: readHTTPSFile diff --git a/docs/source/utils.hedData.rst b/docs/source/utils.hedData.rst index 624fc573..8e1a5a35 100644 --- a/docs/source/utils.hedData.rst +++ b/docs/source/utils.hedData.rst @@ -1,7 +1,10 @@ +hedData +========= + .. js:autofunction:: getGenerationForSchemaVersion -# No documentation yet -# .. js:autofunction:: mergeParsingIssues +.. No documentation yet + .. js:autofunction:: mergeParsingIssues .. js:autofunction:: getParsedParentTags diff --git a/docs/source/utils.hedStrings.rst b/docs/source/utils.hedStrings.rst index cbe39f57..4fb6face 100644 --- a/docs/source/utils.hedStrings.rst +++ b/docs/source/utils.hedStrings.rst @@ -1,5 +1,8 @@ +hedStrings +========= .. js:autofunction:: replaceTagNameWithPound +.. no documentation yet # .. js:autofunction:: getTagSlashIndices .. js:autofunction:: getTagLevels diff --git a/docs/source/utils.string.rst b/docs/source/utils.string.rst index 5067adb1..818b4492 100644 --- a/docs/source/utils.string.rst +++ b/docs/source/utils.string.rst @@ -1,3 +1,6 @@ +string +====== + .. js:autofunction:: stringIsEmpty .. js:autofunction:: getCharacterCount diff --git a/docs/source/utils.types.rst b/docs/source/utils.types.rst index c822ac40..1e747d2a 100644 --- a/docs/source/utils.types.rst +++ b/docs/source/utils.types.rst @@ -1,3 +1,6 @@ +types +========= + .. js:autoclass:: MemoizerMixin :members: diff --git a/docs/source/utils.xml2js.rst b/docs/source/utils.xml2js.rst index 8feed4dd..f4523835 100644 --- a/docs/source/utils.xml2js.rst +++ b/docs/source/utils.xml2js.rst @@ -1,3 +1,7 @@ -# .. js:autofunction:: setNodeParent +xml2js +========= + +.. not exported + .. js:autofunction:: setNodeParent .. js:autofunction:: setParent diff --git a/docs/source/utils.xpath.rst b/docs/source/utils.xpath.rst index 97f4273c..a31f97bf 100644 --- a/docs/source/utils.xpath.rst +++ b/docs/source/utils.xpath.rst @@ -1,3 +1,6 @@ +xpath +========= + .. js:autofunction:: find .. js:autofunction:: parseXPath diff --git a/docs/source/validator.dataset.rst b/docs/source/validator.dataset.rst index a64fc284..b48d62bc 100644 --- a/docs/source/validator.dataset.rst +++ b/docs/source/validator.dataset.rst @@ -1,3 +1,6 @@ +dataset +========= + .. js:autofunction:: parseDefinitions .. js:autofunction:: checkGroupForTemporalOrder diff --git a/docs/source/validator.event.hed3.rst b/docs/source/validator.event.hed3.rst index cbaf5cf9..36563f9c 100644 --- a/docs/source/validator.event.hed3.rst +++ b/docs/source/validator.event.hed3.rst @@ -1,2 +1,5 @@ +hed3 +========= + .. js:autoclass:: Hed3Validator :members: \ No newline at end of file diff --git a/docs/source/validator.event.init.rst b/docs/source/validator.event.init.rst index deb86791..20d1d613 100644 --- a/docs/source/validator.event.init.rst +++ b/docs/source/validator.event.init.rst @@ -1,3 +1,6 @@ +init +========= + .. js:autofunction:: initiallyValidateHedString .. js:autofunction:: validateHedString diff --git a/docs/source/validator.event.validator.rst b/docs/source/validator.event.validator.rst index b874a3b6..3e0eeaef 100644 --- a/docs/source/validator.event.validator.rst +++ b/docs/source/validator.event.validator.rst @@ -1,2 +1,4 @@ +validator +========= .. js:autoclass:: HedValidator :members: \ No newline at end of file diff --git a/docs/source/validator.hed2.event.hed2Validator.rst b/docs/source/validator.hed2.event.hed2Validator.rst index c2a13b1d..623a93f2 100644 --- a/docs/source/validator.hed2.event.hed2Validator.rst +++ b/docs/source/validator.hed2.event.hed2Validator.rst @@ -1,2 +1,5 @@ +hed2Validator +============= + .. js:autoclass:: Hed2Validator :members: diff --git a/docs/source/validator.hed2.event.units.rst b/docs/source/validator.hed2.event.units.rst index 657d223d..a0353dcf 100644 --- a/docs/source/validator.hed2.event.units.rst +++ b/docs/source/validator.hed2.event.units.rst @@ -1,3 +1,6 @@ +units +========= + .. js:autofunction:: units.validateUnits .. js:autofunction:: isPrefixUnit diff --git a/docs/source/validator.hed2.parser.parsedHed2Tag.rst b/docs/source/validator.hed2.parser.parsedHed2Tag.rst index fe5341f9..ed9c633c 100644 --- a/docs/source/validator.hed2.parser.parsedHed2Tag.rst +++ b/docs/source/validator.hed2.parser.parsedHed2Tag.rst @@ -1,2 +1,5 @@ +parsedHed2Tag +========= + .. js:autoclass:: ParsedHed2Tag :members: diff --git a/docs/source/validator.hed2.schema.hed2SchemaParser.rst b/docs/source/validator.hed2.schema.hed2SchemaParser.rst index 29111c20..71b26067 100644 --- a/docs/source/validator.hed2.schema.hed2SchemaParser.rst +++ b/docs/source/validator.hed2.schema.hed2SchemaParser.rst @@ -1,2 +1,5 @@ +hed2SchemaParser +================ + .. js:autoclass:: Hed2SchemaParser :members: diff --git a/docs/source/validator.hed2.schema.schemaAttributes.rst b/docs/source/validator.hed2.schema.schemaAttributes.rst index 327caf5c..636ac687 100644 --- a/docs/source/validator.hed2.schema.schemaAttributes.rst +++ b/docs/source/validator.hed2.schema.schemaAttributes.rst @@ -1,2 +1,5 @@ +schemaAttributes +================ + .. js:autoclass:: SchemaAttributes :members: \ No newline at end of file diff --git a/docs/source/validator.parser.main.rst b/docs/source/validator.parser.main.rst index 45f7db0a..2f0fae59 100644 --- a/docs/source/validator.parser.main.rst +++ b/docs/source/validator.parser.main.rst @@ -1,3 +1,5 @@ +main +========= .. js:autofunction:: substituteCharacters diff --git a/docs/source/validator.parser.parsedHedGroup.rst b/docs/source/validator.parser.parsedHedGroup.rst index 037cd839..218d5efa 100644 --- a/docs/source/validator.parser.parsedHedGroup.rst +++ b/docs/source/validator.parser.parsedHedGroup.rst @@ -1,3 +1,5 @@ +parsedHedGroup +============== .. js:autoclass:: ParsedHedGroup :members: \ No newline at end of file diff --git a/docs/source/validator.parser.parsedHedString.rst b/docs/source/validator.parser.parsedHedString.rst index a376e3e0..1fbfa09a 100644 --- a/docs/source/validator.parser.parsedHedString.rst +++ b/docs/source/validator.parser.parsedHedString.rst @@ -1,2 +1,5 @@ +parsedHedString +=============== + .. js:autoclass:: ParsedHedString :members: \ No newline at end of file diff --git a/docs/source/validator.parser.parsedHedSubstring.rst b/docs/source/validator.parser.parsedHedSubstring.rst index 3445ffd8..e2e017e8 100644 --- a/docs/source/validator.parser.parsedHedSubstring.rst +++ b/docs/source/validator.parser.parsedHedSubstring.rst @@ -1,2 +1,5 @@ +parsedHedSubstring +================== + .. js:autoclass:: ParsedHedSubstring :members: \ No newline at end of file diff --git a/docs/source/validator.parser.parsedHedTag.rst b/docs/source/validator.parser.parsedHedTag.rst index da2e3e4e..f6ac6486 100644 --- a/docs/source/validator.parser.parsedHedTag.rst +++ b/docs/source/validator.parser.parsedHedTag.rst @@ -1,3 +1,5 @@ +parsedHedTag +=============== .. js:autoclass:: ParsedHedTag :members: diff --git a/docs/source/validator.parser.splitHedString.rst b/docs/source/validator.parser.splitHedString.rst index d0bd566c..b7fdec82 100644 --- a/docs/source/validator.parser.splitHedString.rst +++ b/docs/source/validator.parser.splitHedString.rst @@ -1,3 +1,6 @@ +splitHedString +=============== + .. js:autoclass:: HedStringTokenizer :members: diff --git a/docs/source/validator.schema.init.rst b/docs/source/validator.schema.init.rst index f9a32b06..20c41991 100644 --- a/docs/source/validator.schema.init.rst +++ b/docs/source/validator.schema.init.rst @@ -1,3 +1,6 @@ +init +=============== + .. js:autofunction:: isHed3Schema .. js:autofunction:: buildSchemaAttributesObject diff --git a/docs/source/validator.schema.parser.rst b/docs/source/validator.schema.parser.rst index 2ca443f8..bf9e57a9 100644 --- a/docs/source/validator.schema.parser.rst +++ b/docs/source/validator.schema.parser.rst @@ -1,2 +1,5 @@ +parser +=============== + .. js:autoclass:: SchemaParser :members: diff --git a/docs/source/validator.schema.types.rst b/docs/source/validator.schema.types.rst index e6b359ee..a7c0ccb5 100644 --- a/docs/source/validator.schema.types.rst +++ b/docs/source/validator.schema.types.rst @@ -1,3 +1,6 @@ +types +=============== + .. js:autoclass:: SchemaEntries :members: