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

Feature/extend item crud operations #42

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

mdwRepository
Copy link

The pull request mainly addresses the Add dedicated patch and delete item functions issue #41

Please note: The pull request also includes an enhanced get_item Method in DSpaceClient, which returns an item object and handles errors. (see issue #29)

The modified the get_item method:

  • Returns an instance of the Item class instead of the raw API response.
  • Handles errors appropriately (e.g., invalid UUID, non-200 status codes, unexpected response structure).

@@ -487,7 +487,7 @@ def search_objects(
size=20,
sort=None,
dso_type=None,
configuration='default',
configuration="default",
Copy link
Contributor

Choose a reason for hiding this comment

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

@kshepherd How much do we care about having a clean git blame?

I would strongly prefer at the very least that mere formatting changes like this be in their own commit. (I assume this is a black thing?)

# Handle successful response
if response.status_code == 200:
# Parse the response JSON into an Item object
return self._construct_item(response.json())
Copy link
Contributor

Choose a reason for hiding this comment

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

Fixes #29

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh: this is a breaking API change so we should bump to version 0.2 after merging this

@dpk
Copy link
Contributor

dpk commented Jan 9, 2025

Thanks for this!

@kshepherd, who is the main maintainer of this library, is still on holiday right now, so it'll be another week or so yet before this gets approved, but I've noted one minor nit. I haven't fully reviewed and tested the new PATCH code yet but it looks great!

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.

3 participants