-
Notifications
You must be signed in to change notification settings - Fork 124
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
[wings] Round trip registered valkyrie native classes #4012
Conversation
8fd49b2
to
67fb9bd
Compare
ac966b8
to
1478d9c
Compare
# | ||
# # `Wings` will cast the `BookResource` to a `Book` to persist via `ActiveFedora` | ||
# resource = BookResource.new(author: 'Tove Jansson', title: 'Comet in Moominland') | ||
# adapter = Wings::Valkyrie::MetadataAdapter.new |
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.
i chose to use Wings::Valkyrie::MetadataAdapter.new
here to show this working explicitly with the wings adapter. i guess we could change either this or the Hyrax.persister
on L25, but honestly I'm not thinking it matters. It might be good to show the ways of selecting persisters, and just get better inline documentation for Hyrax.persister
in at the Hyrax level.
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.
Nice implementation!
end | ||
end | ||
|
||
after do | ||
Object.send(:remove_const, :Book) | ||
Object.send(:remove_const, :Image) | ||
Hyrax::Test.send(:remove_const, :QueryService) |
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.
I like this! Makes for easier removal of constants defined in tests.
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.
yeah, we should probably start using Hyrax::Test everywhere test constants are needed
Users will want to define their models with native Valkyrie. This supports a transition by allowing them to define Valkyrie analogues for their existing ActiveFedora models.
👍 |
1478d9c
to
76c704b
Compare
Fixes #3671; supersedes #3937
Users will want to define their models with native Valkyrie. This supports a transition by allowing them to define Valkyrie analogues for their existing ActiveFedora models.
New Valkyrie models need to be registered with
Wings
to cast to the correct ActiveFedora models within Wings. Wings continues to return meta-programmed model objects, but these now subclass the user's native Valkyrie models.Changes proposed in this pull request:
Guidance for testing, such as acceptance criteria or new user interface behaviors:
@samvera/hyrax-code-reviewers