arxiv.canonical.register.version module

class arxiv.canonical.register.version.RegisterVersion(name, domain, record, integrity, members=None)[source]

Bases: arxiv.canonical.register.core.Base

classmethod create(s, sources, d, save_members=True)[source]
Return type

RegisterVersion

domain_type

alias of arxiv.canonical.domain.version.Version

integrity_type

alias of arxiv.canonical.integrity.version.IntegrityVersion

classmethod load(s, sources, identifier, checksum=None)[source]

Load an e-print Version from s.

This method is overridden since it uses a different member mapping struct than higher-level collection types.

Return type

~_Self

property member_names

Set[str]

Type

rtype

member_type

alias of arxiv.canonical.register.file.RegisterFile

property number_of_events

Number of events contained within a register instance.

Return type

int

property number_of_versions

Number of e-print versions contained within a register instance.

Return type

int

record_type

alias of arxiv.canonical.record.version.RecordVersion

save_members(s, members)[source]

Save members that have changed, and update our manifest.

Return type

None

update(s, sources, version)[source]

Update a version in place.

Removes any members (files) not in the passed Version, and retains and ignores members without any content (assumes that this is a partial update). Saves any new/changed members, and updates the manifest.

Return type

None