Skip to content

Follow the surface of MEOS master - #113

Merged
estebanzimanyi merged 6 commits into
MobilityDB:masterfrom
estebanzimanyi:fix/template-text-writers
Nov 12, 2026
Merged

estebanzimanyi merged 6 commits into
MobilityDB:masterfrom
estebanzimanyi:fix/template-text-writers

Conversation

@estebanzimanyi

@estebanzimanyi estebanzimanyi commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Write the text of every set, span, span set and temporal value through its template writer

The as_text, str and as_wkt of IntSet, FloatSet, TextSet, DateSet,
TsTzSet, IntSpan, FloatSpan, DateSpan, TsTzSpan, IntSpanSet,
FloatSpanSet, DateSpanSet, TsTzSpanSet, TBool, TInt, TFloat and TText
call the writer of their template, set_out, span_out, spanset_out or
temporal_out, the writer the catalog's typeEncodings names for the text
of each of these types. FloatSet, FloatSpan, FloatSpanSet and TFloat pass
their max_decimals, and the other classes pass 0, the digits their
writers took. No signature changes.

Why. MEOS writes the text of a value with one function per template, and
its API no longer declares the per-type writers dateset_out, floatset_out,
intspan_out, tint_out and the others PyMEOS called, so pymeos failed to
import against the libmeos and the PyMEOS-CFFI of MobilityDB master.

Witness. Against the libmeos and catalog of MobilityDB master c5174b8af1
and PyMEOS-CFFI master dc6fb28, master stops at collection with
"ImportError: cannot import name 'floatset_out' from 'pymeos_cffi'" and
runs no test; on this branch the suite runs 4872 tests, 4827 passing, and
the 45 failing are in functions other than the text writers: the hex WKB
of an STBox, bearing, nearest_approach_distance of a TBox, delete,
ever_touches and the temporal rigid geometry restrictions and accessors.
ruff check and ruff format find nothing.

Call the bearing, the box distance and the rigid geometry functions MEOS declares

TPoint.bearing of a geometry calls bearing_tpoint_point(temp, gs), the
function of that order of its operands. TBox.nearest_approach_distance of
another TBox calls nad_tbox_tbox, which answers an integer and a float
box alike. The accessors, the time restrictions, the deletions, the
appends, set_interp and round of TRgeometry call the generic temporal
function of their name, temporal_instants, temporal_at_timestamptz,
temporal_delete_tstzspan and the 16 others, in place of the
trgeometry_ function they called. No signature changes.

Why. MobilityDB 78ebe3b7fe dropped the invert flag of
bearing_tpoint_point, b51a13407e replaced nad_tboxint_tboxint,
nad_tboxbigint_tboxbigint and nad_tboxfloat_tboxfloat by nad_tbox_tbox,
and 0cf4ad1c4c removed the trgeometry_ twins of the generic temporal
functions, which now answer a temporal rigid geometry, so these calls
stopped with a TypeError or a NameError.

Witness. Against the libmeos of MobilityDB c5174b8af1, the 8 bearing
tests, the 4 nearest_approach_distance tests of a TBox and the 4
trgeometry accessor and gap tests pass, where they failed; the integer
boxes TBOXINT XT([1, 3),[2001-01-01, 2001-01-02]) and
TBOXINT XT([6, 9),[2001-01-01, 2001-01-02]) answer 4.0 and the float
boxes TBOXFLOAT XT([1.5, 3.5],[2001-01-01, 2001-01-02]) and
TBOXFLOAT XT([6, 9],[2001-01-01, 2001-01-02]) 2.5, the values of
b51a13407e. The suite reads 29 failed and 4843 passed, from 45 and 4827.

Regenerate the point and rigid geometry mixins from the catalog of MEOS master

