timetoshare.tables.checks#
The checks of the MatchClaim table and the Projections table.
Each *_problems function lists every problem it finds, the table’s own
first, then row by row; each check_* function raises the first as a
TableError. A table may hold columns its type does not declare; they are
kept and never checked.
- exception timetoshare.tables.checks.TableError(problem)[source]#
Bases:
ValueErrorA table breaks a rule;
problemis the first problem found.
- class timetoshare.tables.checks.TableProblem(code, row, column, message)[source]#
Bases:
objectOne problem of a table: its code, its row (
Nonefor the whole table), the path of its column and its message.
- timetoshare.tables.checks.check_match_claims(table, manifest=None)[source]#
Raise
TableErrorfor the first problem of a MatchClaim table.
- timetoshare.tables.checks.check_projections(table, manifest=None)[source]#
Raise
TableErrorfor the first problem of a Projections table.
- timetoshare.tables.checks.check_succession(old, new)[source]#
Raise
TableErrorfor the first breach of the succession rule.
- timetoshare.tables.checks.match_claim_problems(table, manifest=None)[source]#
Every problem of a MatchClaim table, checked against a manifest (as read from its file, IDs written
#) where one is given.A MatchClaim’s ID is unique in the table, which belongs to one manifest. An actor holds one belief in a row; against a manifest, actors are compared as the IRIs they stand for under its
@context, so a compact and an absolute IRI of one actor are one actor, else as written.
- timetoshare.tables.checks.projection_problems(table, manifest=None)[source]#
Every problem of a Projections table, checked against a manifest (as read from its file, IDs written
#) where one is given.A Projection’s ID is unique in the package, as every event’s: two timelines never both hold
projection_1.
- timetoshare.tables.checks.row_provenance(table)[source]#
The provenance of every row of a checked MatchClaim table: its own, or the file’s where the row states none.
- timetoshare.tables.checks.succession_problems(old, new)[source]#
Every breach of the succession rule by
newwritten overold.Both are checked MatchClaim tables. A MatchClaim is its ID alone; a column the type does not declare takes no part. Every MatchClaim of
oldis innew, and its row has the same value in every column butprovenance; a coordinate is the same when its unit, number type and exact value are, so2/4and1/2are one coordinate. The rows ofneware reported by their index innew.