Skip to content

Commit

Permalink
Add Digitale Keilschrift Bibliothek to Ext Nos (#593)
Browse files Browse the repository at this point in the history
* Add Digitale Keilschrift Bibliothek to Ext Nos

* Format

---------

Co-authored-by: ejimsan <[email protected]>
  • Loading branch information
ejimsan and ejimsan authored Jan 5, 2025
1 parent a69f50f commit 7393468
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ebl/fragmentarium/application/fragment_fields_schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,9 @@ class ExternalNumbersSchema(Schema):
oracc_numbers = fields.List(
fields.String(), load_default=(), data_key="oraccNumbers"
)
digitale_keilschrift_bibliothek = fields.String(
load_default="", data_key="digitaleKeilschriftBibliothek"
)
seal_numbers = fields.List(fields.String(), load_default=(), data_key="sealNumbers")

@post_load
Expand Down
5 changes: 5 additions & 0 deletions ebl/fragmentarium/domain/fragment_external_numbers.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class ExternalNumbers:
philadelphia_number: str = ""
achemenet_number: str = ""
nabucco_number: str = ""
digitale_keilschrift_bibliothek: str = ""
yale_peabody_number: str = ""
oracc_numbers: Sequence[str] = ()
seal_numbers: Sequence[str] = ()
Expand Down Expand Up @@ -100,6 +101,10 @@ def achemenet_number(self) -> str:
def nabucco_number(self) -> str:
return self._get_external_number("nabucco")

@property
def digitale_keilschrift_bibliothek(self) -> str:
return self._get_external_number("digitale_keilschrift_bibliothek")

@property
def philadelphia_number(self) -> str:
return self._get_external_number("philadelphia_number")
Expand Down
3 changes: 3 additions & 0 deletions ebl/tests/factories/fragment.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,9 @@ class Meta:
yale_peabody_number = factory.Sequence(lambda n: f"yale-peabody-number-{n}")
achemenet_number = factory.Sequence(lambda n: f"achemenet-number-{n}")
nabucco_number = factory.Sequence(lambda n: f"nabucco-number-{n}")
digitale_keilschrift_bibliothek = factory.Sequence(
lambda n: f"digitale-keilschrift-bibliothek-{n}"
)
oracc_numbers = factory.List(
[factory.Sequence(lambda n: f"oracc-number-{n}")], TupleFactory
)
Expand Down

0 comments on commit 7393468

Please sign in to comment.