Closed dancergraham closed 3 months ago
For some reason commenting out that line seems to allow the library to build correctly. I'm still getting 4 errors, the first one because I have removed all the min and max attributes, the other three because I have removed the format version attributes. These were moved to a separate namespace in version 3
FAILED tests/test_main.py::test_constants - AttributeError: module 'pye57.libe57' has no attribute 'INT8_MIN'
FAILED tests/test_main.py::test_unsupported_point_field - AttributeError: module 'pye57.libe57' has no attribute 'E57_FORMAT_MAJOR'
FAILED tests/test_main.py::test_read_write_single_scan - AttributeError: module 'pye57.libe57' has no attribute 'E57_FORMAT_MAJOR'
FAILED tests/test_main.py::test_copy_file - AttributeError: module 'pye57.libe57' has no attribute 'E57_FORMAT_MAJOR'
Making progress... Adding the new header file for the version clears the version number errors but I now get ErrorValueOutOfBounds errors when writing 0.0 as a datetime in all the same tests...
Ahh got it... This was because e57 double min is the minimum value but DBL min is the minimum positive value
I'm making more progress, I think I just need to fix the return value of variables where the previously used e57 variable type has been removed, e.g.
======================================================================== FAILURES =========================================================================
_____________________________________________________________________ test_constants ______________________________________________________________________
def test_constants():
assert libe57.CHECKSUM_POLICY_NONE == 0
assert libe57.CHECKSUM_POLICY_SPARSE == 25
assert libe57.CHECKSUM_POLICY_HALF == 50
assert libe57.CHECKSUM_POLICY_ALL == 100
assert libe57.E57_INT8_MIN == -128
> assert libe57.E57_INT8_MAX == 127
E AssertionError: assert '\x7f' == 127
E + where '\x7f' = libe57.E57_INT8_MAX
tests\test_main.py:65: AssertionError
================================================================= short test summary info =================================================================
FAILED tests/test_main.py::test_constants - AssertionError: assert '\x7f' == 127
This is now closed ... next step v4!
Version 3 of Libe57Format removes some of the variables used by this wrapper and the line
cls_ImageFile.def("extensionsLookupPrefix", &ImageFile::extensionsLookupPrefix, "prefix"_a, "uri"_a);
seems to cause an error