prjemian / punx

Python Utilities for NeXus HDF5 files
https://prjemian.github.io/punx
5 stars 7 forks source link

tree: External link file and path displayed as array of char #223

Closed prjemian closed 10 months ago

prjemian commented 10 months ago

While developing a tutorial demonstrating HDF5 master:external file sets, noticed this incorrect rendering of the @file and @path attributes of an h5py.ExternalLink (punx version 0.3.0):


!!! WARNING: this program is not ready for distribution.

/home/prjemian/bluesky/user/external.h5
  g
    a:int64[3] = [1, 2, 3]
      @units = "mm"

!!! WARNING: this program is not ready for distribution.

/home/prjemian/bluesky/user/master.h5
  a:CHAR = b'some text'
  c:int64[3] = [1, 2, 3]
    @units = "mm"

@
f
i
l
e

=

"
e
x
t
e
r
n
a
l
.
h
5
"

@
p
a
t
h

=

"
/
g
/
a
"
  b
    @file = "external.h5"
    @path = "/g"
    a:int64[3] = [1, 2, 3]
      @units = "mm"
prjemian commented 10 months ago

Not seeing it with a more-recent version:

(bluesky_2023_3) prjemian@arf:~/.../prjemian/punx$ git branch -d 231-rebuild-publishing-workflow 
Deleted branch 231-rebuild-publishing-workflow (was 8bbbd8d).
(bluesky_2023_3) prjemian@arf:~/.../prjemian/punx$ punx --version

!!! WARNING: this program is not ready for distribution.

0.3.1.dev120+g7f6c99c
(bluesky_2023_3) prjemian@arf:~/.../prjemian/punx$ punx tree ~/bluesky/user/master.h5 

!!! WARNING: this program is not ready for distribution.

/home/prjemian/bluesky/user/master.h5
  a:CHAR = b'some text'
  b: missing external file
    @file = "external.h5"
    @path = "/g"
  c: missing external file
    @file = "external.h5"
    @path = "/g/a"
(bluesky_2023_3) prjemian@arf:~/.../prjemian/punx$ pushd ~/bluesky/user/
~/bluesky/user ~/Documents/projects/prjemian/punx
(bluesky_2023_3) prjemian@arf:~/bluesky/user$ punx tree ./master.h5 

!!! WARNING: this program is not ready for distribution.

/home/prjemian/bluesky/user/master.h5
  a:CHAR = b'some text'
  c:int64[3] = [1, 2, 3]
    @units = "mm"
    @file = "external.h5"
    @path = "/g/a"
  b
    @file = "external.h5"
    @path = "/g"
    a:int64[3] = [1, 2, 3]
      @units = "mm"
prjemian commented 10 months ago

Write this one off as a transient.