diff options
Diffstat (limited to 'CLAUDE.md')
| -rw-r--r-- | CLAUDE.md | 32 |
1 files changed, 28 insertions, 4 deletions
@@ -291,7 +291,11 @@ M20 added by the `ef-major-litanies` task, M18 394 not 395 accordingly). Fixtures live in `test/fixtures/` with asserted SHA-256s. **CLI**: `colitur easter <year>`, `temporal <year>`, `day <year>`, -`readings <year>`. +`readings <year>`, `-h`/`--help`. Man page in `man/colitur.1`. + +`--help` prints to **stdout** and exits **0**; a usage error prints one line +to **stderr** and exits **2**. The distinction is asserted in `test/cli.t`, +both directions, because it is the sort of thing that silently rots. `readings` is a **separate command, not extra columns on `day`**, for a mechanical reason worth not rediscovering: a citation contains spaces and @@ -319,11 +323,31 @@ converters instead — that is reserved for `Slug`/`Lang`, whose `private string smart constructors deriving would bypass. ### Build & test + +There is a `Makefile` now (same shape as lectio's: `PREFIX ?= $(HOME)/.local`, +`## `-comment help target). Every recipe wraps dune in `opam exec --`, so make +works from a plain shell with no `eval $(opam env)` first. + +```sh +make help # list targets +make build +make test # fast suite, ~5 s (properties sample 200 years) +make check # full gate, ~2 min: every year 1583-9999, not a sample +make install # binary + calendar data + man page into ~/.local +make uninstall +``` + +`install` goes through `dune install`, not a hand-rolled copy, because the +binary finds its data relative to its own path (`<prefix>/share/colitur/ef`); +the man page is installed separately, to `$(PREFIX)/share/man/man1`, matching +lectio. The installed copy is a SNAPSHOT, not a link — `make reinstall` after +pulling. + +Raw dune still works if preferred: ```sh eval $(opam env) # activate the project-local switch (run from this dir) -dune build -dune test # fast suite, ~3 s -COLITUR_EXHAUSTIVE_SWEEP=1 dune test --force # + every year 1583-9999, ~50 s +dune build && dune test +COLITUR_EXHAUSTIVE_SWEEP=1 dune test --force dune exec colitur -- day 2026 | head ``` |
