Closed prjemian closed 2 years ago
Given the first example:
In [7]: path = pathlib.Path("/projects/punx/punx/data/33837rear_1D_1.75_16.5_NXcanSAS_v3.h5")
In [8]: path.suffixes
Out[8]: ['.75_16', '.5_NXcanSAS_v3', '.h5']
then it is this line which is the point of failure in the algorithm: https://github.com/bluesky/tiled/blob/3d269d444311b217af9925b935fdd7ab3773a56c/tiled/adapters/files.py#L647
The assumption here is that an ext
is everything after the first .
(because of multi .
extensions such as .tar.gz
). We can't control that when we serve file directories.
The .h5
file extension is now handled correctly out of the box.
The other more exotic suffixes mentioned about can be handled by a new feature implemented in v0.1.0a67 and documented at https://blueskyproject.io/tiled/how-to/read-custom-formats.html.
With the first two of these files, the correct file extension was not carved away from the full file name (third was just not recognized):
Two of the affected files have several
.
in the file name:The third one is an extension that is not recognized:
Warning is reported by this code: https://github.com/bluesky/tiled/blob/3d269d444311b217af9925b935fdd7ab3773a56c/tiled/adapters/files.py#L664
This line defines
ext
: https://github.com/bluesky/tiled/blob/3d269d444311b217af9925b935fdd7ab3773a56c/tiled/adapters/files.py#L647