<commit_before>require.config({

    paths: {
        'jquery'                : 'lib/jquery/jquery-min',
        'underscore'            : 'lib/underscore/underscore-min',
        'backbone'              : 'lib/backbone/backbone-min',
        'paper'                 : 'lib/paper/paper-core',
        'text'                  : 'lib/requirejs-text/text',
        'd3'                    : 'http://d3js.org/d3.v3.min'
    },

    // non-AMD lib
    shim: {
        'underscore'            : { exports  : '_' },
        'backbone'              : { deps : ['underscore', 'jquery'], exports : 'Backbone' },
        'paper'                 : { exports: 'paper' }
    }

});

require([
    'app',
    'router',
    'models/session',
    'ffdq',
    'text!templates/workflow.html',
    'text!templates/run.html',
    'text!templates/login.html',
    'text!templates/status.html',
    'text!templates/users.html',
    'text!templates/register.html',
    'text!templates/deploy.html',
    'text!templates/report.html',
    'text!templates/dataset.html'
], function (app, WebRouter, SessionModel, FFDQPostProcessor, workflowTpl, runWorkflowTpl, loginTpl, statusTpl, usersTpl, registerTpl,
             deployTpl, reportTpl, datasetTpl) {

    app.router = new WebRouter();
    app.session = new SessionModel({});

    app.session.checkAuth({

        // Start the backbone routing once we have captured a user's auth status
        complete: function() {
            Backbone.history.start();
        }
    });

    app.assetsUrl = jsRoutes.controllers.Assets.at('').url;

    var Workflows = Backbone.Collection.extend({
        url : jsRoutes.controllers.Workflows.list().url,

        modelId: function(attrs) {
            return attrs.name;
        }
    });

    var WorkflowsView = Backbone.View.extend({
        template: _.template(workflowTpl),

        initialize: function () {
            this.listenTo(this.collection, 'update', this.render);
            this.collection.fetch();
        },

        render: function () {
            this.$el.html(this.template({definitions : this.collection.toJSON(), infoImg : app.assetsUrl + "images/info.png"}));

            return this;
        }
    });

    var RunWorkflowView = Backbone.View.extend({
        el: '#run-modal',
        template: _.template(runWorkflowTpl),

        render: function () {
            //console.log(this.model.toJSON());
            $('#run-modal-title').html(this.model.get('title'));
           $('#run-modal-body').html(this.template(this.model.toJSON()));

            $('#run-workflow').submit(function (event) {
                event.preventDefault();

                //grab all form data
                var formData = new FormData($(this)[0]);

                $.ajax({
                    url: $(this).attr('action'),
                    type: 'POST',
                    data: formData,
                    async: false,
                    cache: false,
                    contentType: false,
                    processData: false,
                    success: function (data) {
                        $('.progress').hide();
                    }
                });

                return this;
            });

            $('#run-modal').on('hidden.bs.modal', function (e) {
                app.router.navigate("#", {trigger: true});
            });

            $('#run-btn').on('click', function (e) {

                $('#run-modal').on('hidden.bs.modal', function (e) {
                    app.router.navigate("status", {trigger: true});
                });

                $('.progress').show();
                $('#run-workflow').submit();
                $('#run-modal').modal('toggle');

            });

            $('#run-modal').modal({show: true});

            //this.$el.html(this.template(this.model.toJSON()));
        }
    });

    var WorkflowRuns = Backbone.Collection.extend({
        url : function() {
            return jsRoutes.controllers.Workflows.status(app.session.get('uid')).url
        },
        comparator: function(a, b) {
            a = new Date(a.attributes.startDate);
            b = new Date(b.attributes.startDate);
            return a > b ? -1 : a < b ? 1 : 0;
        }
    });

    var WorkflowRunsView = Backbone.View.extend({
        template: _.template(statusTpl),

        initialize: function () {
            this.listenTo(this.collection, 'update', this.render);
            //this.listenTo(app.router, 'route', this.beforeClose);
            this.collection.fetch();

            var that = this;
            this.timer = setInterval(function() {
                    that.collection.fetch();
                }, 5000);
        },

        render: function () {
            var runs = this.collection.toJSON();
            this.$el.html(this.template({runs : runs }));

            var that = this;
            runs.forEach(function(run) {

                switch (run.status) {
                    case "RUNNING":
                        that.$('#status'+run.id).html($('<span class="label label-default" style="font-size: .9em">Running</span>'));
                        break;
                    case "SUCCESS":
                        that.$('#status'+run.id).html($('<span class="label label-success" style="font-size: .9em">Complete</span>'));
                        break;
                    case "ERRORS":
                        that.$('#status'+run.id).html($('<span class="label label-danger" style="font-size: .9em">Errors</span>'));
                        break;
                    default:
                        console.log('status');
                }
            });

            $('[data-toggle="tooltip"]').tooltip();

            return this;
        },

        onBeforeClose: function () {
            if (this.timer) {
                clearInterval(this.timer);
            }
        }
    });

    var ReportSummary = Backbone.Collection.extend({
        url : function() {
            return jsRoutes.controllers.Workflows.report(this.runId).url;
        }
    });

    var DatasetSummary = Backbone.Model.extend({
        url : function() {
            return jsRoutes.controllers.Workflows.dataset(this.id).url;
        }
    });


    var Users = Backbone.Collection.extend({
        url : jsRoutes.controllers.Users.manage().url,

        modelId: function(attrs) {
            return attrs.username;
        }
    });

    var UserManagementView = Backbone.View.extend({
        template: _.template(usersTpl),

        initialize: function () {
            this.listenTo(this.collection, 'update', this.render);
            this.collection.fetch();
        },

        render: function () {
            this.$el.html(this.template({users : this.collection.toJSON(), uid : app.session.get('uid')}));

            var postManageUsers = function(user, active, role, callback) {
                $.ajax({
                    type: "POST",
                    //the url where you want to sent the userName and password to
                    url: jsRoutes.controllers.Users.manageUsers().url,
                    dataType: 'json',
                    async: false,
                    contentType: 'application/json',
                    //json object to sent to the authentication url
                    data: JSON.stringify({username: user.get('username'), active: active, role: role}),
                    success: callback
                });
            }

                var that = this;

            $('.dropdown-menu li').on('click', function (event) {
                var username = $(this).parent().attr('id').substr(5);
                var user = that.collection.get(username);

                var role = $(this).text();

                postManageUsers(user, user.get('active'), role, function (data) {
                    user.set('role', data.role);

                    $('#role_value_' + data.username).html('<b>' + data.role + '</b>');
                });
            });

            $('.status-btn').on('click', function (event) {
                var username = $(this).attr('id').substr(7);
                var user = that.collection.get(username);

                var active = user.get('active') ? false : true;

                postManageUsers(user, active, user.get('role'), function (data) {
                    user.set('active', data.active);

                    if (data.active) {
                        $('#status_' + data.username)
                            .removeClass('btn-warning')
                            .addClass('btn-success')
                            .html('<b>Active</b>');
                    } else {
                        $('#status_' + data.username)
                            .removeClass('btn-success')
                            .addClass('btn-warning')
                            .html('<b>Inactive</b>');
                    }
                });
            });

            // $('#create-workshop-form').submit(function (event) {
            //     event.preventDefault();
            //     console.log("submitting form...");
            //
            //     //grab all form data
            //     var formData = new FormData($(this)[0]);
            //
            //     $.ajax({
            //         url: $(this).attr('action'),
            //         type: 'POST',
            //         data: formData,
            //         async: false,
            //         cache: false,
            //         contentType: false,
            //         processData: false,
            //         success: function (data) {
            //             console.log(data);
            //         }
            //     });
            //
            //     return false;
            // });
            //
            $('#create-btn').click(function (event) {
                $('#create-workshop-form').submit();
             });

            return this;
        }
    });

    var Packages = Backbone.Collection.extend({
        url : jsRoutes.controllers.Workflows.deploy().url
    });

    var DeployPackagesView = Backbone.View.extend({
        template: _.template(deployTpl),

        initialize: function () {
            this.listenTo(this.collection, 'update', this.render);
            this.collection.fetch();
        },

        render: function () {
            this.$el.html(this.template({packages : this.collection.toJSON()}));

            var that = this;
            $('.delete-btn').click(function (event) {
                var package = $(this).attr('id').substr(7);

                $.ajax({
                    type: "POST",
                    //the url where you want to sent the userName and password to
                    url: jsRoutes.controllers.Workflows.deletePackage(package).url,
                    dataType: 'json',
                    async: false,
                    contentType: 'application/json',
                    //json object to sent to the authentication url
                    data: JSON.stringify({package: package}),
                    success: function(data) {
                        that.collection.fetch();
                    }
                });
            });

            return this;
        }
    });

    var DatasetView = Backbone.View.extend({
        template: _.template(datasetTpl),

        initialize: function () {
            this.listenTo(this.model, 'change', this.render);
            this.model.fetch();
        },

        render: function () {
            this.$el.html(this.template({ runId: this.model.id }));

            if (this.model.toJSON().dataset) {
                var postprocessor = new FFDQPostProcessor();
                postprocessor.renderDatasetSpreadsheet(this.$el, this.model.toJSON());
            }

            $('#dataset-tabs a').click(function (e) {
                e.preventDefault()
                $(this).tab('show')
            })

            return this;
        }
    });

    var ReportView = Backbone.View.extend({
        template: _.template(reportTpl),

        initialize: function () {
            this.listenTo(this.model, 'change', this.render);
            this.model.fetch();
        },

        render: function () {
            this.$el.html('');

            // Tooltip div
            this.$el.append('<div id="tooltip" class="hidden"><p><span id="value">100</span></p></div>');

            var dqReport = this.model.toJSON();

            // Create map of test name to assertion metadata in profile
            var dqProfile = { };
            dqReport[0].profile.forEach(function (item) {
                dqProfile[item.name] = item;
            });

            var total = dqReport[0].report.length;
            var summary = { };

            dqReport[0].report.forEach(function (item) {
                item.assertions.forEach(function (assertion, i) {

                    if (assertion.type == "MEASURE") {
                        var measure;

                        // create entry for measure if it doesn't exist
                        if (!summary[assertion.name]) {
                            var profile = dqProfile[assertion.name];

                            measure = {
                                  "id": i,
                                  "title": profile.label,
                                  "specification": profile.specification,
                                  "mechanism": profile.mechanism,

                                  "before": {
                                  //    "assurance": 1,
                                      "complete": 0,
                                      "incomplete": 0
                                  },
                                  "after": {
                                  //    "assurance": 1,
                                      "complete": 0,
                                      "incomplete": 0
                                  },
                                  "total": total
                             };

                            summary[assertion.name] = measure;
                        } else {
                            measure = summary[assertion.name];
                        }

                        // update assertion counts
                        if (assertion.stage == "PRE_ENHANCEMENT") {
                            if (assertion.status == "COMPLETE") {
                                measure.before.complete++;
                            } else if (assertion.status == "NOT_COMPLETE") {
                                measure.before.incomplete++;
                            }
                        } else if (assertion.stage == "POST_ENHANCEMENT") {
                            if (assertion.status == "COMPLETE") {
                                measure.after.complete++;
                            } else if (assertion.status == "NOT_COMPLETE") {
                                measure.after.incomplete++;
                            }
                        }
                    }

                });
            });

            var measures = [];
            for (test in summary) {
                measures.push(summary[test]);
            }

            console.log(measures);

            var panel = this.template({ measures: measures, runId: this.model.runId });
            //this.$el.append(panel);

            var that = this;
            measures.forEach(function(measure, index) {
                var chart = $('<div></div>');
                var postprocessor = new FFDQPostProcessor(chart, measure);
                //console.log($(chart));
                postprocessor.renderBinarySummary();
                that.$el.append(chart); // TODO: panel templates should be constructed here instead
            });

            $('[data-toggle="popover"]').popover();

            return this;
        }
    });

    app.router.on("route:status", function () {
        $(".nav-pills li").removeClass("active");
        $('.status-pill').addClass('active');

        $('.breadcrumb .active').remove();
        $('.breadcrumb').append('<li class="active"><a href="#status">Status</a></li>');

        var runs =  new WorkflowRuns();
<commit_msg>Adding check for empty report or summary to display error/warning<commit_after>require.config({

    paths: {
        'jquery'                : 'lib/jquery/jquery-min',
        'underscore'            : 'lib/underscore/underscore-min',
        'backbone'              : 'lib/backbone/backbone-min',
        'paper'                 : 'lib/paper/paper-core',
        'text'                  : 'lib/requirejs-text/text',
        'd3'                    : 'http://d3js.org/d3.v3.min'
    },

    // non-AMD lib
    shim: {
        'underscore'            : { exports  : '_' },
        'backbone'              : { deps : ['underscore', 'jquery'], exports : 'Backbone' },
        'paper'                 : { exports: 'paper' }
    }

});

require([
    'app',
    'router',
    'models/session',
    'ffdq',
    'text!templates/workflow.html',
    'text!templates/run.html',
    'text!templates/login.html',
    'text!templates/status.html',
    'text!templates/users.html',
    'text!templates/register.html',
    'text!templates/deploy.html',
    'text!templates/report.html',
    'text!templates/dataset.html'
], function (app, WebRouter, SessionModel, FFDQPostProcessor, workflowTpl, runWorkflowTpl, loginTpl, statusTpl, usersTpl, registerTpl,
             deployTpl, reportTpl, datasetTpl) {

    app.router = new WebRouter();
    app.session = new SessionModel({});

    app.session.checkAuth({

        // Start the backbone routing once we have captured a user's auth status
        complete: function() {
            Backbone.history.start();
        }
    });

    app.assetsUrl = jsRoutes.controllers.Assets.at('').url;

    var Workflows = Backbone.Collection.extend({
        url : jsRoutes.controllers.Workflows.list().url,

        modelId: function(attrs) {
            return attrs.name;
        }
    });

    var WorkflowsView = Backbone.View.extend({
        template: _.template(workflowTpl),

        initialize: function () {
            this.listenTo(this.collection, 'update', this.render);
            this.collection.fetch();
        },

        render: function () {
            this.$el.html(this.template({definitions : this.collection.toJSON(), infoImg : app.assetsUrl + "images/info.png"}));

            return this;
        }
    });

    var RunWorkflowView = Backbone.View.extend({
        el: '#run-modal',
        template: _.template(runWorkflowTpl),

        render: function () {
            //console.log(this.model.toJSON());
            $('#run-modal-title').html(this.model.get('title'));
           $('#run-modal-body').html(this.template(this.model.toJSON()));

            $('#run-workflow').submit(function (event) {
                event.preventDefault();

                //grab all form data
                var formData = new FormData($(this)[0]);

                $.ajax({
                    url: $(this).attr('action'),
                    type: 'POST',
                    data: formData,
                    async: false,
                    cache: false,
                    contentType: false,
                    processData: false,
                    success: function (data) {
                        $('.progress').hide();
                    }
                });

                return this;
            });

            $('#run-modal').on('hidden.bs.modal', function (e) {
                app.router.navigate("#", {trigger: true});
            });

            $('#run-btn').on('click', function (e) {

                $('#run-modal').on('hidden.bs.modal', function (e) {
                    app.router.navigate("status", {trigger: true});
                });

                $('.progress').show();
                $('#run-workflow').submit();
                $('#run-modal').modal('toggle');

            });

            $('#run-modal').modal({show: true});

            //this.$el.html(this.template(this.model.toJSON()));
        }
    });

    var WorkflowRuns = Backbone.Collection.extend({
        url : function() {
            return jsRoutes.controllers.Workflows.status(app.session.get('uid')).url
        },
        comparator: function(a, b) {
            a = new Date(a.attributes.startDate);
            b = new Date(b.attributes.startDate);
            return a > b ? -1 : a < b ? 1 : 0;
        }
    });

    var WorkflowRunsView = Backbone.View.extend({
        template: _.template(statusTpl),

        initialize: function () {
            this.listenTo(this.collection, 'update', this.render);
            //this.listenTo(app.router, 'route', this.beforeClose);
            this.collection.fetch();

            var that = this;
            this.timer = setInterval(function() {
                    that.collection.fetch();
                }, 5000);
        },

        render: function () {
            var runs = this.collection.toJSON();
            this.$el.html(this.template({runs : runs }));

            var that = this;
            runs.forEach(function(run) {

                switch (run.status) {
                    case "RUNNING":
                        that.$('#status'+run.id).html($('<span class="label label-default" style="font-size: .9em">Running</span>'));
                        break;
                    case "SUCCESS":
                        that.$('#status'+run.id).html($('<span class="label label-success" style="font-size: .9em">Complete</span>'));
                        break;
                    case "ERRORS":
                        that.$('#status'+run.id).html($('<span class="label label-danger" style="font-size: .9em">Errors</span>'));
                        break;
                    default:
                        console.log('status');
                }
            });

            $('[data-toggle="tooltip"]').tooltip();

            return this;
        },

        onBeforeClose: function () {
            if (this.timer) {
                clearInterval(this.timer);
            }
        }
    });

    var ReportSummary = Backbone.Collection.extend({
        url : function() {
            return jsRoutes.controllers.Workflows.report(this.runId).url;
        }
    });

    var DatasetSummary = Backbone.Model.extend({
        url : function() {
            return jsRoutes.controllers.Workflows.dataset(this.id).url;
        }
    });


    var Users = Backbone.Collection.extend({
        url : jsRoutes.controllers.Users.manage().url,

        modelId: function(attrs) {
            return attrs.username;
        }
    });

    var UserManagementView = Backbone.View.extend({
        template: _.template(usersTpl),

        initialize: function () {
            this.listenTo(this.collection, 'update', this.render);
            this.collection.fetch();
        },

        render: function () {
            this.$el.html(this.template({users : this.collection.toJSON(), uid : app.session.get('uid')}));

            var postManageUsers = function(user, active, role, callback) {
                $.ajax({
                    type: "POST",
                    //the url where you want to sent the userName and password to
                    url: jsRoutes.controllers.Users.manageUsers().url,
                    dataType: 'json',
                    async: false,
                    contentType: 'application/json',
                    //json object to sent to the authentication url
                    data: JSON.stringify({username: user.get('username'), active: active, role: role}),
                    success: callback
                });
            }

                var that = this;

            $('.dropdown-menu li').on('click', function (event) {
                var username = $(this).parent().attr('id').substr(5);
                var user = that.collection.get(username);

                var role = $(this).text();

                postManageUsers(user, user.get('active'), role, function (data) {
                    user.set('role', data.role);

                    $('#role_value_' + data.username).html('<b>' + data.role + '</b>');
                });
            });

            $('.status-btn').on('click', function (event) {
                var username = $(this).attr('id').substr(7);
                var user = that.collection.get(username);

                var active = user.get('active') ? false : true;

                postManageUsers(user, active, user.get('role'), function (data) {
                    user.set('active', data.active);

                    if (data.active) {
                        $('#status_' + data.username)
                            .removeClass('btn-warning')
                            .addClass('btn-success')
                            .html('<b>Active</b>');
                    } else {
                        $('#status_' + data.username)
                            .removeClass('btn-success')
                            .addClass('btn-warning')
                            .html('<b>Inactive</b>');
                    }
                });
            });

            // $('#create-workshop-form').submit(function (event) {
            //     event.preventDefault();
            //     console.log("submitting form...");
            //
            //     //grab all form data
            //     var formData = new FormData($(this)[0]);
            //
            //     $.ajax({
            //         url: $(this).attr('action'),
            //         type: 'POST',
            //         data: formData,
            //         async: false,
            //         cache: false,
            //         contentType: false,
            //         processData: false,
            //         success: function (data) {
            //             console.log(data);
            //         }
            //     });
            //
            //     return false;
            // });
            //
            $('#create-btn').click(function (event) {
                $('#create-workshop-form').submit();
             });

            return this;
        }
    });

    var Packages = Backbone.Collection.extend({
        url : jsRoutes.controllers.Workflows.deploy().url
    });

    var DeployPackagesView = Backbone.View.extend({
        template: _.template(deployTpl),

        initialize: function () {
            this.listenTo(this.collection, 'update', this.render);
            this.collection.fetch();
        },

        render: function () {
            this.$el.html(this.template({packages : this.collection.toJSON()}));

            var that = this;
            $('.delete-btn').click(function (event) {
                var package = $(this).attr('id').substr(7);

                $.ajax({
                    type: "POST",
                    //the url where you want to sent the userName and password to
                    url: jsRoutes.controllers.Workflows.deletePackage(package).url,
                    dataType: 'json',
                    async: false,
                    contentType: 'application/json',
                    //json object to sent to the authentication url
                    data: JSON.stringify({package: package}),
                    success: function(data) {
                        that.collection.fetch();
                    }
                });
            });

            return this;
        }
    });

    var DatasetView = Backbone.View.extend({
        template: _.template(datasetTpl),

        initialize: function () {
            this.listenTo(this.model, 'change', this.render);
            this.model.fetch();
        },

        render: function () {
            this.$el.html(this.template({ runId: this.model.id }));

            if (this.model.toJSON().dataset) {
                var postprocessor = new FFDQPostProcessor();
                postprocessor.renderDatasetSpreadsheet(this.$el, this.model.toJSON());
            }

            $('#dataset-tabs a').click(function (e) {
                e.preventDefault()
                $(this).tab('show')
            })

            return this;
        }
    });

    var ReportView = Backbone.View.extend({
        template: _.template(reportTpl),

        initialize: function () {
            this.listenTo(this.model, 'change', this.render);
            this.model.fetch();
        },

        render: function () {
            this.$el.html('');

            // Tooltip div
            this.$el.append('<div id="tooltip" class="hidden"><p><span id="value">100</span></p></div>');

            var dqReport = this.model.toJSON();

            if (!dqReport[0]) {
                this.$el.append('<p><i>Report unavailable.</i></p>');
            } else {
                // Create map of test name to assertion metadata in profile
                var dqProfile = {};
                dqReport[0].profile.forEach(function (item) {
                    dqProfile[item.name] = item;
                });

                var total = dqReport[0].report.length;
                var summary = {};

                dqReport[0].report.forEach(function (item) {
                    item.assertions.forEach(function (assertion, i) {

                        if (assertion.type == "MEASURE") {
                            var measure;

                            // create entry for measure if it doesn't exist
                            if (!summary[assertion.name]) {
                                var profile = dqProfile[assertion.name];

                                measure = {
                                    "id": i,
                                    "title": profile.label,
                                    "specification": profile.specification,
                                    "mechanism": profile.mechanism,

                                    "before": {
                                        //    "assurance": 1,
                                        "complete": 0,
                                        "incomplete": 0
                                    },
                                    "after": {
                                        //    "assurance": 1,
                                        "complete": 0,
                                        "incomplete": 0
                                    },
                                    "total": total
                                };

                                summary[assertion.name] = measure;
                            } else {
                                measure = summary[assertion.name];
                            }

                            // update assertion counts
                            if (assertion.stage == "PRE_ENHANCEMENT") {
                                if (assertion.status == "COMPLETE") {
                                    measure.before.complete++;
                                } else if (assertion.status == "NOT_COMPLETE") {
                                    measure.before.incomplete++;
                                }
                            } else if (assertion.stage == "POST_ENHANCEMENT") {
                                if (assertion.status == "COMPLETE") {
                                    measure.after.complete++;
                                } else if (assertion.status == "NOT_COMPLETE") {
                                    measure.after.incomplete++;
                                }
                            }
                        }

                    });
                });

                var measures = [];
                for (test in summary) {
                    measures.push(summary[test]);
                }

                if (measures.length > 0) {

                    var panel = this.template({measures: measures, runId: this.model.runId});
                    //this.$el.append(panel);

                    var that = this;
                    measures.forEach(function (measure, index) {
                        var chart = $('<div></div>');
                        var postprocessor = new FFDQPostProcessor(chart, measure);
                        //console.log($(chart));
                        postprocessor.renderBinarySummary();
                        that.$el.append(chart); // TODO: panel templates should be constructed here instead
                    });
                } else {
                    this.$el.append('<p><i>No measure summary available for data quality report.</i></p>');
                }
            }

            $('[data-toggle="popover"]').popover();

            return this;
        }
    });

    app.router.on("route:status", function () {
        $(".nav-pills li").removeClass("active");
        $('.status-pill').addClass('active');

        $('.breadcrumb .active').remove();
        $('.breadcrumb').append('<li class="active"><a href="#status">Status</a></li>');

        var runs =  new WorkflowRuns();

{'fraction_non_alphanumeric': 0.13842887473460722, 'fraction_numerical': 0.0019411586290567183, 'mean_word_length': 1.2250641112160885, 'pattern_counts': {'":': 32, '<': 61, '<?xml version=': 0, '>': 62, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 41, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4114413', 'n_tokens_mistral': 8468, 'n_tokens_neox': 7993, 'n_words': 1489}