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.
This commit is contained in:
funkpower
2026-09-18 11:29:41 -04:00
parent 56cc1a3d92
commit 43242c3837
2 changed files with 20 additions and 0 deletions
+6
View File
@@ -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
+14
View File
@@ -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)?;