timetoshare.validation.timestamps#

Named-timestamp, elision, MatchStamp and resource rules.

The timeline a timestamp names, its coordinate and whether it may be a groupstamp; the timeline an elision names and its stretch; the alignment anchors of the named MatchStamps and their match timestamps; the timelines and types of the resources.

timetoshare.validation.timestamps.timestamp_problems(manifest)[source]#

Yield timestamps off the manifest’s timelines, outside their extent or groupless.

A timestamp names a timeline of the manifest, at any depth, or a virtual timeline, and its coordinate lies between 0 and that timeline’s length, or at or after 0 where the length is not known. A groupstamp (groupstamp: true), a match timestamp included, lies in a group: its timeline or one of that timeline’s ancestors is a member of a group.

timetoshare.validation.timestamps.elision_problems(manifest)[source]#

Yield elisions off the manifest’s timelines or outside their extent.

An elision names a timeline of the manifest, at any depth, or a virtual timeline, and its start lies before its end, both between 0 and that timeline’s length, or at or after 0 where the length is not known. Elisions may overlap; no overlap is a problem.

timetoshare.validation.timestamps.matchstamp_problems(manifest)[source]#

Yield the problems of the named MatchStamps and their match timestamps.

MatchStamp by MatchStamp, each alignment anchor names two match timestamps of the manifest (matchstamp: true) lying on two timelines, and the anchors are one connected set; then, timestamp by timestamp, a match timestamp shares its coordinate with no earlier match timestamp and some MatchStamp names it.

timetoshare.validation.timestamps.ONE_RESOURCE_TYPES = ('MatchClaim', 'Projection')#

The resource types a manifest names at most once.

timetoshare.validation.timestamps.resource_problems(manifest)[source]#

Yield the problems of the resources.

Resource by resource, each ID of its timelines names a timeline of the manifest, at any depth, or a virtual timeline, and no earlier resource has its type where that type is MatchClaim or Projection.