mirror of
https://git.pumpin.online/funkpower/typikon.git
synced 2026-10-22 18:57:13 +00:00
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:
@@ -28,6 +28,12 @@ class Day:
|
|||||||
@property
|
@property
|
||||||
def rank(self) -> str | None: ...
|
def rank(self) -> str | None: ...
|
||||||
@property
|
@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:
|
def title(self) -> str:
|
||||||
"""The feast if there is one, else the principal commemoration."""
|
"""The feast if there is one, else the principal commemoration."""
|
||||||
@property
|
@property
|
||||||
|
|||||||
@@ -124,6 +124,18 @@ impl PyDay {
|
|||||||
self.inner.rank.map(|r| r.key())
|
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.
|
/// The feast if there is one, else the principal commemoration.
|
||||||
#[getter]
|
#[getter]
|
||||||
fn title(&self) -> &str {
|
fn title(&self) -> &str {
|
||||||
@@ -201,6 +213,8 @@ impl PyDay {
|
|||||||
d.set_item("cycle", j.cycle)?;
|
d.set_item("cycle", j.cycle)?;
|
||||||
d.set_item("feast", j.feast)?;
|
d.set_item("feast", j.feast)?;
|
||||||
d.set_item("rank", j.rank)?;
|
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("title", j.title)?;
|
||||||
d.set_item("commemorations", j.commemorations)?;
|
d.set_item("commemorations", j.commemorations)?;
|
||||||
d.set_item("fast", j.fast)?;
|
d.set_item("fast", j.fast)?;
|
||||||
|
|||||||
Reference in New Issue
Block a user