tilie_server.claim_columns#
The columns of a checked MatchClaim table, in the editor’s encoding.
The repository’s decisions/0029-match-claim-columns.md fixes the arrays
and the encoding of a value; decisions/0030-match-claims-answer.md names
the arrays of the answer. Every array is little-endian. The module needs
numpy, pyarrow and timetoshare, which timetoalign brings in; the route
imports it only when a request needs it.
- tilie_server.claim_columns.SAFE = 9007199254740992#
Below this magnitude an int64 is a double exactly, so the IEEE quotient of two of them is the correctly rounded quotient.
- tilie_server.claim_columns.Arrays#
Named arrays in the answer’s order: name, bytes, number of entries.
- tilie_server.claim_columns.axis_timelines(table, manifest)[source]#
The timelines the table names, sorted by ID, and each side’s numbers.
- Parameters:
- Returns:
[{"id", "number_type"}], the number type of the manifest’s timeline (the checks hold every cell to it), and per row the index of side A’s and of side B’s timeline in that list.- Return type:
- tilie_server.claim_columns.value_column(anchors, side, number_types)[source]#
One value column: per row the position, numerator and denominator.
An
intvalue is its integer over 1, afractionvalue its lowest terms, each with the double nearest it (ties to even, as Python’sfloat); afloatvalue is its double,-0.0written0.0, over0/0. A row without the anchor holds zeros, which are not read.
- tilie_server.claim_columns.manifest_bundle(manifest)[source]#
The manifest as timetoalign reads it, without MatchClaims.
- Parameters:
manifest (Mapping[str, Any]) – The manifest as its file writes it (IDs
#id).- Raises:
Refusal – 422 with timetoalign’s message if it refuses the manifest, at the path the refusal names (a rule of TimeToShare’s validators names the place in the manifest it breaks), else at
[].- Return type:
AlignmentBundle
- tilie_server.claim_columns.actor_context(manifest)[source]#
The JSON-LD context under which timetoalign compares the actors of the manifest’s MatchClaims (its
belief_context).
- tilie_server.claim_columns.row_beliefs(table, context)[source]#
Every row’s beliefs: its own, or the file’s where the file states them (the checks refuse a table stating both).
- Parameters:
table (Table) – A checked MatchClaim table.
context (Mapping[str, Any] | None) – The context under which actors are compared (
actor_context()).
- Returns:
The actors, each the IRI timetoalign compares it as (two spellings of one IRI are one actor), sorted by code point, and three arrays: per row the offset of its first belief (
rows + 1entries, the last the number of beliefs), per belief its actor’s index among the actors and its word’s index inBELIEFS, both in the row’s order.- Return type:
- tilie_server.claim_columns.columns_of(table, manifest)[source]#
The header’s members and the arrays of a checked MatchClaim table.
- Parameters:
- Returns:
rows,timelines,actors(row_beliefs()) andbeliefs(the belief words, a belief’s index naming its word), and the arrays in the answer’s order.- Raises:
Refusal – As
actor_context().- Return type: