<commit_before>/*global
 define, console
 */
/*jslint
 browser: true,
 white: true
 */
define([
    'bluebird',
    'kb_common_html',
    'kb_common_widgetSet'
],
    function (Promise, html, widgetSetFactory) {
        'use strict';

//        function renderTypePanel(params) {
//            return new Promise(function (resolve) {
//
//                // Widgets
//                // Widgets are an array of functions or promises which are 
//                // invoked later...
//                var widgetSet = wigetSet.make({
//                    runtime: runtime
//                })
//
//                // Render panel
//                var div = html.tag('div');
//                var panel = div({class: 'kbase-view kbase-spec-view container-fluid', 'data-kbase-view': 'spec'}, [
//                    div({class: 'row'}, [
//                        div({class: 'col-sm-12'}, [
//                            //div({id: addJQWidget('cardlayoutmanager', 'KBaseCardLayoutManager')}),
//                            div({id: widgets.addFactoryWidget('datatypespec', DataTypeSpecWidget)})
//                        ])
//                    ])
//                ]);
//                resolve({
//                    title: 'Data Type Specification',
//                    content: panel,
//                    widgets: widgets.getWidgets()
//                });
//            });
//        }

        function widget(config) {
            var mount, container, 
                runtime = config.runtime,  
                widgetSet = widgetSetFactory.make({
                    runtime: runtime
                });
            
             function renderTypePanel() {
                var div = html.tag('div');
                return div({class: 'kbase-view kbase-spec-view container-fluid', dataKbaseView: 'spec'}, [
                    div({class: 'row'}, [
                        div({class: 'col-sm-12'}, [
                            //div({id: addJQWidget('cardlayoutmanager', 'KBaseCardLayoutManager')}),
                            div({id: widgetSet.addWidget('kb_typeview_dataTypeSpec')})
                        ])
                    ])
                ]);
            }
            
            
            // API
            function init(config) {
                return Promise.try(function () {
                    return widgetSet.init(config);
                });
            }
            function attach(node) {
                return Promise.try(function () {
                    mount = node;
                    container = document.createElement('div');
                    mount.appendChild(container);
                    container.innerHTML = renderTypePanel();
                    return widgetSet.attach(container);
                });
            }
            function start(params) {
                return Promise.try(function () {
                    runtime.send('ui', 'setTitle', rendered.title);
                    return widgetSet.start(params);
                });<commit_msg>more fixes<commit_after>/*global
 define, console
 */
/*jslint
 browser: true,
 white: true
 */
define([
    'bluebird',
    'kb_common_html',
    'kb_common_widgetSet'
],
    function (Promise, html, widgetSetFactory) {
        'use strict';

//        function renderTypePanel(params) {
//            return new Promise(function (resolve) {
//
//                // Widgets
//                // Widgets are an array of functions or promises which are 
//                // invoked later...
//                var widgetSet = wigetSet.make({
//                    runtime: runtime
//                })
//
//                // Render panel
//                var div = html.tag('div');
//                var panel = div({class: 'kbase-view kbase-spec-view container-fluid', 'data-kbase-view': 'spec'}, [
//                    div({class: 'row'}, [
//                        div({class: 'col-sm-12'}, [
//                            //div({id: addJQWidget('cardlayoutmanager', 'KBaseCardLayoutManager')}),
//                            div({id: widgets.addFactoryWidget('datatypespec', DataTypeSpecWidget)})
//                        ])
//                    ])
//                ]);
//                resolve({
//                    title: 'Data Type Specification',
//                    content: panel,
//                    widgets: widgets.getWidgets()
//                });
//            });
//        }

        function widget(config) {
            var mount, container, 
                runtime = config.runtime,  
                widgetSet = widgetSetFactory.make({
                    runtime: runtime
                }),
                content;
            
             function renderTypePanel() {
                var div = html.tag('div');
                return div({class: 'kbase-view kbase-spec-view container-fluid', dataKbaseView: 'spec'}, [
                    div({class: 'row'}, [
                        div({class: 'col-sm-12'}, [
                            //div({id: addJQWidget('cardlayoutmanager', 'KBaseCardLayoutManager')}),
                            div({id: widgetSet.addWidget('kb_typeview_dataTypeSpec')})
                        ])
                    ])
                ]);
            }
            
            
            // API
            function init(config) {
                return Promise.try(function () {
                    content = renderTypePanel();
                    return widgetSet.init(config);
                });
            }
            function attach(node) {
                return Promise.try(function () {
                    mount = node;
                    container = document.createElement('div');
                    mount.appendChild(container);
                    container.innerHTML = content;
                    return widgetSet.attach(container);
                });
            }
            function start(params) {
                return Promise.try(function () {
                    runtime.send('ui', 'setTitle', rendered.title);
                    return widgetSet.start(params);
                });
{'fraction_non_alphanumeric': 0.12579748077866842, 'fraction_numerical': 0.0013086864060199575, 'mean_word_length': 1.0852660300136425, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5882397', 'n_tokens_mistral': 1493, 'n_tokens_neox': 1399, 'n_words': 274}