<commit_before>(ns spectrace.specs
  (:require [clojure.spec :as s]
            [clojure.core.specs :as specs]))

;; These spec definitions for spec macros are intended to be only used
;; internally just for now, and will be removed when the official
;; definitions are included in a future release of Clojure 1.9.

(defmulti specs-spec
  (fn [form]
    (when (seq? form) (first form))))
(defmethod specs-spec :default [_] any?)

(s/def ::spec (s/multi-spec specs-spec :s))

(s/def ::gen any?)

(defmethod specs-spec `s/spec [_]
  (s/cat :s #{`s/spec}
         :args (s/cat :form any? :opts (s/keys* :opt-un [::gen]))))

(defmethod specs-spec `s/and [_]
  (s/cat :s #{`s/and}
         :args (s/* any?)))

(s/def ::key+pred-pairs
  (s/* (s/cat :key keyword? :pred any?)))

(defmethod specs-spec `s/or [_]<commit_msg>Remove default method for specs-spec<commit_after>(ns spectrace.specs
  (:require [clojure.spec :as s]
            [clojure.core.specs :as specs]))

;; These spec definitions for spec macros are intended to be only used
;; internally just for now, and will be removed when the official
;; definitions are included in a future release of Clojure 1.9.

(defmulti specs-spec
  (fn [form]
    (when (seq? form) (first form))))

(s/def ::spec (s/multi-spec specs-spec :s))

(s/def ::gen any?)

(defmethod specs-spec `s/spec [_]
  (s/cat :s #{`s/spec}
         :args (s/cat :form any? :opts (s/keys* :opt-un [::gen]))))

(defmethod specs-spec `s/and [_]
  (s/cat :s #{`s/and}
         :args (s/* any?)))

(s/def ::key+pred-pairs
  (s/* (s/cat :key keyword? :pred any?)))

(defmethod specs-spec `s/or [_]
{'fraction_non_alphanumeric': 0.17493796526054592, 'fraction_numerical': 0.0024813895781637717, 'mean_word_length': 3.336021505376344, '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': '1041123', 'n_tokens_mistral': 624, 'n_tokens_neox': 590, 'n_words': 194}