The mixins of TGeomPoint, TGeogPoint and TRgeometry in
pymeos/main/_generated are the output of tools/oo_codegen/codegen.py
--mixin geompoint, geogpoint and rgeo on the catalog of MobilityDB
master. The at and minus of a temporal point name tgeo_at_geom,
tgeo_at_value and their minus twins as their MEOS functions. disjoint,
intersects and is_always_within_distance of a temporal geography point
take a shapely geometry, which they hand to tdisjoint_tgeo_geo,
tintersects_tgeo_geo and adwithin_tgeo_geo as a geography. The at and
minus of a temporal rigid geometry restrict it to a geometry, a value or
a box, and leave a time value and a pose set to Temporal.at and
Temporal.minus, which call temporal_at_timestamptz,
temporal_at_values and their siblings; its disjoint and intersects of a
geometry or another temporal rigid geometry call
tdisjoint_trgeometry_geo, tintersects_trgeometry_geo and their
trgeometry_trgeometry twins.

Why. MobilityDB 6975f3c3bf removed tpoint_at_geom, tpoint_at_value and
their minus twins, which answered what tgeo_at_geom and tgeo_at_value
answer; dd6d5f67c9 gave the temporal geography point its relationships
with a geography; 0cf4ad1c4c removed the trgeometry_at and
trgeometry_minus functions of time values and of value sets, whose
generic temporal functions answer a temporal rigid geometry; and
266f7ed2bb made tIntersects and tDisjoint of a temporal rigid geometry C
functions of MEOS. The committed mixins were the generator's output on
an older catalog and called 10 functions the catalog no longer has.

Witness. On the catalog meos-idl.json of MobilityDB 2c5a8bb595, the
three regenerated mixins equal the generator's output, codegen.py
--check accounts for 5270 of 5270 functions with the six families
present, and the 4 subtests of test_oo_codegen_coverage and the 4
trgeometry restriction tests pass, where they failed. The suite reads
21 failed and 4847 passed, from 29 and 4843. ruff check and ruff format
find nothing.

Expect the answers of MEOS master in the WKB, delete, touches and rigid geometry tests

The hex WKB of an STBox states the type of the box after the byte-order
byte, 1900 in little-endian, so the STBox X((1,1),(2,2)) of the tests
writes 01190001000000000000F03F0000000000000040000000000000F03F0000000000000040,
the hex of the MobilityDB manual for asHexWKB of that box, and the Z, T,
XT and ZT boxes write their body after the same code.

delete of the first timestamp of a sequence, with the default connect,
answers the value from its second instant on, the bound inclusive: the
sequence [1@2019-09-01, 2@2019-09-02] of TInt gives [2@2019-09-02], and
the sequence set gives {[2@2019-09-02],[1@2019-09-03, 1@2019-09-05]},
for TBool, TInt, TFloat, TText, TGeomPoint and TGeogPoint alike.

ever_touches of a temporal point and Point(1 1) is False for every
subtype, a point touching a geometry where it lies on the boundary of
the geometry and a point having an empty boundary; the same values touch
the unit square, whose corner Point(1 1) they all stand on, and the test
asserts that too.

The ever and always relationship tests of TRgeometry read contains,
covered by, covers and touches on the body placed at the poses of the
sequence held with step interpolation, read disjoint, within distance
and intersects on the body in linear motion, and assert that contains of
the body in linear motion raises MeosInvalidArgValueError.

Why. MobilityDB 721bb8a350 has the WKB of every box state its type;
7e13618f6c deletes a timestamp as the timestamp set of one element,
connect joining the instants around it, which its 50 expected outputs
and meos/test/delete_timestamptz_test.c state; dc7040170f answers
eTouches(tgeompoint, geometry 'Point(1 1)') false, as
070_tpoint_spatialrels expects since; and cf60d0866c refuses contains,
covers and touches of a temporal rigid geometry in linear motion, which
moves and turns between its instants, as 154_trgeo_spatialrels expects
with "Operation not supported for temporal values with linear
interpolation". The tests expected the answers of MEOS before these
commits.

