<commit_before>(ns user
  (:require [clojars
             [config :as config]
             [errors :as errors]
             [system :as system]]
            [clojars.db.migrate :as migrate]
            [clojure.java.io :as io]
            [clojure.tools.namespace.repl :refer [refresh]]
            [eftest.runner :as eftest]
            [meta-merge.core :refer [meta-merge]]
            [reloaded.repl :refer [system init stop go clear]]))

(def dev-env
  {:app {:middleware []}})


(defn new-system []
  (refresh)
  (config/configure [])
  (assoc (system/new-system (meta-merge config/config dev-env))
         :error-reporter (errors/->StdOutReporter)))

(ns-unmap *ns* 'test)

(defn reset []
  (if system
    (do (clear)
        (go))
    (refresh)))

(defn test [& tests]
  (let [tests (if (empty? tests)
                  (eftest/find-tests "test")
                  tests)]
        (eftest/run-tests tests {:report eftest.report.pretty/report
                                 :multithread? false})))

(when (io/resource "local.clj")<commit_msg>Add in-memory cloudfiles connection to the dev system<commit_after>(ns user
  (:require [clojars
             [cloudfiles :as cf]
             [config :as config]
             [errors :as errors]
             [system :as system]]
            [clojars.db.migrate :as migrate]
            [clojure.java.io :as io]
            [clojure.tools.namespace.repl :refer [refresh]]
            [eftest.runner :as eftest]
            [meta-merge.core :refer [meta-merge]]
            [reloaded.repl :refer [system init stop go clear]]))

(def dev-env
  {:app {:middleware []}})


(defn new-system []
  (refresh)
  (config/configure [])
  (assoc (system/new-system (meta-merge config/config dev-env))
    :error-reporter (errors/->StdOutReporter)
    :cloudfiles (cf/connect "" "" "dev" "transient")))

(ns-unmap *ns* 'test)

(defn reset []
  (if system
    (do (clear)
        (go))
    (refresh)))

(defn test [& tests]
  (let [tests (if (empty? tests)
                  (eftest/find-tests "test")
                  tests)]
        (eftest/run-tests tests {:report eftest.report.pretty/report
                                 :multithread? false})))

(when (io/resource "local.clj")
{'fraction_non_alphanumeric': 0.14664867296446243, 'fraction_numerical': 0.0, 'mean_word_length': 2.0258503401360546, '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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4063254', 'n_tokens_mistral': 733, 'n_tokens_neox': 724, 'n_words': 175}