<commit_before>(ns incise.core-spec
    (:require [speclj.core :refer :all]
              [incise.core :refer :all]))

(describe "namespace is layout or parser filter"
  (it "returns false on non-parser and non-layout namespaces"
    (doseq [ns-sym ['arbitrary.name.space 'my.parser.yay 'your.layout.boop]]
      (should-not (namespace-is-layout-or-parser ns-sym))))
  (it "returns true for parser and layout namespaces"
    (doseq [ns-sym ['incise.parsers.cool-thing 'incise.layouts.bootstrapped]]
      (should (namespace-is-layout-or-parser ns-sym))))
  (it "returns false for core parser and layout namespaces"
    (doseq [core-ns core-namespace-symbols]
      (should-not (namespace-is-layout-or-parser core-ns)))))<commit_msg>Fill out core_spec for finding parsers and layouts.<commit_after>(ns incise.core-spec
    (:require [speclj.core :refer :all]
              [incise.core :refer :all]))

(describe "namespace is layout or parser filter"
  (it "returns false on non-parser and non-layout namespaces"
    (doseq [ns-sym ['arbitrary.name.space 'my.parser.yay 'your.layout.boop]]
      (should-not (namespace-is-layout-or-parser? ns-sym))))
  (it "returns true for parser and layout namespaces"
    (doseq [ns-sym ['incise.parsers.cool-thing 'incise.layouts.bootstrapped]]
      (should (namespace-is-layout-or-parser? ns-sym)))))

(describe "namespace is spec or test"
  (it "returns true for specs and tests"
    (doseq [ns-sym ['cool.thing-test 'incise.parsers.core-spec]]
      (should (namespace-is-spec-or-test? ns-sym))))
  (it "returns false for other namespaces"
    (doseq [ns-sym ['cool.thing 'incise.parsers.batman]]
      (should-not (namespace-is-spec-or-test? ns-sym)))))

(describe "finding parsers and layouts"
  (with layout-and-parser-syms (find-parser-and-layout-symbols))
  (it "does not contain core namespaces"
    (doseq [core-sym core-namespace-symbols]
      (should-not-contain core-sym @layout-and-parser-syms)))
  (it "should contain default layouts and parsers"
    (doseq [default-sym ['incise.parsers.markdown
                         'incise.layouts.page]]
      (should-contain default-sym @layout-and-parser-syms))))
{'fraction_non_alphanumeric': 0.14305555555555555, 'fraction_numerical': 0.0, 'mean_word_length': 3.559071729957806, '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': '326180', 'n_tokens_mistral': 738, 'n_tokens_neox': 710, 'n_words': 182}