Skip to content

Commit 362ed49

Browse files
committed
bump to version 7
1 parent e38f84d commit 362ed49

30 files changed

+568
-427
lines changed

README.md

Lines changed: 57 additions & 55 deletions
Large diffs are not rendered by default.

changelog.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ Also updated documentation to correspond to new function names.</div></li><li><d
88
`data-with-specs` to properly handle scalars within a set.</div></li><li><div>Removed un-needed/redundant api.clj and api.html pages because
99
they&apos;re automatically generated by Codox.</div></li><li><div>Added a `*max-tries*` dynamic var that governs random sample
1010
generators.</div></li><li><div>Added tests to verify handling of sequences emitted by
11-
`interpose`, `interleave`, `lazy-cat`, `mapcat`, and `zipmap`.</div></li><li><div>Added `lazy-seq?` utility predicate.</div></li><li><div>Various documentation edits spanning 2024July10 through 2024July26.</div></li></ul></div><hr /></section><section><h3>version 0</h3><p>2024 June 6<br />Brad Losavio (blosavio@sagevisuals.com)<br /><em>Description: </em>Initial public release.<br /><em>Project status: </em><a href="https://github.com/metosin/open-source/blob/main/project-status.md">experimental</a><br /><em>Urgency: </em>low<br /><em>Breaking: </em>no</p><p></p><div><h4>Breaking changes</h4><ul></ul><h4>Non-breaking changes</h4><ul></ul></div><hr /></section><p id="page-footer">Copyright © 2024 Brad Losavio.<br />Compiled by <a href="https://github.com/blosavio/chlog">Chlog</a> on 2024 November 27.<span id="uuid"><br />d571f801-3b49-4fd9-a5f3-620e034d0a8d</span></p></body>
11+
`interpose`, `interleave`, `lazy-cat`, `mapcat`, and `zipmap`.</div></li><li><div>Added `lazy-seq?` utility predicate.</div></li><li><div>Various documentation edits spanning 2024July10 through 2024July26.</div></li></ul></div><hr /></section><section><h3>version 0</h3><p>2024 June 6<br />Brad Losavio (blosavio@sagevisuals.com)<br /><em>Description: </em>Initial public release.<br /><em>Project status: </em><a href="https://github.com/metosin/open-source/blob/main/project-status.md">experimental</a><br /><em>Urgency: </em>low<br /><em>Breaking: </em>no</p><p></p><div><h4>Breaking changes</h4><ul></ul><h4>Non-breaking changes</h4><ul></ul></div><hr /></section><p id="page-footer">Copyright © 2024 Brad Losavio.<br />Compiled by <a href="https://github.com/blosavio/chlog">Chlog</a> on 2024 December 03.<span id="uuid"><br />d571f801-3b49-4fd9-a5f3-620e034d0a8d</span></p></body>

doc/changelog.html

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

