You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This should load metadata (a JSON document) from S3 using the path/key described here. That metadata should be used to instantiate an arxiv.canonical.domain.EPrint object.
When instantiating the Eprint object, the source_package and pdf members should be objects with a read() -> bytes: method. That method should lazily retrieve and read the contents of the corresponding resource on S3 (again, at the path/key described in the README.
_store_eprint(self, eprint: EPrint) -> None:
This should basically do everything in reverse. Note that source_package and pdf may be None. If they are notNone, then their contents should also be stored to S3 at the correct paths.
The text was updated successfully, but these errors were encountered:
The
arxiv.canonical.services.store.CanonicalStorage
class has two private methods for loading/storing the state of an e-print from/to S3.arxiv-canonical/arxiv/canonical/services/store.py
Lines 167 to 189 in 983f394
The schema for eprint metadata stored on S3 can be found here.
_load_eprint(self, identifier: Identifier, version: int) -> EPrint:
This should load metadata (a JSON document) from S3 using the path/key described here. That metadata should be used to instantiate an
arxiv.canonical.domain.EPrint
object.When instantiating the
Eprint
object, thesource_package
andpdf
members should be objects with aread() -> bytes:
method. That method should lazily retrieve and read the contents of the corresponding resource on S3 (again, at the path/key described in the README._store_eprint(self, eprint: EPrint) -> None:
This should basically do everything in reverse. Note that
source_package
andpdf
may beNone
. If they are notNone
, then their contents should also be stored to S3 at the correct paths.The text was updated successfully, but these errors were encountered: