arxiv.canonical.integrity.version module

class arxiv.canonical.integrity.version.IntegrityDay(name, record=None, members=None, manifest=None, checksum=None)[source]

Bases: arxiv.canonical.integrity.core.IntegrityBase

Integrity collection for e-prints associated with a single day.

Specifically, this includes all versions of e-prints the first version of which was announced on this day.

property day

The numeric day represented by this collection.

Return type

date

class arxiv.canonical.integrity.version.IntegrityEPrint(name, record=None, members=None, manifest=None, checksum=None)[source]

Bases: arxiv.canonical.integrity.core.IntegrityBase

Integrity collection for an EPrint.

classmethod make_manifest_entry(member)[source]
Return type

ManifestEntry

member_type

alias of IntegrityVersion

class arxiv.canonical.integrity.version.IntegrityEPrints(name, record=None, members=None, manifest=None, checksum=None)[source]

Bases: arxiv.canonical.integrity.core.IntegrityBase

Integrity collection for all e-prints in the canonical record.

class arxiv.canonical.integrity.version.IntegrityMonth(name, record=None, members=None, manifest=None, checksum=None)[source]

Bases: arxiv.canonical.integrity.core.IntegrityBase

Integrity collection for e-prints associated with a single month.

Specifically, this includes all versions of e-prints the first version of which was announced in this month.

property manifest_name

The name to use for this record in a parent manifest.

Return type

str

property month

The numeric month represented by this collection.

Return type

int

property year

The numeric year represented by this collection.

Return type

int

class arxiv.canonical.integrity.version.IntegrityVersion(name, record=None, members=None, manifest=None, checksum=None)[source]

Bases: arxiv.canonical.integrity.core.IntegrityBase

Integrity collection for an e-print version.

property formats

Dict[ContentType, IntegrityEntry]

Type

rtype

classmethod from_record(version, checksum=None, calculate_new_checksum=True, manifest=None)[source]

Get an IntegrityVersion from a RecordVersion.

Parameters
  • version (RecordVersion) – The record for which this integrity object is to be generated.

  • checksum (str or None) –

  • manifest (dict) – If provided, checksum values for member files will be retrieved from this manifest. Otherwise they will be calculated from the file content.

  • calculate_new_checksum (bool) – If True, a new checksum will be calculated from the manifest.

Returns

Return type

IntegrityVersion

Return type

~_Self

classmethod make_manifest(members)[source]

Make a Manifest for this integrity collection.

Return type

Manifest

classmethod make_manifest_entry(member)[source]
Return type

ManifestEntry

property metadata

IntegrityMetadata

Type

rtype

property render

Optional[IntegrityEntry]

Type

rtype

property source

IntegrityEntry

Type

rtype

class arxiv.canonical.integrity.version.IntegrityVersionMembers[source]

Bases: arxiv.canonical.util.GenericMonoDict

Member mapping that supports IntegrityEntry and IntegrityMetadata.

class arxiv.canonical.integrity.version.IntegrityYear(name, record=None, members=None, manifest=None, checksum=None)[source]

Bases: arxiv.canonical.integrity.core.IntegrityBase

Integrity collection for e-prints associated with a single year.

Specifically, this includes all versions of e-prints the first version of which was announced in this year.

property year

The numeric year represented by this collection.

Return type

int