Skip to content

Commit

Permalink
add Pierpont Morgan Number (#590)
Browse files Browse the repository at this point in the history
* add Pierpont Morgan Number

* format fragment_fields_schemas
  • Loading branch information
zsomborfoldi authored Dec 21, 2024
1 parent c7b9c66 commit 8bee9d4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 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 @@ -129,6 +129,9 @@ class ExternalNumbersSchema(Schema):
load_default="", data_key="hilprechtHeidelbergNumber"
)
metropolitan_number = fields.String(load_default="", data_key="metropolitanNumber")
pierpont_morgan_number = fields.String(
load_default="", data_key="pierpontMorganNumber"
)
yale_peabody_number = fields.String(load_default="", data_key="yalePeabodyNumber")
louvre_number = fields.String(load_default="", data_key="louvreNumber")
dublin_tcd_number = fields.String(load_default="", data_key="dublinTcdNumber")
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 @@ -13,6 +13,7 @@ class ExternalNumbers:
hilprecht_jena_number: str = ""
hilprecht_heidelberg_number: str = ""
metropolitan_number: str = ""
pierpont_morgan_number: str = ""
louvre_number: str = ""
dublin_tcd_number: str = ""
alalah_hpm_number: str = ""
Expand Down Expand Up @@ -71,6 +72,10 @@ def yale_peabody_number(self) -> str:
def metropolitan_number(self) -> str:
return self._get_external_number("metropolitan_number")

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

@property
def louvre_number(self) -> str:
return self._get_external_number("louvre_number")
Expand Down
5 changes: 3 additions & 2 deletions ebl/tests/factories/fragment.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,10 @@ class Meta:
lambda n: f"hilprecht-heidelberg-{n}"
)
metropolitan_number = factory.Sequence(lambda n: f"metropolitan-number-{n}")
pierpont_morgan_number = factory.Sequence(lambda n: f"pierpont-morgan-number-{n}")
louvre_number = factory.Sequence(lambda n: f"louvre-number-{n}")
dublin_tcd_number = factory.Sequence(lambda n: f"dublin_tcd_number-{n}")
alalah_hpm_number = factory.Sequence(lambda n: f"alalah_hpm_number-{n}")
dublin_tcd_number = factory.Sequence(lambda n: f"dublin-tcd-number-{n}")
alalah_hpm_number = factory.Sequence(lambda n: f"alalah-hpm-number-{n}")
australianinstituteofarchaeology_number = factory.Sequence(
lambda n: f"australianinstituteofarchaeology-number-{n}"
)
Expand Down

0 comments on commit 8bee9d4

Please sign in to comment.