timetoshare.validation.representation#

Finite-number and own-axis representation rules.

timetoshare.validation.representation.rewritten(value, number_type)[source]#

Return an exact rewriting in number_type, or None.

timetoshare.validation.representation.representation_problems(manifest)[source]#

Yield own-axis representation violations in manifest order.

The timelines first (a flow-control element’s coordinate, then the by of its ends and of each destination and its after), then the coordinate of every named timestamp on a timeline of the manifest or a virtual timeline, then the start, end and width span of every elision on one, then the gaps of every FlowMap of a timeline of the manifest, each read as that timeline’s number type, then the length of every virtual timeline, read as its own.

timetoshare.validation.representation.plainly_finite(value)[source]#

Whether value is plain JSON data whose every float is finite.

Plain JSON data is made of dict, list, str, int, float, bool and None alone. Where this answers True, finite_number_problems() yields nothing for value and for any copy of it that only rewrites its strings; False means only that the rule must run.

timetoshare.validation.representation.finite_number_problems(value, path=(), owner_id=None, owner_key=None)[source]#

Yield non-finite float leaves before schema validation.