Skip to content

Commit 3e12a3e

Browse files
committed
Add plato reports
1 parent a33a891 commit 3e12a3e

File tree

129 files changed

+7623
-143
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

129 files changed

+7623
-143
lines changed

Gruntfile.js

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ module.exports = function(grunt) {
3232
// remove previous builds
3333
clean: {
3434
dist: ['dist'],
35-
docs: ['docs/.git']
35+
docs: ['docs/.git'],
36+
plato: ['docs/plato']
3637
},
3738

3839
// build all model files into a single js file
@@ -64,6 +65,7 @@ module.exports = function(grunt) {
6465
startPage: '/api',
6566
titleLink: '/api',
6667
bestMatch: true,
68+
navTemplate: 'docs/header.html',
6769
analytics: {
6870
account: 'UA-63397194-1',
6971
domainName: 'http://yllieth.github.io/predicsis_ml_sdk-javascript'
@@ -79,6 +81,20 @@ module.exports = function(grunt) {
7981
}
8082
},
8183

84+
// code maintainability reports
85+
plato: {
86+
lib: {
87+
options: {
88+
jshint: grunt.file.readJSON('.jshintrc'),
89+
title: "PredicSis ML SDK - angularJS",
90+
recurse: true
91+
},
92+
files: {
93+
'docs/plato': ['lib/']
94+
}
95+
}
96+
},
97+
8298
// remove comments
8399
uglify: {
84100
options: {
@@ -113,7 +129,7 @@ module.exports = function(grunt) {
113129
if (target === 'deploy') {
114130
grunt.task.run(['buildcontrol:github', 'clean:docs']);
115131
} else {
116-
grunt.task.run(['ngdocs']);
132+
grunt.task.run(['ngdocs', 'plato']);
117133
}
118134
});
119135

docs/header.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<header class="header">
2+
<div class="navbar navbar-fixed-top">
3+
<div class="navbar-inner">
4+
<div class="container">
5+
<a class="brand">PredicSis ML SDK</a>
6+
<ul class="nav">
7+
<li ng-repeat="(url, name) in sections" ng-class="{active: isActivePath(url)}">
8+
<a ng-href="{{url}}"><i class="icon-book icon-white"></i> {{name}}</a>
9+
</li>
10+
<li><a href="http://yllieth.github.io/predicsis_ml_sdk-javascript/plato/index.html"><i class="icon-bar-chart icon-white"></i> Plato reports</a></li>
11+
</ul>
12+
<%= navContent %>
13+
</div>
14+
</div>
15+
</div>
16+
</header>

docs/index.html

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@
1818
// before the base attribute is added, causing 404 and terribly slow loading of the docs app.
1919
(function() {
2020
var indexFile = (location.pathname.match(/\/(index[^\.]*\.html)/) || ['', ''])[1],
21-
origin, baseUrl, rUrl = /(#!\/|api|index[^\.]*\.html).*$/,
21+
origin, baseUrl, rUrl = /(\/?#!\/.*|\/(api)\/?(\?.*)*|\/index[^\.]*\.html.*)$/,
2222
headEl = document.getElementsByTagName('head')[0],
2323
sync = true;
2424

2525
if (location.href.slice(0, 7) == 'file://') {
26-
baseUrl = location.href.replace(rUrl, indexFile);
26+
baseUrl = location.href.replace(rUrl, '/' + indexFile);
2727
} else {
2828
origin = location.origin || (window.location.protocol + "//" + window.location.hostname +
2929
(window.location.port ? ':' + window.location.port: ''));
30-
baseUrl = origin + location.href.substr(origin.length).replace(rUrl, indexFile);
30+
baseUrl = origin + location.href.substr(origin.length).replace(rUrl, '/' + indexFile);
3131
}
3232

3333
addTag('base', {href: baseUrl});
@@ -103,7 +103,23 @@
103103
<a ng-href="{{url}}"><i class="icon-book icon-white"></i> {{name}}</a>
104104
</li>
105105
</ul>
106-
106+
<header class="header">
107+
<div class="navbar navbar-fixed-top">
108+
<div class="navbar-inner">
109+
<div class="container">
110+
<a class="brand">PredicSis ML SDK</a>
111+
<ul class="nav">
112+
<li ng-repeat="(url, name) in sections" ng-class="{active: isActivePath(url)}">
113+
<a ng-href="{{url}}"><i class="icon-book icon-white"></i> {{name}}</a>
114+
</li>
115+
<li><a href="http://yllieth.github.io/predicsis_ml_sdk-javascript/plato/index.html"><i class="icon-bar-chart icon-white"></i> Plato reports</a></li>
116+
</ul>
117+
118+
</div>
119+
</div>
120+
</div>
121+
</header>
122+
107123
</div>
108124
</div>
109125
</div>

docs/js/docs-setup.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,16 @@ NG_DOCS={
99
"shortName": "predicsis.jsSDK.helpers.uploadHelper",
1010
"type": "service",
1111
"moduleName": "predicsis.jsSDK.helpers",
12-
"keywords": "$injector $rootscope abort aborting accepts active api boolean cancel cancelled create credential currently datasets delay destination details emitted endpoint error event events file fileapi finished fired folder format function getcredentials handled helpers html5 identifier indicating initialized instance internally iso jssdk list method null number object objects parameter performed predicsis process progress properties raises request required resolved resource running s3 security sending service set single size source sources starting storage storageservice timestamp updated upload uploaded uploadhelper uploadid values xmlhttprequest"
12+
"keywords": "$injector $rootscope abort aborting accepts active api boolean cancel cancelled create credential currently datasets delay destination details emitted endpoint error event events file fileapi finished fired folder format function getcredentials handled helpers html5 identifier indicating initialized instance internally iso jssdk list method null number object objects parameter performed predicsis process progress properties raises request required resolved resource running s3 security sending service set single size source sources starting storage storageservice swift timestamp updated upload uploaded uploadhelper uploadid values xmlhttprequest"
13+
},
14+
{
15+
"section": "api",
16+
"id": "predicsis.jsSDK.models.Datafiles",
17+
"shortName": "predicsis.jsSDK.models.Datafiles",
18+
"type": "service",
19+
"moduleName": "predicsis.jsSDK.models",
20+
"shortDescription": "",
21+
"keywords": "$q amazonaws api assign badge changing class colspan concretely convenience csv data data_file data_files datafileid datafiles dataset datasetid documentation download example fetch file filename files function getsignedurl hello http https identifier ids jssdk kml-api links list location method methods_all methods_download methods_get methods_getsignedurl models output predicsis raw resolved restangular s3 s3-us-west-2 service signed signed_url single size type url"
1322
},
1423
{
1524
"section": "api",
@@ -18,7 +27,7 @@ NG_DOCS={
1827
"type": "service",
1928
"moduleName": "predicsis.jsSDK.models",
2029
"shortDescription": "",
21-
"keywords": "$classifier_id $dataset_id $header $injector $main_modality $modalities_set_id $name $q $separator api async awesome aws badge build changes child children children_dataset_ids class classifier classifier_id colspan considered create created created_at createfromupload creation csv data_file datafile dataset dataset_id dataset_name datasets defined delete description destfolder destroy dictionary dictionary_ids differents distinction documentation escape examples existing fetch file filename filenames finished function generated_dictionaries_ids generation getchildren going haschildren header https identified identifier instance ischild isformatted isparent isscore istestpart istrainpart job_ids jobs jssdk key learned learned_learning_dataset learning learning-dataset learning_dataset learning_dataset_with_model length list main_modality method methods_all methods_create methods_delete methods_get methods_getchildren methods_haschildren methods_ischild methods_isformatted methods_isparent methods_isscore methods_istestpart methods_istrainpart methods_split methods_update modalities_set_id model models named nb_of_lines negative newly note null original original_source_id orphan paradox parameters params parent parent_dataset_id parent_dictionary patch permanently positive post predicsis preview ratio remove removed removedependencies request requested required requires resources restangular result rules s3 s3_url sampling score scoreset scoring scoring_dataset separator service set single size source source_ids sources split string subset subsets tabulation tells test tested tested_learning_dataset testing train true type update updated updated_at upload uploaded url user_id view"
30+
"keywords": "$classifier_id $dataset_id $header $injector $main_modality $modalities_set_id $name $q $separator api array async automatically awesome aws badge based behaviour build changes checking child children children_dataset_ids children_ids class classifier classifier_id colspan compilation compute considered create created created_at createfromupload creation csv data_file datafile dataset dataset_id dataset_ids dataset_name datasetid datasets defined delete description destfolder destroy deterministic dictionaries dictionary dictionary_ids dictionaryid differents distinction documentation equal escape examples existing fetch fetched file filename filenames finished function functions generated_dictionaries_ids generation generator getchildren going good haschildren header https identified identifier insignificant instance ischild isformatted isparent isscore issue istestpart istrainpart job_ids jobs jssdk key learned learned_learning_dataset learning learning_dataset learning_dataset_with_model length linked list ll lot main_modality method methods_all methods_create methods_delete methods_get methods_getchildren methods_haschildren methods_ischild methods_isformatted methods_isparent methods_isscore methods_istestpart methods_istrainpart methods_split methods_update modalities_set_id model models multiple named nb_of_lines negative newly non-deterministic note null object original original_source_id orphan os paradox parameter parameters params parent parent_dataset_id parent_dictionary patch pathname permanently positive post predicsis preview provide random ratio remove removed removedependencies request requested required requires resources restangular result return risk rocks rules s3 sampling score scoreset scoring scoring_dataset selected separator service set single solve source source_ids sources split splits string subset subsets swift tabulation target tells test tested tested_learning_dataset testing time train trains true undefined update updated updated_at upload uploaded user_id view"
2231
},
2332
{
2433
"section": "api",

docs/partials/api/predicsis.jsSDK.helpers.uploadHelper.html

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<a href="https://github.com/yllieth/predicsis_ml_sdk-javascript/edit/master/lib/helper/uploadHelper.js" class="improve-docs"><i class="icon-edit"> </i>Improve this doc</a><a href="https://github.com/yllieth/predicsis_ml_sdk-javascript/blob/e41f592/lib/helper/uploadHelper.js#L8" class="view-source"><i class="icon-eye-open"> </i>View source</a><h1><code ng:non-bindable="">uploadHelper</code>
1+
<a href="https://github.com/yllieth/predicsis_ml_sdk-javascript/edit/master/lib/helper/uploadHelper.js" class="improve-docs"><i class="icon-edit"> </i>Improve this doc</a><a href="https://github.com/yllieth/predicsis_ml_sdk-javascript/blob/a33a891/lib/helper/uploadHelper.js#L8" class="view-source"><i class="icon-eye-open"> </i>View source</a><h1><code ng:non-bindable="">uploadHelper</code>
22
<div><span class="hint">service in module <code ng:non-bindable="">predicsis.jsSDK.helpers</code>
33
</span>
44
</div>
@@ -13,7 +13,7 @@
1313
</div></li>
1414
</ul>
1515
<div class="member method"><h2 id="methods">Methods</h2>
16-
<ul class="methods"><li><a href="https://github.com/yllieth/predicsis_ml_sdk-javascript/blob/e41f592/lib/helper/uploadHelper.js#L178" class="view-source icon-eye-open"> </a><h3 id="methods_all">all()</h3>
16+
<ul class="methods"><li><a href="https://github.com/yllieth/predicsis_ml_sdk-javascript/blob/a33a891/lib/helper/uploadHelper.js#L172" class="view-source icon-eye-open"> </a><h3 id="methods_all">all()</h3>
1717
<div class="all"><div class="all-page"><p>list all currently uploaded datasets</p>
1818
</div><h5 id="methods_all_returns">Returns</h5><table class="variables-matrix"><tr><td><a href="" class="label type-hint type-hint-array">Array</a></td><td><div class="all-page"><p>List of active upload objects. An active upload has the following properties:</p>
1919
<ul>
@@ -25,14 +25,15 @@
2525
<li>isUploading</li>
2626
<li>created_at</li>
2727
<li>cancelUpload</li>
28-
</ul></div></td></tr></table></div>
28+
</ul>
29+
</div></td></tr></table></div>
2930
</li>
30-
<li><a href="https://github.com/yllieth/predicsis_ml_sdk-javascript/blob/e41f592/lib/helper/uploadHelper.js#L213" class="view-source icon-eye-open"> </a><h3 id="methods_cancel">cancel(uploadId)</h3>
31+
<li><a href="https://github.com/yllieth/predicsis_ml_sdk-javascript/blob/a33a891/lib/helper/uploadHelper.js#L207" class="view-source icon-eye-open"> </a><h3 id="methods_cancel">cancel(uploadId)</h3>
3132
<div class="cancel"><div class="cancel-page"><p>Abort a single upload</p>
3233
</div><h5 id="methods_cancel_parameters">Parameters</h5><table class="variables-matrix table table-bordered table-striped"><thead><tr><th>Param</th><th>Type</th><th>Details</th></tr></thead><tbody><tr><td>uploadId</td><td><a href="" class="label type-hint type-hint-string">String</a></td><td><div class="cancel-page"><p>Id of the upload to stop</p>
3334
</div></td></tr></tbody></table></div>
3435
</li>
35-
<li><a href="https://github.com/yllieth/predicsis_ml_sdk-javascript/blob/e41f592/lib/helper/uploadHelper.js#L202" class="view-source icon-eye-open"> </a><h3 id="methods_get">get(uploadId)</h3>
36+
<li><a href="https://github.com/yllieth/predicsis_ml_sdk-javascript/blob/a33a891/lib/helper/uploadHelper.js#L196" class="view-source icon-eye-open"> </a><h3 id="methods_get">get(uploadId)</h3>
3637
<div class="get"><div class="get-page"><p>get an active upload</p>
3738
</div><h5 id="methods_get_parameters">Parameters</h5><table class="variables-matrix table table-bordered table-striped"><thead><tr><th>Param</th><th>Type</th><th>Details</th></tr></thead><tbody><tr><td>uploadId</td><td><a href="" class="label type-hint type-hint-string">String</a></td><td><div class="get-page"><p>An upload identifier looks like <timestamp>_<filename></p>
3839
</div></td></tr></tbody></table><h5 id="methods_get_returns">Returns</h5><table class="variables-matrix"><tr><td><a href="" class="label type-hint type-hint-object">Object</a></td><td><div class="get-page"><p>An upload object with the following properties:</p>
@@ -45,9 +46,10 @@
4546
<li>isUploading</li>
4647
<li>created_at</li>
4748
<li>cancelUpload</li>
48-
</ul></div></td></tr></table></div>
49+
</ul>
50+
</div></td></tr></table></div>
4951
</li>
50-
<li><a href="https://github.com/yllieth/predicsis_ml_sdk-javascript/blob/e41f592/lib/helper/uploadHelper.js#L131" class="view-source icon-eye-open"> </a><h3 id="methods_upload">upload(file, storageService)</h3>
52+
<li><a href="https://github.com/yllieth/predicsis_ml_sdk-javascript/blob/a33a891/lib/helper/uploadHelper.js#L118" class="view-source icon-eye-open"> </a><h3 id="methods_upload">upload(file, storageService)</h3>
5153
<div class="upload"><div class="upload-page"><p>upload a file
5254
The upload method raises the following events during the upload process:</p>
5355
<ul>
@@ -109,7 +111,7 @@
109111
destination folder is handled by the API and its <code>Sources.getCredentials</code> request.</p>
110112
</div><h5 id="methods_upload_parameters">Parameters</h5><table class="variables-matrix table table-bordered table-striped"><thead><tr><th>Param</th><th>Type</th><th>Details</th></tr></thead><tbody><tr><td>file</td><td><a href="" class="label type-hint type-hint-object">Object</a></td><td><div class="upload-page"><p>html5 File instance</p>
111113
</div></td></tr><tr><td>storageService</td><td><a href="" class="label type-hint type-hint-string">String=s3</a></td><td><div class="upload-page"><p>Name of PredicSis&#39; storage service.
112-
The API only accepts one of the following values: s3.</p>
114+
The API only accepts one of the following values: s3, swift.</p>
113115
</div></td></tr></tbody></table></div>
114116
</li>
115117
</ul>

0 commit comments

Comments
 (0)