silx
silx copied to clipboard
HDF5 table view bug for virtual datasets in the same file
Closes #3571

The first virtual source is
/data/id21/inhouse/eduardo/out/fitted_EP_701_1_859_12158.h5::/2.1/blisspymca.1/results/parameters/Al_K
Alternatively this could also be
.::/2.1/blisspymca.1/results/parameters/Al_K
I prefer the first (absolute path) because it might not be clear that a "dot" refers to the current file and not to the current directory.
I would use:
os.path.abspath(filename) + firstExtSource[1:]
and
return os.path.join(os.path.dirname(os.path.abspath(filename)), firstExtSource)
if you want absolute paths everywhere.
I would use:
os.path.abspath(filename) + firstExtSource[1:]and
return os.path.join(os.path.dirname(os.path.abspath(filename)), firstExtSource)if you want absolute paths everywhere.
this is a good question. Do we want absolute path everywhere. If we go for it I guess we should add somewhere information regarding if the virtual dataset contains some relative / absolute path. Because this is very convenient to have this information (even if for now it is here only partially because only the first virtual source is checked)
@vasole filename is already an absolute path and it is the file that is open (i.e. the one containing the link, not the destination file). Then firstExtSource is the URI of the destination which is either
/abs/path/to/file.h5::/dataset/in/file(VDS)rel/path/to/file.h5::/dataset/in/file(VDS).::/dataset/in/file(VDS) where the "dot" refers tofilename./abs/path/to/file.edf(RAW EXT)rel/path/to/file.edf(RAW EXT)
Can this be merged? or it needs some rework?
I missed one case
./path/to/file.h5::/dataset/in/file
@woutdenolf does that cause trouble with silx view? Need a bug fix release?
the displayed URL is wrong but it doesn't affect anything else
I'll make a bug fix as soon as I have time.
OK, great! I opened issue #3716 for it for next release, so we don't forget it.