Witness. Against the libmeos of MobilityDB c5174b8af1, stbox_as_hexwkb
of the five boxes answers each former string with 1900 after its first
byte; temporal_delete_timestamptz of tint
'[1@2001-01-01, 2@2001-01-02, 1@2001-01-03]' at 2001-01-01 with connect
answers [2@2001-01-02, 1@2001-01-03], the expected output of
022_temporal, and at 2019-09-01 on the test's sequence it answers what
temporal_delete_tstzset of {2019-09-01} answers; etouches_tpoint_geo
answers 0 on the two inputs of 070_tpoint_spatialrels that expect f and 1
on the triangle that expects t, and GEOS answers Point(1 1) touches
Point(1 1) false; the 22 relationship assertions of TRgeometry answer as
the tests state on the step body, and the 10 contains, covers and touches
ones raise on the linear body. The suite reads 4868 passed, 0 failed and
0 skipped, from 21 failed and 4847 passed. ruff check and ruff format
find nothing.

Expect the insertion into a temporal sequence set connected as connect says

test_insert[SequenceSet] of tbool, tfloat, tgeogpoint, tgeompoint, tint and ttext reads the insertion of an instant sequence one day after the last sequence of the set, with connect, as that sequence extended to it, {[1@2019-09-01, 2@2019-09-02],[1@2019-09-03, 1@2019-09-06]} for tint, as temporal_insert answers since MobilityDB 82458a3238 (Insert a temporal sequence set connecting its sequences as connect says) and as test_insert[Sequence] reads the insertion into a sequence.

