Skip to content

Commit

Permalink
Add philadelphiaNumber (#478)
Browse files Browse the repository at this point in the history
  • Loading branch information
zsomborfoldi authored Nov 2, 2023
1 parent 42e1866 commit 2edefbf
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions ebl/fragmentarium/application/fragment_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ class ExternalNumbersSchema(Schema):
metropolitan_number = fields.String(load_default="", data_key="metropolitanNumber")
yale_peabody_number = fields.String(load_default="", data_key="yalePeabodyNumber")
louvre_number = fields.String(load_default="", data_key="louvreNumber")
philadelphia_number = fields.String(load_default="", data_key="philadelphiaNumber")
oracc_numbers = fields.List(
fields.String(), load_default=tuple(), data_key="oraccNumbers"
)
Expand Down
5 changes: 5 additions & 0 deletions ebl/fragmentarium/domain/fragment.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ class ExternalNumbers:
hilprecht_heidelberg_number: str = ""
metropolitan_number: str = ""
louvre_number: str = ""
philadelphia_number: str = ""
yale_peabody_number: str = ""
oracc_numbers: Sequence[str] = tuple()

Expand Down Expand Up @@ -264,3 +265,7 @@ def metropolitan_number(self) -> str:
@property
def louvre_number(self) -> str:
return self._get_external_number("louvre_number")

@property
def philadelphia_number(self) -> str:
return self._get_external_number("philadelphia_number")
1 change: 1 addition & 0 deletions ebl/tests/factories/fragment.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ class Meta:
)
metropolitan_number = factory.Sequence(lambda n: f"metropolitan-number-{n}")
louvre_number = factory.Sequence(lambda n: f"louvre-number-{n}")
philadelphia_number = factory.Sequence(lambda n: f"philadelphia-number-{n}")
yale_peabody_number = factory.Sequence(lambda n: f"yale-peabody-number-{n}")
oracc_numbers = factory.List(
[factory.Sequence(lambda n: f"oracc-number-{n}")], TupleFactory
Expand Down

0 comments on commit 2edefbf

Please sign in to comment.