Skip to content

added objid functions #79

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

added objid functions #79

wants to merge 6 commits into from

Conversation

jreadey
Copy link
Member

@jreadey jreadey commented Feb 4, 2025

Added objid functions to replace uuid package calls in h5db.

@jreadey jreadey requested a review from ajelenak February 4, 2025 23:15
if name == "ref":
dt = None
if val is Reference:
dt = np.dtype("S48", metadata={"ref": Reference})
Copy link

@mattjala mattjala May 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are references represented as 48-character strings? Is this adhering to some constraint of how h5py represents them? If the specific length is important, it would be nice to use a named constant to make this clear.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks to be the length of an object ID, so it should definitely referenced a hardcoded constant value

@@ -291,14 +392,13 @@ def getTypeItem(dt):
if dt.base.byteorder == ">":
byteorder = "BE"

# numpy integer type - but check to see if this is the h5py
# numpy integer type - but check to see if this is the hypy
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hypy -> h5py

Validate a json type - call createDataType and if no exception,
it's valid
"""
createDataType(typeItem)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

validateTypeItem needs to catch the potential exception raised by createDataType.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants