<commit_before>'use strict';

const _       = require('lodash');
const fs      = require('fs');
const path    = require('path');
const assert  = require('assert');
const async   = require('asyncawait/async');
const await   = require('asyncawait/await');
const ipfsd   = require('ipfsd-ctl');
const IPFS    = require('ipfs')
const OrbitDB = require('../src/OrbitDB');
const OrbitServer = require('orbit-server/src/server');

// Mute logging
require('logplease').setLogLevel('ERROR');

// Orbit
const network = 'Qmeh6ktQ1YFKksugJb59vBxG51xXoEvjBZXRK3DdrF3mNj';
const username = 'testrunner';
const password = '';

let ipfs, ipfsDaemon;
const IpfsApis = [
{
  // js-ipfs
  start: () => {
    return new Promise((resolve, reject) => {
      const IPFS = require('ipfs')
      const ipfs = new IPFS();
      // resolve(ipfs);
      ipfs.goOnline((err) => {
        if(err) reject(err)
        resolve(ipfs)
      });
    });
  },
  // stop: () => Promise.resolve()<commit_msg>Add repo path to the js-ipfs tesy<commit_after>'use strict';

const _       = require('lodash');
const fs      = require('fs');
const path    = require('path');
const assert  = require('assert');
const async   = require('asyncawait/async');
const await   = require('asyncawait/await');
const ipfsd   = require('ipfsd-ctl');
const IPFS    = require('ipfs')
const OrbitDB = require('../src/OrbitDB');
const OrbitServer = require('orbit-server/src/server');

// Mute logging
require('logplease').setLogLevel('ERROR');

// Orbit
const network = 'Qmeh6ktQ1YFKksugJb59vBxG51xXoEvjBZXRK3DdrF3mNj';
const username = 'testrunner';
const password = '';

let ipfs, ipfsDaemon;
const IpfsApis = [
{
  // js-ipfs
  start: () => {
    return new Promise((resolve, reject) => {
      const IPFS = require('ipfs')
      const ipfs = new IPFS('/tmp/orbitdbtest');
      // resolve(ipfs);
      ipfs.goOnline((err) => {
        if(err) reject(err)
        resolve(ipfs)
      });
    });
  },
  // stop: () => Promise.resolve()
{'fraction_non_alphanumeric': 0.1712121212121212, 'fraction_numerical': 0.00808080808080808, 'mean_word_length': 3.4417040358744395, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '767130', 'n_tokens_mistral': 701, 'n_tokens_neox': 690, 'n_words': 141}