<commit_before>(ns mdr2.production.spec
  (:require [spec-tools.data-spec :as spec]
            [clojure.spec.alpha :as s]))

(s/def ::state (s/and string?
                      #{"new" "archived" "cataloged" "deleted" "encoded"
                        "failed" "pending-split" "recorded" "split" "structured"}))
(s/def ::production_type (s/and string? #{"book" "periodical" "other"}))
(s/def ::library_signature (s/and string? #(re-matches #"^ds\d{5,}$" %)))
(s/def ::date #(instance? java.time.LocalDate %))

(def production
  {:title string?
   (spec/opt :creator) string?
   (spec/opt :subject) string?
   (spec/opt :description) string?
   (spec/opt :publisher) string?
   :date ::date
   (spec/opt :type) string?
   (spec/opt :format) string?
   (spec/opt :id) int?
   :identifier string?
   (spec/opt :source) string?
   :language string?
   (spec/opt :rights) string?
   (spec/opt :source_date) ::date
   (spec/opt :source_edition) string?
   (spec/opt :source_publisher) string?
   (spec/opt :source_rights) string?
   (spec/opt :multimedia_type) string?
   (spec/opt :multimedia_content) string?<commit_msg>Add the repairing state to the spec<commit_after>(ns mdr2.production.spec
  (:require [spec-tools.data-spec :as spec]
            [clojure.spec.alpha :as s]))

(s/def ::state (s/and string?
                      #{"new" "archived" "cataloged" "deleted" "encoded"
                        "failed" "pending-split" "recorded" "split" "structured"
                        "repairing"}))
(s/def ::production_type (s/and string? #{"book" "periodical" "other"}))
(s/def ::library_signature (s/and string? #(re-matches #"^ds\d{5,}$" %)))
(s/def ::date #(instance? java.time.LocalDate %))

(def production
  {:title string?
   (spec/opt :creator) string?
   (spec/opt :subject) string?
   (spec/opt :description) string?
   (spec/opt :publisher) string?
   :date ::date
   (spec/opt :type) string?
   (spec/opt :format) string?
   (spec/opt :id) int?
   :identifier string?
   (spec/opt :source) string?
   :language string?
   (spec/opt :rights) string?
   (spec/opt :source_date) ::date
   (spec/opt :source_edition) string?
   (spec/opt :source_publisher) string?
   (spec/opt :source_rights) string?
   (spec/opt :multimedia_type) string?
   (spec/opt :multimedia_content) string?
{'fraction_non_alphanumeric': 0.17015706806282724, 'fraction_numerical': 0.0017452006980802793, 'mean_word_length': 3.3428030303030303, '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': '5303119', 'n_tokens_mistral': 814, 'n_tokens_neox': 797, 'n_words': 196}