-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update documentation to use sphinx (#643)
* Update main function docstrings to work better with sphinx/rst formatting Add "sections" Specify input and output arguments Reformat examples * Add tools for creating rst pages for functions, classes and tutorials * Add docs source * Add .readthedocs.yaml * Delete previous doc files * Update export location for tutorial html files * remove html files from tutorials/html (files are now located in docs/source/_static/html/tutorials) * Fix indentation in function docstrings * Add proper titles and "open in MATLAB Online" badges to tutorial pages * Update main page and add installation instructions * Add view full page badge for tutorials * Add hdmf_common types plus smaller changes Fix: Make sure neurodata types specfied with "short names" in the documentation for properties of generated classes are properly linked to their corresponding class pages in the docs i.e (TimeSeries) Add links to the nwb format specification for each type * Delete docstring_processors.cpython-311.pyc * Update neurdata class rst template * Update docstring_processors.py - Add docstring processors for adding role to class properties and change formatting for sphinx-autodetected class constructor from reference to constructor method to reference for class * Update generator to add more information in class docstrings * Rerun generateCore (update all classes) * Update link target attributes in livescript htmls * Fix previous commit - use correct target attribute value * Update links for types to point to readthedocs * Update livescript html files * Add favicon, dynamic iframe height, youtube badge for tutorial * Update .codespellrc * Fix links in tutorials, add hdmf_experimental types * Fix wrong/outdated links in livescript tutorials tutorials * Update tutorial_config.json * Update pages add section from matnwb readme add pages from nwb-overview minor rearrangement * Minor fixes --------- Co-authored-by: Ben Dichter <ben.dichter@gmail.com>
- Loading branch information
1 parent
4bf41dc
commit 9b73801
Showing
408 changed files
with
12,031 additions
and
33,740 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
function requiredPropertyNames = getRequiredPropertyNames(classprops) | ||
% getRequiredPropertyNames - Get name of required properties from props info | ||
|
||
allProperties = keys(classprops); | ||
requiredPropertyNames = {}; | ||
|
||
for iProp = 1:length(allProperties) | ||
|
||
propertyName = allProperties{iProp}; | ||
prop = classprops(propertyName); | ||
|
||
isRequired = ischar(prop) || isa(prop, 'containers.Map') || isstruct(prop); | ||
isPropertyRequired = false; | ||
if isa(prop, 'file.interface.HasProps') | ||
isPropertyRequired = false(size(prop)); | ||
for iSubProp = 1:length(prop) | ||
p = prop(iSubProp); | ||
isPropertyRequired(iSubProp) = p.required; | ||
end | ||
end | ||
|
||
if isRequired || all(isPropertyRequired) | ||
requiredPropertyNames = [requiredPropertyNames {propertyName}]; %#ok<AGROW> | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
function allProps = mergeProps(props, superClassProps) | ||
% merge_props - Merge maps containing props info for class and it's superclasses | ||
|
||
allPropsCell = [{props}, superClassProps]; | ||
allProps = containers.Map(); | ||
|
||
% Start from most remote ancestor and work towards current class. | ||
% Important to go in this order because subclasses can override | ||
% properties, and we need to keep the property definition for the superclass | ||
% that is closest to the current class or the property definition for the | ||
% class itself in the final map | ||
for i = numel(allPropsCell):-1:1 | ||
superPropNames = allPropsCell{i}.keys; | ||
for jProp = 1:numel(superPropNames) | ||
allProps(superPropNames{jProp}) = allPropsCell{i}(superPropNames{jProp}); | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.