<commit_before>(ns dev
  {:from :juxt/edge}
  (:require [clojure.pprint :refer [pprint]]
            [clojure.test :refer [run-all-tests]]
            [clojure.reflect :refer [reflect]]
            [clojure.repl :refer [apropos dir doc find-doc pst source]]
            [clojure.tools.namespace.repl :refer [refresh refresh-all]]
            [clojure.java.io :as io]
            [mount.core :as mount :refer [start-without start-with start-with-states stop-except
                                          only except swap swap-states with-args]]
            [mount.tools.graph :as mount-graph]
            [schema.core :as schema]
            [taoensso.timbre :as timbre :refer [log trace debug info warn error fatal report
                                                logf tracef debugf infof warnf errorf fatalf reportf
                                                spy get-env log-env]]
            [taoensso.timbre.profiling :as profiling :refer [pspy pspy* profile defnp p p*]]
            [<<name>>.core :as core]
            [<<name>>.system :as system]))

(defn config
  "Pretty print the system status"
  []
  (pprint system/config))

(defn status
  "Pretty print the system status"
  []
  (pprint (mount-graph/states-with-deps)))

(def start mount/start)

(def stop mount/stop)

(defn go []
  (mount/start)
  :ready)

(defn reset []
  (mount/stop)
  (refresh :after 'dev/go))

(defn check
  "Check for component validation errors"
  [system]
  (let [errors
        (->> system
             (reduce-kv
              (fn [acc k v]
                (assoc acc k (schema/check (type v) v)))
              {})
             (filter (comp some? second)))]
    (when (seq errors) (into {} errors))))

(defn test-all []
  (run-all-tests #"<<name>>.*test$"))

(defn reset-and-test []
  (reset)
  (time (test-all)))<commit_msg>Start and stop are now from mount in dev, remove check<commit_after>(ns dev
  {:from :juxt/edge}
  (:require [clojure.pprint :refer [pprint]]
            [clojure.test :refer [run-all-tests]]
            [clojure.reflect :refer [reflect]]
            [clojure.repl :refer [apropos dir doc find-doc pst source]]
            [clojure.tools.namespace.repl :refer [refresh refresh-all]]
            [clojure.java.io :as io]
            [mount.core :as mount :refer [start stop start-without start-with start-with-states
                                          stop-except only except swap swap-states with-args]]
            [mount.tools.graph :as mount-graph]
            [schema.core :as schema]
            [taoensso.timbre :as timbre :refer [log trace debug info warn error fatal report
                                                logf tracef debugf infof warnf errorf fatalf reportf
                                                spy get-env log-env]]
            [taoensso.timbre.profiling :as profiling :refer [pspy pspy* profile defnp p p*]]
            [<<name>>.core :as core]
            [<<name>>.system :as system]))

(defn config
  "Pretty print the system status"
  []
  (pprint system/config))

(defn status
  "Pretty print the system status"
  []
  (pprint (mount-graph/states-with-deps)))

(defn go []
  (mount/start)
  :ready)

(defn reset []
  (mount/stop)
  (refresh :after 'dev/go))

(defn test-all []
  (run-all-tests #"<<name>>.*test$"))

(defn reset-and-test []
  (reset)
  (time (test-all)))
{'fraction_non_alphanumeric': 0.12742464935840048, 'fraction_numerical': 0.0, 'mean_word_length': 1.9403508771929825, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2139998', 'n_tokens_mistral': 1046, 'n_tokens_neox': 1048, 'n_words': 297}