<commit_before>(ns icecap.schema
  "The schemata for icecap plans."
  (:require [schema.core :as s]
            [icecap.handlers.http]
            [icecap.handlers.delay]
            [icecap.handlers.core :refer [get-schema]]
            [icecap.execute :refer [supported-scheme?]]))

(def Step
  "The schema for the description of a single step.

  An step is a small, atomic part of a capability. It includes things
  like HTTP requests or delays."
  (s/conditional ;; HACK: this implementation is quite unfortunate,
   ;; but I can't figure out how to make it any better; see also:
   ;; https://github.com/Prismatic/schema/issues/140
   #(= (:type %) :http) (get-schema {:type :http})
   #(= (:type %) :delay) (get-schema {:type :delay})))

(defn with-one-or-more
  "Constrain a seq schema to require one or more items.<commit_msg>Remove hackety notes<commit_after>(ns icecap.schema
  "The schemata for icecap plans."
  (:require [schema.core :as s]
            [icecap.handlers.http]
            [icecap.handlers.delay]
            [icecap.handlers.core :refer [get-schema]]
            [icecap.execute :refer [supported-scheme?]]))

(def Step
  "The schema for the description of a single step.

  An step is a small, atomic part of a capability. It includes things
  like HTTP requests or delays."
  (s/conditional
   #(= (:type %) :http) (get-schema {:type :http})
   #(= (:type %) :delay) (get-schema {:type :delay})))

(defn with-one-or-more
  "Constrain a seq schema to require one or more items.
{'fraction_non_alphanumeric': 0.13072329130723293, 'fraction_numerical': 0.0019907100199071004, 'mean_word_length': 3.0428954423592494, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, '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': '6472992', 'n_tokens_mistral': 496, 'n_tokens_neox': 468, 'n_words': 163}