<commit_before>/** @module Env Dev */
'use strict';

var logger = require(process.env.LOGGER)('Env Dev');


// EXPORTED OBJECT ============================================================

/**
 *  [exports description]
 *
 *  @type  {Object}
 */
module.exports = {

	app: {
		title: 'Accounting app - Development environment'
	},

	server: {
		port: process.env.PORT || 8081
	},

	db : {
		url: 'mongodb://localhost/accounting_app-dev' // TODO extract url to a private file
	}

};


// PRIVATE FUNCTIONS ==========================================================

/**
 * Setup the database for testing
 */
function setupDB() {

	logger.debug('Setting up the Dev DB');

	// General ledger ---------------------------------------------------------

	var  GeneralLedger = require('../../app/models/generalLedger.model');

	logger.debug('removing all existing general ledger');
	GeneralLedger.remove(null).exec();

	var testingGeneralLedger = require('./dev/testingGeneralLedgersList');

	GeneralLedger.create(testingGeneralLedger, function(err) {
		if (err){
			logger.error('Error while creating the testing general ledgers');
			logger.error(err);
		}else {
			logger.debug('All testing general ledgers have been created');


			// Accounts -------------------------------------------------------

			var Account = require('../../app/models/account.model');

			logger.debug('removing all existing accounts');
			Account.remove(null).exec();

			var testingAccounts = require('./dev/testingAccountsList');

			Account.create(testingAccounts, function(err) {
				if (err){
					logger.error('Error while creating the testing accounts');
					logger.error(err);
				}else {
					logger.debug('All testing accounts have been created');

					GeneralLedger.findOne(function(err, generalLedger) {

						if (!err && generalLedger){
							logger.debug('The net worth of the general ledger is ' + generalLedger.netWorth);
						} else {
							logger.error('There was an error while finding the general ledgers');
						}

					});

				}
			});



			
		}
	});


}


// EXPORTED FUNCTIONS =========================================================

/**
 * [initEnv description]
 */
module.exports.initEnv = function() {

	logger.debug('Configuration initialization of dev environment');

};

<commit_msg>Remove a startup test from dev env<commit_after>/** @module Env Dev */
'use strict';

var logger = require(process.env.LOGGER)('Env Dev');



// EXPORTED OBJECT ============================================================

/**
 *  [exports description]
 *
 *  @type  {Object}
 */
module.exports = {

	app: {
		title: 'Accounting app - Development environment'
	},

	server: {
		port: process.env.PORT || 8081
	},

	db : {
		url: 'mongodb://localhost/accounting_app-dev' // TODO extract url to a private file
	}

};


// PRIVATE FUNCTIONS ==========================================================

/**
 * Setup the database for testing
 */
function setupDB() {

	logger.debug('Setting up the Dev DB');

	// General ledger ---------------------------------------------------------

	var  GeneralLedger = require('../../app/models/generalLedger.model');

	logger.debug('removing all existing general ledger');
	GeneralLedger.remove(null).exec();

	var testingGeneralLedger = require('./dev/testingGeneralLedgersList');

	GeneralLedger.create(testingGeneralLedger, function(err) {

		if (err){

			logger.error('Error while creating the testing general ledgers');
			logger.error(err);

		}else {

			logger.debug('All testing general ledgers have been created');

			// Accounts -------------------------------------------------------

			var Account = require('../../app/models/account.model');

			logger.debug('removing all existing accounts');
			Account.remove(null).exec();

			var testingAccounts = require('./dev/testingAccountsList');

			Account.create(testingAccounts, function(err) {

				if (err){

					logger.error('Error while creating the testing accounts');
					logger.error(err);

				}else {

					logger.debug('All testing accounts have been created');

				}

			});

		}

	});

}


// EXPORTED FUNCTIONS =========================================================

/**
 * [initEnv description]
 */
module.exports.initEnv = function() {

	logger.debug('Configuration initialization of dev environment');

};


{'fraction_non_alphanumeric': 0.2575722543352601, 'fraction_numerical': 0.0018497109826589595, 'mean_word_length': 2.979760809567617, '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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6934062', 'n_tokens_mistral': 1359, 'n_tokens_neox': 1146, 'n_words': 282}