summaryrefslogtreecommitdiff
path: root/tools/dune
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-08-12 00:05:57 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-08-12 00:05:57 +0200
commit4624441d0bc9c1f28dea54606ab7999041d4b323 (patch)
treeaf9b9308c70fb5df6888990e7780e6e951d76644 /tools/dune
parent21dab521d6bfe8e4e7d04f761c11754059339ba2 (diff)
downloadcolitur-4624441d0bc9c1f28dea54606ab7999041d4b323.tar.gz
colitur-4624441d0bc9c1f28dea54606ab7999041d4b323.zip
data(ef): bootstrap the 1962 sanctoral from lectio
Convert lectio's tridentine-calendar.ini (322 entries) into data/ef/sanctoral.sexp via a validating OCaml converter, tools/ bootstrap_sanctoral.ml, rather than a hand-written script: every field is built through Slug.of_string, Colour.of_string and Vocab_ef.rank_of_string, so the emitted sexp is valid by construction. Two conversion decisions, both documented rather than buried: - subject defaults to Subject.Saint, overriding Celebration.make's kernel default of Subject.Temporal, for the 316 entries with no explicit class; - rank = commemoration maps to status = Commemoration_only with an inferred Class3 (not a citation -- it is what the 1960 reform reduced most simple feasts from), recorded as an open item in the rules register for the oracle to adjudicate. Every celebration is tagged layer = Precedence_ef.universal_layer, the provenance id RG 91's band classifier reads to tell the universal calendar from proper/indult data. The generated file carries a provenance header: source path, its SHA-256, and the UTC conversion date, so re-bootstrapping against a newer lectio is reproducible and diffable. Output is byte-identical across runs. test/test_sanctoral_ef.ml loads the file through Layer.load and checks the counts independently derived from the source INI (322 entries, 114 Commemoration_only, 12 Class1, no Subject.Temporal, every date resolves in a leap year), plus two named spot-checks against the INI's own text -- one entry with an explicit class field, one commemoration -- so a passing count cannot hide the wrong 322 entries having been converted.
Diffstat (limited to 'tools/dune')
-rw-r--r--tools/dune10
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/dune b/tools/dune
new file mode 100644
index 0000000..d53cd01
--- /dev/null
+++ b/tools/dune
@@ -0,0 +1,10 @@
+; A documented one-shot, not part of the build's normal product (spec ยง4.5):
+; converts lectio's tridentine-calendar.ini into data/ef/sanctoral.sexp. Run
+; via `dune exec tools/bootstrap_sanctoral.exe -- <source.ini> <dest.sexp>`.
+; `unix` is the OCaml distribution's bundled library (already in the switch,
+; not a new opam dependency) -- used only here, never by the kernel, to shell
+; out to `sha256sum` for the provenance header; the kernel itself never reads
+; the environment or a clock.
+(executable
+ (name bootstrap_sanctoral)
+ (libraries colitur_kernel rite_ef unix sexplib))