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

Multi-Link API #203

Merged
merged 6 commits into from
Jun 7, 2024
Merged

Multi-Link API #203

merged 6 commits into from
Jun 7, 2024

Conversation

mattjala
Copy link
Contributor

Adds support for the multi-link operations added in HSDS 0.9.0.

  • group.get() now accepts marker, limit, follow_links, and pattern parameters, and targets the GET_Links endpoint if no link names are provided.
  • group.__delitem__ and group.__setitem__ support removing and creating multiple links in one request, if a list of link names is provided.

@mattjala mattjala requested a review from jreadey May 20, 2024 19:57
@mattjala mattjala self-assigned this May 20, 2024
@jreadey
Copy link
Member

jreadey commented May 21, 2024

Can we provide the ability to fetch multiple links based on a set of link names?


return link_obj

def get(self, name, default=None, getclass=False, getlink=False, track_order=False, **kwds):
Copy link
Member

Choose a reason for hiding this comment

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

The description for "name" seems incorrect.

Copy link
Member

Choose a reason for hiding this comment

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

For methods that aren't intended to be called outside the class, let's prepend with "_".

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think the description for name-only operation is accurate - it makes a _getitem_ call, returning the item that the link points to if it exists, or default if it doesn't.

test/hl/test_group.py Outdated Show resolved Hide resolved
test/hl/test_group.py Outdated Show resolved Hide resolved
@mattjala
Copy link
Contributor Author

mattjala commented Jun 6, 2024

Can we provide the ability to fetch multiple links based on a set of link names?

Done, see "Retrieve a set of links by name" section in test_group.py

@jreadey jreadey merged commit 98c80f4 into HDFGroup:master Jun 7, 2024
0 of 10 checks passed
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