Witness. Against the libmeos of MobilityDB master 7eb4ef3446 with the insertion of an instant on the exclusive lower bound of a sequence (MobilityDB #3626), the whole suite passes 4868 of 4868; against master alone, test_insert passes and the six test_update[SequenceSet] fail, which insert the instant on that bound.

Expect the geodetic meeting at noon on every platform

test_temporal_equal_temporal[Sequence] and [SequenceSet] of tgeogpoint read the meeting of a temporal geography point and its reverse at 12:00 on every platform, with no expected failure on arm64, as temporal_eq answers since MobilityDB 919c0d1b58 (Answer the meeting of two temporal geography points on the one point they meet at), which evaluates both values on the one point they meet at.

Witness. The strict expected failure fails the run on macos-15 arm64 against MobilityDB master 98a8fbea45, both tests passing there. Against the libmeos of that master on x86-64, the whole suite passes 4868 of 4868, and ruff check and ruff format find nothing.

…h its template writer

The as_text, __str__ and as_wkt of IntSet, FloatSet, TextSet, DateSet,
TsTzSet, IntSpan, FloatSpan, DateSpan, TsTzSpan, IntSpanSet,
FloatSpanSet, DateSpanSet, TsTzSpanSet, TBool, TInt, TFloat and TText
call the writer of their template, set_out, span_out, spanset_out or
temporal_out, the writer the catalog's typeEncodings names for the text
of each of these types. FloatSet, FloatSpan, FloatSpanSet and TFloat pass
their max_decimals, and the other classes pass 0, the digits their
writers took. No signature changes.

Why. MEOS writes the text of a value with one function per template, and
its API no longer declares the per-type writers dateset_out, floatset_out,
intspan_out, tint_out and the others PyMEOS called, so pymeos failed to
import against the libmeos and the PyMEOS-CFFI of MobilityDB master.

Witness. Against the libmeos and catalog of MobilityDB master c5174b8af1
and PyMEOS-CFFI master dc6fb28, master stops at collection with
"ImportError: cannot import name 'floatset_out' from 'pymeos_cffi'" and
runs no test; on this branch the suite runs 4872 tests, 4827 passing, and
the 45 failing are in functions other than the text writers: the hex WKB
of an STBox, bearing, nearest_approach_distance of a TBox, delete,
ever_touches and the temporal rigid geometry restrictions and accessors.
ruff check and ruff format find nothing.
…EOS declares

TPoint.bearing of a geometry calls bearing_tpoint_point(temp, gs), the
function of that order of its operands. TBox.nearest_approach_distance of
another TBox calls nad_tbox_tbox, which answers an integer and a float
box alike. The accessors, the time restrictions, the deletions, the
appends, set_interp and round of TRgeometry call the generic temporal
function of their name, temporal_instants, temporal_at_timestamptz,
temporal_delete_tstzspan and the 16 others, in place of the
trgeometry_<x> function they called. No signature changes.

Why. MobilityDB 78ebe3b7fe dropped the invert flag of
bearing_tpoint_point, b51a13407e replaced nad_tboxint_tboxint,
nad_tboxbigint_tboxbigint and nad_tboxfloat_tboxfloat by nad_tbox_tbox,
and 0cf4ad1c4c removed the trgeometry_<x> twins of the generic temporal
functions, which now answer a temporal rigid geometry, so these calls
stopped with a TypeError or a NameError.

Witness. Against the libmeos of MobilityDB c5174b8af1, the 8 bearing
tests, the 4 nearest_approach_distance tests of a TBox and the 4
trgeometry accessor and gap tests pass, where they failed; the integer
boxes TBOXINT XT([1, 3),[2001-01-01, 2001-01-02]) and
TBOXINT XT([6, 9),[2001-01-01, 2001-01-02]) answer 4.0 and the float
boxes TBOXFLOAT XT([1.5, 3.5],[2001-01-01, 2001-01-02]) and
TBOXFLOAT XT([6, 9],[2001-01-01, 2001-01-02]) 2.5, the values of
b51a13407e. The suite reads 29 failed and 4843 passed, from 45 and 4827.
…OS master

The mixins of TGeomPoint, TGeogPoint and TRgeometry in
pymeos/main/_generated are the output of tools/oo_codegen/codegen.py
--mixin geompoint, geogpoint and rgeo on the catalog of MobilityDB
master. The at and minus of a temporal point name tgeo_at_geom,
tgeo_at_value and their minus twins as their MEOS functions. disjoint,
intersects and is_always_within_distance of a temporal geography point
take a shapely geometry, which they hand to tdisjoint_tgeo_geo,
tintersects_tgeo_geo and adwithin_tgeo_geo as a geography. The at and
minus of a temporal rigid geometry restrict it to a geometry, a value or
a box, and leave a time value and a pose set to Temporal.at and
Temporal.minus, which call temporal_at_timestamptz,
temporal_at_values and their siblings; its disjoint and intersects of a
geometry or another temporal rigid geometry call
tdisjoint_trgeometry_geo, tintersects_trgeometry_geo and their
trgeometry_trgeometry twins.

Why. MobilityDB 6975f3c3bf removed tpoint_at_geom, tpoint_at_value and
their minus twins, which answered what tgeo_at_geom and tgeo_at_value
answer; dd6d5f67c9 gave the temporal geography point its relationships
with a geography; 0cf4ad1c4c removed the trgeometry_at and
trgeometry_minus functions of time values and of value sets, whose
generic temporal functions answer a temporal rigid geometry; and
266f7ed2bb made tIntersects and tDisjoint of a temporal rigid geometry C
functions of MEOS. The committed mixins were the generator's output on
an older catalog and called 10 functions the catalog no longer has.

Witness. On the catalog meos-idl.json of MobilityDB 2c5a8bb595, the
three regenerated mixins equal the generator's output, codegen.py
--check accounts for 5270 of 5270 functions with the six families
present, and the 4 subtests of test_oo_codegen_coverage and the 4
trgeometry restriction tests pass, where they failed. The suite reads
21 failed and 4847 passed, from 29 and 4843. ruff check and ruff format
find nothing.
…id geometry tests

The hex WKB of an STBox states the type of the box after the byte-order
byte, 1900 in little-endian, so the STBox X((1,1),(2,2)) of the tests
writes 01190001000000000000F03F0000000000000040000000000000F03F0000000000000040,
the hex of the MobilityDB manual for asHexWKB of that box, and the Z, T,
XT and ZT boxes write their body after the same code.

delete of the first timestamp of a sequence, with the default connect,
answers the value from its second instant on, the bound inclusive: the
sequence [1@2019-09-01, 2@2019-09-02] of TInt gives [2@2019-09-02], and
the sequence set gives {[2@2019-09-02],[1@2019-09-03, 1@2019-09-05]},
for TBool, TInt, TFloat, TText, TGeomPoint and TGeogPoint alike.

ever_touches of a temporal point and Point(1 1) is False for every
subtype, a point touching a geometry where it lies on the boundary of
the geometry and a point having an empty boundary; the same values touch
the unit square, whose corner Point(1 1) they all stand on, and the test
asserts that too.

The ever and always relationship tests of TRgeometry read contains,
covered by, covers and touches on the body placed at the poses of the
sequence held with step interpolation, read disjoint, within distance
and intersects on the body in linear motion, and assert that contains of
the body in linear motion raises MeosInvalidArgValueError.

Why. MobilityDB 721bb8a350 has the WKB of every box state its type;
7e13618f6c deletes a timestamp as the timestamp set of one element,
connect joining the instants around it, which its 50 expected outputs
and meos/test/delete_timestamptz_test.c state; dc7040170f answers
eTouches(tgeompoint, geometry 'Point(1 1)') false, as
070_tpoint_spatialrels expects since; and cf60d0866c refuses contains,
covers and touches of a temporal rigid geometry in linear motion, which
moves and turns between its instants, as 154_trgeo_spatialrels expects
with "Operation not supported for temporal values with linear
interpolation". The tests expected the answers of MEOS before these
commits.

Witness. Against the libmeos of MobilityDB c5174b8af1, stbox_as_hexwkb
of the five boxes answers each former string with 1900 after its first
byte; temporal_delete_timestamptz of tint
'[1@2001-01-01, 2@2001-01-02, 1@2001-01-03]' at 2001-01-01 with connect
answers [2@2001-01-02, 1@2001-01-03], the expected output of
022_temporal, and at 2019-09-01 on the test's sequence it answers what
temporal_delete_tstzset of {2019-09-01} answers; etouches_tpoint_geo
answers 0 on the two inputs of 070_tpoint_spatialrels that expect f and 1
on the triangle that expects t, and GEOS answers Point(1 1) touches
Point(1 1) false; the 22 relationship assertions of TRgeometry answer as
the tests state on the step body, and the 10 contains, covers and touches
ones raise on the linear body. The suite reads 4868 passed, 0 failed and
0 skipped, from 21 failed and 4847 passed. ruff check and ruff format
find nothing.
@estebanzimanyi
estebanzimanyi force-pushed the fix/template-text-writers branch from 32c8f01 to c3d8729 Compare November 12, 2026 22:59
…t says

test_insert[SequenceSet] of tbool, tfloat, tgeogpoint, tgeompoint, tint and ttext reads the insertion of an instant sequence one day after the last sequence of the set, with connect, as that sequence extended to it, {[1@2019-09-01, 2@2019-09-02],[1@2019-09-03, 1@2019-09-06]} for tint, as temporal_insert answers since MobilityDB 82458a3238 (Insert a temporal sequence set connecting its sequences as connect says) and as test_insert[Sequence] reads the insertion into a sequence.

Witness. Against the libmeos of MobilityDB master 7eb4ef3446 with the insertion of an instant on the exclusive lower bound of a sequence (MobilityDB #3626), the whole suite passes 4868 of 4868; against master alone, test_insert passes and the six test_update[SequenceSet] fail, which insert the instant on that bound.
test_temporal_equal_temporal[Sequence] and [SequenceSet] of tgeogpoint read the meeting of a temporal geography point and its reverse at 12:00 on every platform, with no expected failure on arm64, as temporal_eq answers since MobilityDB 919c0d1b58 (Answer the meeting of two temporal geography points on the one point they meet at), which evaluates both values on the one point they meet at.

Witness. The strict expected failure fails the run on macos-15 arm64 against MobilityDB master 98a8fbea45, both tests passing there. Against the libmeos of that master on x86-64, the whole suite passes 4868 of 4868, and ruff check and ruff format find nothing.
@estebanzimanyi
estebanzimanyi force-pushed the fix/template-text-writers branch from c3d8729 to be543fc Compare November 12, 2026 23:29
@estebanzimanyi
estebanzimanyi merged commit 3dd9b21 into MobilityDB:master Nov 12, 2026
8 checks passed
@estebanzimanyi
estebanzimanyi deleted the fix/template-text-writers branch November 12, 2026 23:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant