<commit_before>var Store = require('data-store');
var store = new Store('github-base-tests');
var auth = store.get('auth');

if (!auth) {
  var argv = require('yargs-parser')(process.argv.slice(2), {
    alias: {password: 'p', username: 'u'}
  });

  auth = {};
  auth.username = argv.username || argv._[0];
  auth.password = argv.password || argv._[1];
}

if (auth.username && auth.password) {
  store.set('auth', auth);
} else {
  console.error('please specific authentication details');
  console.error('--username, -u (or first arg)');
  console.error('--password, -p (or second arg)');
  process.exit(1);
}

module.exports = auth;<commit_msg>allows setting username/password on environment. closes #15<commit_after>var Store = require('data-store');
var store = new Store('github-base-tests');
var auth = store.get('auth');

if (!auth) {
  var argv = require('yargs-parser')(process.argv.slice(2), {
    alias: {password: 'p', username: 'u'}
  });

  auth = {};
  auth.username = argv.username || argv._[0] || process.env.GITHUB_USERNAME;
  auth.password = argv.password || argv._[1] || process.env.GITHUB_PASSWORD;
}

if (auth.username && auth.password) {
  store.set('auth', auth);
} else {
  console.error('please specific authentication details');
  console.error('--username, -u (or first arg)');
  console.error('--password, -p (or second arg)');
  process.exit(1);
}

module.exports = auth;
{'fraction_non_alphanumeric': 0.19614835948644793, 'fraction_numerical': 0.007132667617689016, 'mean_word_length': 4.29433962264151, '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': '2841715', 'n_tokens_mistral': 470, 'n_tokens_neox': 461, 'n_words': 107}