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

A simple/model implementation of being able to obtain harvested metadata records unparsed, as Strings #285

Draft
wants to merge 7 commits into
base: branch-5.0
Choose a base branch
from

Conversation

landreev
Copy link
Collaborator

@landreev landreev commented Feb 6, 2025

As the title says, this is a "model" implementation - primarily to illustrate what I want the final result to be on the application side.
I expect that it will likely need to be implemented differently before the PR can be merged. I'm happy to work on a cleaner/better implementation.

Copy link
Member

@pdurbin pdurbin left a comment

Choose a reason for hiding this comment

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

I didn't run this but it seems reasonable to me.

@poikilotherm poikilotherm marked this pull request as draft February 27, 2025 09:08
@poikilotherm poikilotherm added enhancement New feature or request service-provider Related to Service Provider implementation labels Feb 27, 2025
Copy link
Member

@poikilotherm poikilotherm left a comment

Choose a reason for hiding this comment

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

We should talk about this some more. I think there is a cleaner way to do this, maybe using the existing CopyElement or adding a new RawElement.

See

and its usages in the data provider code parts. It seems the use cases are quite similar.

Also, this PR does not yet contain any unit tests. It might be interesting to see some benchmark tests as well to compare different approaches.

@landreev
Copy link
Collaborator Author

landreev commented Mar 3, 2025

Yes, sure, happy to talk about it this week.

I think there is a cleaner way to do this, maybe using the existing CopyElement or ...

The way I implemented it, using the existing EchoElement seemed like the easiest way to go about it at the moment. (What we did with CopyElement in the data provider was specifically in order to allow passing an InputStream to a metadata fragment cached in storage; and that seems like an overkill for what's needed here). But let me take another look.

Yes, I will add a test shortly.

@landreev
Copy link
Collaborator Author

landreev commented Mar 3, 2025

I really like the xoai-data-provider-tck subsystem. You suggested at some point that this approach could be used for testing OAI functionality in Dataverse and I am considering implementing something similar.
I am however getting one strange validation failure when running it locally:

### Checking GetRecord response
...
FAIL:    Expected setSpec was missing from the response. The GetRecord response for identifier IdFgUHOANT did not contain a set specification for test1

(everything else appears to be passing).
It is passing when the PR is tested here on github:

PASS:    Expected setSpec was returned in the response

I'm puzzled as to what's going on - ?

@landreev
Copy link
Collaborator Author

landreev commented Mar 4, 2025

If you feel strongly about it, please let me know and I'll be happy to change the code to use CopyElement instead. Having taken another look at the classes, it doesn't seem like it's going to be much simpler/require fewer changes, but either way is ok with me.

@landreev
Copy link
Collaborator Author

landreev commented Mar 6, 2025

Can we talk about this sometime soon?

@poikilotherm
Copy link
Member

poikilotherm commented Mar 7, 2025

Let's do a VC call tomorrow! Ping me on Zulip, I don't have any appointments tomorrow. (I wasn't paying attention to this thread, halfway expecting you to ping me via DM again. Sorry!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request service-provider Related to Service Provider implementation
Projects
None yet
3 participants