mirror of
https://git.pumpin.online/funkpower/typikon.git
synced 2026-10-22 18:57:13 +00:00
fix a crash, a false changelog entry, and three things 1.0 would freeze
Two adversarial reviews of the release. Both said do not ship, and they were right twice over. The seven-day view panicked. elide() cut a title at cut.len() / 2, a byte index into a string it had counted in characters, and every movable feast title carries an em dash: at fourteen terminal widths, 80 among them, it aborted with exit 101 on the README's own headline command. tests/elide.rs now cuts every title the program can print at every width it can be asked to print at. The changelog's first Calendar entry was false. It said a vigil or polyeleos saint reaches fish in the three lesser fasts; the code gives wine and oil to every rank but great, and caps the Dormition Fast at wine and oil whatever the rank. A reader in the Dormition Fast was told this release let a saint bring fish. docs/versioning.md makes that section a contract, so a wrong entry there is worse than a wrong comment. The Python bindings read the config file where the CLI reads the environment first, so TYPIKON_JURISDICTION moved one and not the other and the two answered for different churches on the same machine. CI now asserts they agree, and runs the README example checker, which was standing between the docs and reality with nothing running it. Three changes to the surface, made now because after 1.0.0 they are a major version: binds is null rather than the string none where a church legislates no binding fast at all; iCalendar UIDs carry the tradition and the discipline, which two feeds of the same day were sharing while saying different things; and Date's Julian Day Number is behind an accessor rather than a public field. fastLabel, emoji and reason are documented as presentation. The fields are stable, the wording is not, and freezing three human-facing strings for a major version was not the intent.
This commit is contained in:
+18
-4
@@ -21,6 +21,10 @@ tradition title commemorations fast fastLabel emoji reason obligation binds
|
||||
pascha daysToPascha julianOffset
|
||||
```
|
||||
|
||||
`fastLabel`, `emoji` and `reason` are **presentation**: the fields are always
|
||||
there, and their wording is not stable. Key on `fast`, `season`, `rank`,
|
||||
`obligation` and `binds`.
|
||||
|
||||
Adding a field is a **minor** change, so read the object by key and ignore what
|
||||
you do not recognise. `season`, `cycle`, `feast`, `rank`, `sign` and
|
||||
`obligation` are null on ordinary days.
|
||||
@@ -32,6 +36,9 @@ Two semantics worth stating because the names do not carry them:
|
||||
about -263, not the days until the next one.
|
||||
- **`julianOffset`** is reported for every jurisdiction, including those that
|
||||
do not use the Julian menologion.
|
||||
- **`binds` is null unless the day binds.** Most jurisdictions legislate no
|
||||
binding fast at all, which is a different fact from a day that happens to
|
||||
oblige nothing, and the null says which.
|
||||
|
||||
### The fasting levels
|
||||
|
||||
@@ -46,8 +53,14 @@ freely.
|
||||
|
||||
### The command line
|
||||
|
||||
Flag names and what they do, the exit codes (0 success, 2 usage error), and the
|
||||
column names `--format csv` accepts. `--json` and `--ics` remain as shorthand
|
||||
Flag names and what they do, the column names `--format csv` accepts, and the
|
||||
exit codes:
|
||||
|
||||
| | |
|
||||
|---|---|
|
||||
| 0 | it answered |
|
||||
| 1 | it ran and the result is incomplete, as when a fetched menaion is missing days |
|
||||
| 2 | it was asked for something it could not do | `--json` and `--ics` remain as shorthand
|
||||
for `--format`.
|
||||
|
||||
### The Rust and Python APIs
|
||||
@@ -63,8 +76,9 @@ rather than camelCase, which is the one deliberate difference between them.
|
||||
|
||||
- **The text output.** It is for a person to read, and it changes when a better
|
||||
arrangement is found. Parse the JSON, CSV or TSV instead.
|
||||
- **The `reason` strings.** They explain a decision to a reader; they are not
|
||||
identifiers. Key on `fast`, `season` and `obligation`.
|
||||
- **`reason`, `fastLabel` and `emoji`.** They explain and present a decision to
|
||||
a reader; they are not identifiers. The fields themselves are stable, their
|
||||
wording is not.
|
||||
- **The menologion.** Commemorations get added, corrected and reworded. See
|
||||
below.
|
||||
- **Anything not listed above**, including every private item and the layout of
|
||||
|
||||
Reference in New Issue
Block a user