Skip to content
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

fix comment grammer #417

Merged
merged 1 commit into from
Feb 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion hsds/util/hdf5dtype.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,14 @@ def __init__(self, bind):
self._objref = weakref.ref(bind)

def __repr__(self):
return "<HDF5 object reference>"
# TBD: this is not consistent with hsds or h5py...
if not isinstance(self._id.id, str):
raise TypeError("Expected string id")
item = None

collection_type = self._id.collection_type
item = f"{collection_type}/{self._id.id}"
return item

def tolist(self):
if type(self._id.id) is not str:
Expand Down
4 changes: 2 additions & 2 deletions hsds/util/idUtil.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def createObjId(obj_type, rootid=None):
token = list(hashlib.sha256(salt.encode()).hexdigest())

if rootid:
# replace first 16 chars of token with first 16 chars of rootid
# replace first 16 chars of token with first 16 chars of root id
root_hex = getIdHexChars(rootid)
token[0:16] = root_hex[0:16]
else:
Expand Down Expand Up @@ -184,7 +184,7 @@ def getS3Key(id):
"db/id[0:16]/d/id[16:32]/x_y_z

For domain id's:
Return a key with the .domain suffix and no preceeding slash.
Return a key with the .domain suffix and no preceding slash.
For non-default buckets, use the format: <bucket_name>/s3_key
If the id has a storage specifier ("s3://", "file://", etc.)
include that along with the bucket name. e.g.: "s3://mybucket/a_folder/a_file.h5"
Expand Down
Loading