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

upsert dataset methods and new backend #19

Open
dylanmcreynolds opened this issue Jun 3, 2022 · 4 comments
Open

upsert dataset methods and new backend #19

dylanmcreynolds opened this issue Jun 3, 2022 · 4 comments

Comments

@dylanmcreynolds
Copy link
Collaborator

@abigailalexander recently added upsert functionality into pyscicat. I'm trying to add support for the new backend into pyscicat. One issue that upsert has not been implemented. I'm curious how much we should push to get it in, or if the use cases could be accomplished with a patch?

I've submitted an issue to track this in the new backend project SciCatProject/scicat-backend-next#93

@dylanmcreynolds
Copy link
Collaborator Author

At the developer meeting, we discussed whether the new backend would support upsert, and the answer was no, it will not. Therefore, we decided to remove it from the pyscicat code. Some code at RFI will be have to be rewritten to accommodate this change.

@abigailalexander
Copy link

I see, thank you for the update on the developer meeting and apologies I couldn't make it. I had a quick look at the new scicat backend and it looks like it still makes use of an update dataset method. For us, an update/patch dataset method would most likely cover the use cases that upsert is used for and would hopefully be compatible with both current and next scicat backends.

@nitrosx nitrosx mentioned this issue Jun 16, 2022
@toqduj
Copy link
Collaborator

toqduj commented Nov 9, 2022

is there a convenience method perhaps to check if a dataset exists (creating a new one if not and updating if yes)?

@dylanmcreynolds
Copy link
Collaborator Author

Right now there is no method in the server that just checks for the existence. If you know the PID of the dataset, you can use a GET on /datasets/{id}. That will return the dataset with a 200 or a 404 if not there.

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

No branches or pull requests

3 participants