From 43242c38373e590bff961ae7e47382b163af01bc Mon Sep 17 00:00:00 2001 From: funkpower Date: Fri, 18 Sep 2026 11:29:41 -0400 Subject: [PATCH] carry sign and tradition through the Python bindings too The bindings hand-map DayJson field by field, so the two fields added with Greek and Slavic usage were in --json and not in to_dict(). The parity test would have caught it; this is the fix rather than the discovery. Both are getters as well, since every other field is. --- python/typikon/_typikon.pyi | 6 ++++++ src/python.rs | 14 ++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/python/typikon/_typikon.pyi b/python/typikon/_typikon.pyi index b73f0a7..d494940 100644 --- a/python/typikon/_typikon.pyi +++ b/python/typikon/_typikon.pyi @@ -28,6 +28,12 @@ class Day: @property def rank(self) -> str | None: ... @property + def sign(self) -> str | None: + """The mark the liturgical books print beside a day of this rank.""" + @property + def tradition(self) -> str: + """Greek or Slavic usage, as this jurisdiction reads the Typikon.""" + @property def title(self) -> str: """The feast if there is one, else the principal commemoration.""" @property diff --git a/src/python.rs b/src/python.rs index 2da7694..58e3f1a 100644 --- a/src/python.rs +++ b/src/python.rs @@ -124,6 +124,18 @@ impl PyDay { self.inner.rank.map(|r| r.key()) } + /// The mark the liturgical books print beside a day of this rank. + #[getter] + fn sign(&self) -> Option<&'static str> { + self.inner.rank.map(|r| r.sign()) + } + + /// Greek or Slavic usage, as this jurisdiction reads the Typikon. + #[getter] + fn tradition(&self) -> &'static str { + self.inner.tradition + } + /// The feast if there is one, else the principal commemoration. #[getter] fn title(&self) -> &str { @@ -201,6 +213,8 @@ impl PyDay { d.set_item("cycle", j.cycle)?; d.set_item("feast", j.feast)?; d.set_item("rank", j.rank)?; + d.set_item("sign", j.sign)?; + d.set_item("tradition", j.tradition)?; d.set_item("title", j.title)?; d.set_item("commemorations", j.commemorations)?; d.set_item("fast", j.fast)?;