ImperialCollegeLondon / safedata_validator

Python tools to validate and publish datasets using the safedata metadata format.
https://safedata-validator.readthedocs.io/
MIT License
2 stars 4 forks source link

Fix XML distribution flow #136

Closed davidorme closed 2 months ago

davidorme commented 2 months ago

This PR closes #112

davidorme commented 2 months ago

@jacobcook1995 Apparently something is different in 3.11!

jacobcook1995 commented 2 months ago

Oh and also the test failures for python 3.11 look really strange? Like I ran them locally with python 3.11 and everything passed, but on the GitHub runners it seems like literally every test failed

davidorme commented 2 months ago

but on the GitHub runners it seems like literally every test failed

And all in the same way across platforms: ERROR test/test_summary.py::test_core[valid core] - TypeError: expected str, bytes or os.PathLike object, not _GeneratorContextManager

davidorme commented 2 months ago

The issue turned out to be with the importlib.resources.paths method (which is deprecated) and on exactly what gets returned by importlib.resources.files().joinpath(): Traversable not Path, and although Path is compatible, the attributes blah blah blah. It is not an obvious interface.