-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Add Zenodo file source template #19638
base: dev
Are you sure you want to change the base?
Add Zenodo file source template #19638
Conversation
19fcc07
to
36341c0
Compare
Some record IDs might be just numbers so we make sure they are converted to string as we will only use them for composing the URLs.
To default to regular Zenodo file source where there is no user-provided one.
36341c0
to
a9b9d6e
Compare
It's likely safe to assume we all agree that the use case
makes great sense. I am wondering though if we are abusing the file source templates to this end. There is just one Zenodo (https://zenodo.org/) that is the same for everyone (no private data besides draft records). This is precisely the situation that justifies a server-wide file source. I am relatively new to the project, so I am not sure, but if there is a benefit of having server-wide file sources it must have to do with the URIs.
The first thing that comes to mind is caching, and I am sure there may be other benefits I am overlooking related to interoperability and accessibility. My point is, if we merge a file source template for Zenodo into the Galaxy Project, then we are somehow invalidating the use-case of server-wide file sources (and thus there would be no point in having code that backs it). Maybe what is needed are UI changes. Maybe rather than like this the option should read "Manage File Sources", "Configure locations to import files from and export files to." and show predefined file sources that cannot be deleted and just configured (but maybe can be hidden), of course still keeping the ability to add and delete file sources when it makes sense. |
function getZenodoSource() { | ||
const zenodoSources = getFileSourcesByType("zenodo"); | ||
// Prioritize the one provided by the user in case there are multiple | ||
return zenodoSources.find(isPrivateFileSource) ?? getFileSourceById("zenodo"); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Prioritize the one provided by the user in case there are multiple
I would consider opening a separate PR to prioritize the one provided by the user and in this PR keep things as they are (use the server-wide one if it exists, do not even show to Zenodo tab if it does not exist). Meanwhile people can choose their customized ones via the "to RDM repository tab".
I am suggesting this because looking at the UI I recognize two extra tricky points:
- the link to the user preferences page should point to the file source config, for example https://usegalaxy.eu/file_source_instances/2f666d94-802a-422e-9139-462fde6d5bf8/edit
- if the name of the file source is not shown when there are multiple Zenodo file sources and one of the user-defined ones is prioritized; you do not know where the files are going
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! Those are 2 really good points that I completely overlooked 😅
But I think I can fix them as part of this PR since they are very dependent on this.
@kysrpex I 100% agree, your concerns are exactly the ones I had before creating the template 😆 But I think the main advantage of having both "flavors" server-wide and user-defined plugins is flexibility. Some admins (or Galaxy instances) might decide to provide server-wide access to Zenodo to all their users, while others don't want to "overwhelm" the list of file sources available to their users while letting them set up what is really meaningful for them. |
Depends on #19619 (to avoid conflicts, I will keep it as draft and rebase after the other one is merged)
This adds a new template similar to the one for Invenio but in this case for Zenodo. In theory, you can create a Zenodo File Source instance by using the Invenio one, and everything will work the same, but having its own template allows using it directly in the dedicated export section for histories as we can identify it by its type:
This also avoids having to set up a regular server-wide file source for Zenodo and makes the user experience more consistent by having all their file source instances managed in the same place.
The template interface is pretty similar to the one for Invenio but the server URL is assumed to be https://zenodo.org/
In addition, it includes a fix for Invenio-based instances (like Zenodo) that use numbers for the record identifiers in 1aa8187. It doesn't need a backport because the breaking changes are in dev.
How to test the changes?
License