doc/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!DOCTYPE html PUBLIC ""
22
"">
3-
<html><head><meta charset="UTF-8" /><title>Speculoos version 7-SNAPSHOT0</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">Speculoos</span> <span class="project-version">version 7-SNAPSHOT0</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 current"><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>speculoos</span></div></div></li><li class="depth-2 branch"><a href="speculoos.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="speculoos.function-specs.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>function-specs</span></div></a></li><li class="depth-2"><a href="speculoos.utility.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>utility</span></div></a></li></ul><ul class="index-link"><li class="depth-1"><a href="https://github.com/blosavio/speculoos">Project home</a></li></ul></div><div class="namespace-index" id="content"><h1><span class="project-title"><span class="project-name">Speculoos</span> <span class="project-version">version 7-SNAPSHOT0</span></span></h1><h5 class="license">Released under the <a href="https://opensource.org/license/mit">MIT License</a></h5><div class="doc"><p>A library for validating Clojure data.</p></div><h2>Installation</h2><p>To install, add the following dependency to your project or build file:</p><pre class="deps">[com.sagevisuals/speculoos "version 7-SNAPSHOT0"]</pre><h2>Namespaces</h2><div class="namespace"><h3><a href="speculoos.core.html">speculoos.core</a></h3><div class="doc"><div class="markdown"><p>This namespace provides functions to validate Clojure data. They operate on any heterogeneous, arbitrarily-nested data structure.</p>
3+
<html><head><meta charset="UTF-8" /><title>Speculoos version 7</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">Speculoos</span> <span class="project-version">version 7</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 current"><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>speculoos</span></div></div></li><li class="depth-2 branch"><a href="speculoos.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="speculoos.function-specs.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>function-specs</span></div></a></li><li class="depth-2"><a href="speculoos.utility.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>utility</span></div></a></li></ul><ul class="index-link"><li class="depth-1"><a href="https://github.com/blosavio/speculoos">Project home</a></li></ul></div><div class="namespace-index" id="content"><h1><span class="project-title"><span class="project-name">Speculoos</span> <span class="project-version">version 7</span></span></h1><h5 class="license">Released under the <a href="https://opensource.org/license/mit">MIT License</a></h5><div class="doc"><p>A library for validating Clojure data.</p></div><h2>Installation</h2><p>To install, add the following dependency to your project or build file:</p><pre class="deps">[com.sagevisuals/speculoos "version 7"]</pre><h2>Namespaces</h2><div class="namespace"><h3><a href="speculoos.core.html">speculoos.core</a></h3><div class="doc"><div class="markdown"><p>This namespace provides functions to validate Clojure data. They operate on any heterogeneous, arbitrarily-nested data structure.</p>
44
</div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="speculoos.core.html#var-all-paths">all-paths</a> </li><li> <a href="speculoos.core.html#var-clamp">clamp</a> </li><li> <a href="speculoos.core.html#var-only-invalid">only-invalid</a> </li><li> <a href="speculoos.core.html#var-only-valid">only-valid</a> </li><li> <a href="speculoos.core.html#var-ordinal-get">ordinal-get</a> </li><li> <a href="speculoos.core.html#var-ordinal-get-in">ordinal-get-in</a> </li><li> <a href="speculoos.core.html#var-recover-literal-path">recover-literal-path</a> </li><li> <a href="speculoos.core.html#var-reduce-indexed">reduce-indexed</a> </li><li> <a href="speculoos.core.html#var-valid-collections.3F">valid-collections?</a> </li><li> <a href="speculoos.core.html#var-valid-macro.3F">valid-macro?</a> </li><li> <a href="speculoos.core.html#var-valid-scalars.3F">valid-scalars?</a> </li><li> <a href="speculoos.core.html#var-valid.3F">valid?</a> </li><li> <a href="speculoos.core.html#var-validate">validate</a> </li><li> <a href="speculoos.core.html#var-validate-collections">validate-collections</a> </li><li> <a href="speculoos.core.html#var-validate-macro-with">validate-macro-with</a> </li><li> <a href="speculoos.core.html#var-validate-scalars">validate-scalars</a> </li><li> <a href="speculoos.core.html#var-validate-with-path-spec">validate-with-path-spec</a> </li></ul></div></div><div class="namespace"><h3><a href="speculoos.function-specs.html">speculoos.function-specs</a></h3><div class="doc"><div class="markdown"><p>This namespace provides facilities to apply specifications to and validate functions. Roughly speaking, trying to replicate the instrumentation and testing capabilities of <a href="https://clojure.org/guides/spec#_instrumentation_and_testing">spec.alpha</a> .</p>
55
</div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="speculoos.function-specs.html#var-assoc-metadata-f.21">assoc-metadata-f!</a> </li><li> <a href="speculoos.function-specs.html#var-dissoc-metadata-f.21">dissoc-metadata-f!</a> </li><li> <a href="speculoos.function-specs.html#var-exercise-fn">exercise-fn</a> </li><li> <a href="speculoos.function-specs.html#var-inject-specs.21">inject-specs!</a> </li><li> <a href="speculoos.function-specs.html#var-instrument">instrument</a> </li><li> <a href="speculoos.function-specs.html#var-recognized-spec-keys">recognized-spec-keys</a> </li><li> <a href="speculoos.function-specs.html#var-unject-specs.21">unject-specs!</a> </li><li> <a href="speculoos.function-specs.html#var-unstrument">unstrument</a> </li><li> <a href="speculoos.function-specs.html#var-validate-argument-return-relationship">validate-argument-return-relationship</a> </li><li> <a href="speculoos.function-specs.html#var-validate-fn">validate-fn</a> </li><li> <a href="speculoos.function-specs.html#var-validate-fn-with">validate-fn-with</a> </li><li> <a href="speculoos.function-specs.html#var-validate-higher-order-fn">validate-higher-order-fn</a> </li><li> <a href="speculoos.function-specs.html#var-wrapping-fn">wrapping-fn</a> </li></ul></div></div><div class="namespace"><h3><a href="speculoos.utility.html">speculoos.utility</a></h3><div class="doc"><div class="markdown"><p>Utility functions to make using and interacting with Speculoos nicer.</p>
66
</div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="speculoos.utility.html#var-*ordinal-offset*">*ordinal-offset*</a> </li><li> <a href="speculoos.utility.html#var-*such-that-max-tries*">*such-that-max-tries*</a> </li><li> <a href="speculoos.utility.html#var-.3D10th">=10th</a> </li><li> <a href="speculoos.utility.html#var-.3D11th">=11th</a> </li><li> <a href="speculoos.utility.html#var-.3D12th">=12th</a> </li><li> <a href="speculoos.utility.html#var-.3D1st">=1st</a> </li><li> <a href="speculoos.utility.html#var-.3D2nd">=2nd</a> </li><li> <a href="speculoos.utility.html#var-.3D3rd">=3rd</a> </li><li> <a href="speculoos.utility.html#var-.3D4th">=4th</a> </li><li> <a href="speculoos.utility.html#var-.3D5th">=5th</a> </li><li> <a href="speculoos.utility.html#var-.3D6th">=6th</a> </li><li> <a href="speculoos.utility.html#var-.3D7th">=7th</a> </li><li> <a href="speculoos.utility.html#var-.3D8th">=8th</a> </li><li> <a href="speculoos.utility.html#var-.3D9th">=9th</a> </li><li> <a href="speculoos.utility.html#var-all-specs-okay">all-specs-okay</a> </li><li> <a href="speculoos.utility.html#var-apathetic">apathetic</a> </li><li> <a href="speculoos.utility.html#var-basic-collection-spec-from-data">basic-collection-spec-from-data</a> </li><li> <a href="speculoos.utility.html#var-clamp-every">clamp-every</a> </li><li> <a href="speculoos.utility.html#var-clamp-in*">clamp-in*</a> </li><li> <a href="speculoos.utility.html#var-collections-without-predicates">collections-without-predicates</a> </li><li> <a href="speculoos.utility.html#var-data-from-spec">data-from-spec</a> </li><li> <a href="speculoos.utility.html#var-defpred">defpred</a> </li><li> <a href="speculoos.utility.html#var-exercise">exercise</a> </li><li> <a href="speculoos.utility.html#var-in.3F">in?</a> </li><li> <a href="speculoos.utility.html#var-inspect-fn">inspect-fn</a> </li><li> <a href="speculoos.utility.html#var-lazy-seq.3F">lazy-seq?</a> </li><li> <a href="speculoos.utility.html#var-non-predicates">non-predicates</a> </li><li> <a href="speculoos.utility.html#var-pred-sym-.3Egen-sym">pred-sym-&gt;gen-sym</a> </li><li> <a href="speculoos.utility.html#var-predicate-.3Egenerator">predicate-&gt;generator</a> </li><li> <a href="speculoos.utility.html#var-predicates-without-collections">predicates-without-collections</a> </li><li> <a href="speculoos.utility.html#var-predicates-without-scalars">predicates-without-scalars</a> </li><li> <a href="speculoos.utility.html#var-scalars-with-predicates">scalars-with-predicates</a> </li><li> <a href="speculoos.utility.html#var-scalars-without-predicates">scalars-without-predicates</a> </li><li> <a href="speculoos.utility.html#var-seq-regex">seq-regex</a> </li><li> <a href="speculoos.utility.html#var-sore-thumb">sore-thumb</a> </li><li> <a href="speculoos.utility.html#var-spec-from-data">spec-from-data</a> </li><li> <a href="speculoos.utility.html#var-swap-non-predicates">swap-non-predicates</a> </li><li> <a href="speculoos.utility.html#var-thoroughly-valid-collections.3F">thoroughly-valid-collections?</a> </li><li> <a href="speculoos.utility.html#var-thoroughly-valid-scalars.3F">thoroughly-valid-scalars?</a> </li><li> <a href="speculoos.utility.html#var-thoroughly-valid.3F">thoroughly-valid?</a> </li><li> <a href="speculoos.utility.html#var-unfindable-generators">unfindable-generators</a> </li><li> <a href="speculoos.utility.html#var-validate-predicate-.3Egenerator">validate-predicate-&gt;generator</a> </li></ul></div></div></div></body></html>

