Skip to content

Commit

Permalink
API documentation
Browse files Browse the repository at this point in the history
Created an API page

Added in _static a collapsible-list library for tree generation of hierarchies

Included a script that parses Doxygen XML files to generate pages for:
1. Alg, Core, Data, I/O
2. Class Hierarchy
3. File Hierarchy
  • Loading branch information
elbashandy committed Mar 16, 2021
1 parent a33e63b commit b399af0
Show file tree
Hide file tree
Showing 18 changed files with 538 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
_build
*.pt
*.vscode*
.DS_Store
generated_rtd*
7 changes: 7 additions & 0 deletions doc/rtd/_static/collapsible-lists/LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
This code is the fruit of Kate Morley's labor, taken from here:

- http://code.iamkate.com/javascript/collapsible-lists/

She includes a generous CC0 1.0 license for all materials on her site:

- http://code.iamkate.com/
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/rtd/_static/collapsible-lists/css/button.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/rtd/_static/collapsible-lists/css/list-item.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
61 changes: 61 additions & 0 deletions doc/rtd/_static/collapsible-lists/css/tree_view.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
/* Source taken directly from:
* view-source:http://code.iamkate.com/javascript/collapsible-lists/
*
* Kate Morley's license for this code is CC0:
* Created by [Kate Morley](http://iamkate.com/). Except where explicitly
* stated otherwise, all content is released under the terms of the
* [CC0 1.0 Universal legal code](http://creativecommons.org/publicdomain/zero/1.0/legalcode).
*/
.treeView{
-moz-user-select:none;
position:relative;
}

.treeView ul{
margin:0 0 0 -1.5em ! important;
padding:0 0 0 1.5em ! important;
}

.treeView ul ul{
background:url('list-item-contents.png') repeat-y left ! important;
}

.treeView li.lastChild > ul{
background-image:none ! important;
}

.treeView li{
margin:0 ! important;
padding:0 ! important;
background:url('list-item-root.png') no-repeat top left ! important;
list-style-position:inside ! important;
list-style-image:url('button.png') ! important;
cursor:auto;
}

.treeView li.collapsibleListOpen{
list-style-image:url('button-open.png') ! important;
cursor:pointer;
}

.treeView li.collapsibleListClosed{
list-style-image:url('button-closed.png') ! important;
cursor:pointer;
}

.treeView li li{
background-image:url('list-item.png') ! important;
padding-left:1.5em ! important;
}

.treeView li.lastChild{
background-image:url('list-item-last.png') ! important;
}

.treeView li.collapsibleListOpen{
background-image:url('list-item-open.png') ! important;
}

.treeView li.collapsibleListOpen.lastChild{
background-image:url('list-item-last-open.png') ! important;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
/*
CollapsibleLists.js
An object allowing lists to dynamically expand and collapse
Created by Kate Morley - http://code.iamkate.com/ - and released under
the terms of the CC0 1.0 Universal legal code:
http://creativecommons.org/publicdomain/zero/1.0/legalcode
*/

var CollapsibleLists=new function(){
this.apply=function(_1){
var _2=document.getElementsByTagName("ul");
for(var _3=0;_3<_2.length;_3++){
if(_2[_3].className.match(/(^| )collapsibleList( |$)/)){
this.applyTo(_2[_3],true);
if(!_1){
var _4=_2[_3].getElementsByTagName("ul");
for(var _5=0;_5<_4.length;_5++){
_4[_5].className+=" collapsibleList";
}
}
}
}
};
this.applyTo=function(_6,_7){
var _8=_6.getElementsByTagName("li");
for(var _9=0;_9<_8.length;_9++){
if(!_7||_6==_8[_9].parentNode){
if(_8[_9].addEventListener){
_8[_9].addEventListener("mousedown",function(e){
e.preventDefault();
},false);
}else{
_8[_9].attachEvent("onselectstart",function(){
event.returnValue=false;
});
}
if(_8[_9].addEventListener){
_8[_9].addEventListener("click",_a(_8[_9]),false);
}else{
_8[_9].attachEvent("onclick",_a(_8[_9]));
}
_b(_8[_9]);
}
}
};
function _a(_c){
return function(e){
if(!e){
e=window.event;
}
var _d=(e.target?e.target:e.srcElement);
while(_d.nodeName!="LI"){
_d=_d.parentNode;
}
if(_d==_c){
_b(_c);
}
};
};
function _b(_e){
var _f=_e.className.match(/(^| )collapsibleListClosed( |$)/);
var uls=_e.getElementsByTagName("ul");
for(var _10=0;_10<uls.length;_10++){
var li=uls[_10];
while(li.nodeName!="LI"){
li=li.parentNode;
}
if(li==_e){
uls[_10].style.display=(_f?"block":"none");
}
}
_e.className=_e.className.replace(/(^| )collapsibleList(Open|Closed)( |$)/,"");
if(uls.length>0){
_e.className+=" collapsibleList"+(_f?"Open":"Closed");
}
};
}();

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
$(document).ready(function() {
CollapsibleLists.apply();
});
12 changes: 12 additions & 0 deletions doc/rtd/api/api.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

API
===

TECA provides an extensive suite of algorithms and software utilities
to build Climate Data Analysis/Transformation pipelines.

.. include:: generated_rtd_pages.rst

.. include:: ../_build/rst/generated_rtd_class_hierarchy.rst

.. include:: ../_build/rst/generated_rtd_file_hierarchy.rst
16 changes: 10 additions & 6 deletions doc/rtd/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
if not os.path.exists('_build/html'):
os.makedirs('_build/html')
subprocess.call('doxygen', shell=True)
subprocess.call('./parse_xml.py', shell=True)

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
Expand Down Expand Up @@ -63,13 +64,16 @@
# 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']
html_static_path = ['_static']

html_context = {
'css_files': [
'_static/theme_overrides.css', # overrides for wide tables in RTD theme
],
}
html_css_files = [
'theme_overrides.css', # overrides for wide tables in RTD theme
'collapsible-lists/css/tree_view.css'
]

html_js_files = [
'collapsible-lists/js/CollapsibleLists.compressed.js',
'collapsible-lists/js/apply-collapsible-lists.js'
]

numfig = True
1 change: 1 addition & 0 deletions doc/rtd/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ to develop new diagnostics.
applications
python
developer
api/api
bibliography
Loading

0 comments on commit b399af0

Please sign in to comment.