<commit_before>const {spawn} = require('child_process')
const path = require('path')

const execa = require('execa')
const fs = require('fs-extra')
const {safeDump, safeLoad} = require('js-yaml')
const request = require('request')

const collectingCoverage = process.env.COLLECT_COVERAGE
const isCi = !!process.env.CI
const isUiRepo = process.env.GITHUB_REPOSITORY === 'ibi-group/datatools-ui'
const testFolderPath = 'e2e-test-results'

/**
 * Download a file using a stream
 */
function downloadFile (url, filename) {
  return new Promise((resolve, reject) => {
    console.log(`downloading file: ${url}`)
    const dlStream = request(url).pipe(fs.createWriteStream(filename))

    let callbackCalled = false
<commit_msg>test(e2e): Try to detect CI environment.<commit_after>const {spawn} = require('child_process')
const path = require('path')

const execa = require('execa')
const fs = require('fs-extra')
const {safeDump, safeLoad} = require('js-yaml')
const request = require('request')

const collectingCoverage = process.env.COLLECT_COVERAGE
console.log(`CI: ${process.env.CI}`)
const isCi = !!process.env.CI
const isUiRepo = process.env.GITHUB_REPOSITORY === 'ibi-group/datatools-ui'
const testFolderPath = 'e2e-test-results'

/**
 * Download a file using a stream
 */
function downloadFile (url, filename) {
  return new Promise((resolve, reject) => {
    console.log(`downloading file: ${url}`)
    const dlStream = request(url).pipe(fs.createWriteStream(filename))

    let callbackCalled = false

{'fraction_non_alphanumeric': 0.14257294429708223, 'fraction_numerical': 0.001989389920424403, 'mean_word_length': 5.3940677966101696, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7222024', 'n_tokens_mistral': 483, 'n_tokens_neox': 477, 'n_words': 117}