doc/prettyfy_check.html

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
<!DOCTYPE html>
2+
<html lang="en"><head><link href="project.css" rel="stylesheet" type="text/css"><title>Speculoos — check `prettyfy` settings</title><meta charset="utf-8" compile-date="2024-12-02 19:22:55" content="width=device-width, initial-scale=1" name="viewport"></head><body><article><h1>Speculoos <code>prettyfy</code> check</h1><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p><pre><code>(+ 1 2 3) ;; => 6</code><br><br><code>(map inc [11 22 33]) ;; => (12 23 34)</code><br><br><code>(defn foo [x y] (vector x y (+ x y) (* x y)))</code></pre><h2><code>all-paths</code></h2><p>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p><pre><code>(require '[speculoos.core :refer [all-paths]])</code><br><br><code>(all-paths [42 :foo 22/7])
3+
;; => [{:path [], :value [42 :foo 22/7]}
4+
;; {:path [0], :value 42}
5+
;; {:path [1], :value :foo}
6+
;; {:path [2], :value 22/7}]</code><br><br><code>(all-paths {:a 42, :b 'foo, :c 22/7})
7+
;; => [{:path [], :value {:a 42, :b foo, :c 22/7}}
8+
;; {:path [:a], :value 42}
9+
;; {:path [:b], :value foo}
10+
;; {:path [:c], :value 22/7}]</code><br><br><code>(all-paths [11 [22 [33] 44] 55 66 77 88 99])
11+
;; => [{:path [],
12+
;; :value [11 [22 [33] 44] 55 66 77
13+
;; 88 99]}
14+
;; {:path [0], :value 11}
15+
;; {:path [1], :value [22 [33] 44]}
16+
;; {:path [1 0], :value 22}
17+
;; {:path [1 1], :value [33]}
18+
;; {:path [1 1 0], :value 33}
19+
;; {:path [1 2], :value 44}
20+
;; {:path [2], :value 55}
21+
;; {:path [3], :value 66}
22+
;; {:path [4], :value 77}
23+
;; {:path [5], :value 88}
24+
;; {:path [6], :value 99}]</code></pre><h2><code>validate-scalars</code></h2><p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p><pre><code>(require '[speculoos.core :refer [validate-scalars]])</code><br><br><code>(validate-scalars [42 :foo 22/7]
25+
[int? string? ratio?])
26+
;; => [{:datum 42, :path [0], :predicate int?, :valid? true}
27+
;; {:datum :foo, :path [1], :predicate string?, :valid? false}
28+
;; {:datum 22/7, :path [2], :predicate ratio?, :valid? true}]</code><br><br><code>(validate-scalars {:a 42, :b 'foo, :c 22/7}
29+
{:a int?, :b string?, :c ratio?})
30+
;; => [{:datum 42, :path [:a], :predicate int?, :valid? true}
31+
;; {:datum foo, :path [:b], :predicate string?, :valid? false}
32+
;; {:datum 22/7, :path [:c], :predicate ratio?, :valid? true}]</code></pre><h2><code>validate-collections</code></h2><p>Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p><pre><code>(require '[speculoos.core :refer [validate-collections]])</code><br><br><code>(validate-collections [11 [22 [33]]]
33+
[vector? [set? [list?]]])
34+
;; => ({:datum [11 [22 [33]]],
35+
;; :ordinal-path-datum [],
36+
;; :path-datum [],
37+
;; :path-predicate [0],
38+
;; :predicate vector?,
39+
;; :valid? true}
40+
;; {:datum [22 [33]],
41+
;; :ordinal-path-datum [0],
42+
;; :path-datum [1],
43+
;; :path-predicate [1 0],
44+
;; :predicate set?,
45+
;; :valid? false}
46+
;; {:datum [33],
47+
;; :ordinal-path-datum [0 0],
48+
;; :path-datum [1 1],
49+
;; :path-predicate [1 1 0],
50+
;; :predicate list?,
51+
;; :valid? false})</code><br><br><code>(validate-collections {:a 11, :b {:c [22]}}
52+
{:is-map? map?, :b {:is-set? set?, :c [vector?]}})
53+
;; => ({:datum {:a 11, :b {:c [22]}},
54+
;; :ordinal-path-datum [],
55+
;; :path-datum [],
56+
;; :path-predicate [:is-map?],
57+
;; :predicate map?,
58+
;; :valid? true}
59+
;; {:datum {:c [22]},
60+
;; :ordinal-path-datum [:b],
61+
;; :path-datum [:b],
62+
;; :path-predicate [:b :is-set?],
63+
;; :predicate set?,
64+
;; :valid? false}
65+
;; {:datum [22],
66+
;; :ordinal-path-datum [:b :c],
67+
;; :path-datum [:b :c],
68+
;; :path-predicate [:b :c 0],
69+
;; :predicate vector?,
70+
;; :valid? true})</code></pre><h2><code>valid-scalars?</code> and <code>valid-collections?</code></h2><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p><pre><code>(require '[speculoos.core :refer [valid-scalars? valid-collections?]])</code><br><br><code>(valid-scalars? [42 :foo 22/7]
71+
[int? keyword? ratio?])
72+
;; => true</code><br><br><code>(valid-scalars? {:a 42, :b 'foo, :c 22/7}
73+
{:a int?, :b symbol?, :c ratio?})
74+
;; => true</code><br><br><code>(valid-collections? [11 [22 [33]]]
75+
[vector? [set? [map?]]])
76+
;; => false</code><br><br><code>(valid-collections? {:a 42, :b {:c ['foo]}}
77+
{:is-map? map?, :b {:is-map? map?, :c [vector?]}})
78+
;; => true</code></pre></article><p id="page-footer">Copyright © 2024 Brad Losavio.<br>Compiled by Prettyfy checker script on 2024 December 02.<span id="uuid"><br>a3b33ff1-7dcd-4b9c-a34f-58b39042bbb5</span></p></body></html>

0 commit comments

Comments
 (0)