-
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
Refactor Valkyrie indexer API (to match forms) #6441
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
marrus-sh
force-pushed
the
refactor_indexers
branch
5 times, most recently
from
November 16, 2023 00:23
4af9a27
to
e5fdc14
Compare
marrus-sh
added
notes-major
Release Notes: Potentially breaking changes
notes-valkyrie
Release Notes: Valkyrie specific
labels
Nov 16, 2023
The `app/indexers/` directory is kind of messy, and it’s not clear what is an indexer class and what is a module that indexers can include. Moving these files clarifies the situation.
This is a kind of heavy refactor of the Valkyrie indexer classes to match the API used for forms. This means :— - Using configurable classes, like `Hyrax.config.pcdm_collection_indexer`, instead of hardcoded ones. - Renaming all of the classes to follow a pattern and be namespaced to `Hyrax::Indexers` :— - `Hyrax::ValkyrieIndexer` 🔜 `Hyrax::Indexers::ResourceIndexer`. **Note:** This is a somewhat less‐basic base class, as it includes `Hyrax::ResourceIndexer`. If we still want `Hyrax::ValkyrieIndexer` as a base class which does not utilize `Hyrax::ResourceIndexer`, that’s probably an option. - `Hyrax::PcdmCollectionIndexer` 🔜 `Hyrax::Indexers::PcdmCollectionIndexer`. **Note:** This class has already been renamed once in the past (it was originally `Hyrax::ValkyrieCollectionIndexer`; see 7ca32a5). - `Hyrax::ValkyrieFileSetIndexer` 🔜 `Hyrax::Indexers::FileSetIndexer`. - `Hyrax::ValkyrieWorkIndexer` 🔜 `Hyrax::Indexers::PcdmObjectIndexer`. The old aliases are supported with deprecation warnings. - Implementing `Hyrax::Indexers::ResourceIndexer()` and `Hyrax::Indexers::PcdmObjectIndexer()` to match `Hyrax::Forms::ResourceForm()` and `Hyrax::Forms::PcdmObjectForm()`.
marrus-sh
force-pushed
the
refactor_indexers
branch
from
November 16, 2023 17:39
e5fdc14
to
28c3192
Compare
This is essentially just a find‐and‐replace of `Hyrax::Indexers::ResourceIndexer` in place of `Hyrax::ValkyrieIndexer`
marrus-sh
force-pushed
the
refactor_indexers
branch
from
November 16, 2023 17:46
28c3192
to
9cfa614
Compare
dlpierce
approved these changes
Nov 17, 2023
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.
Thanks for the reorg! This is a welcome cleanup.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
notes-major
Release Notes: Potentially breaking changes
notes-valkyrie
Release Notes: Valkyrie specific
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Note: Because there are some file renames which don’t persist across the full diff, I recommend reviewing each commit in sequence.
This is a kind of heavy refactor of the Valkyrie indexer classes to match the API used for forms. This means :—
Using configurable classes, like
Hyrax.config.pcdm_collection_indexer
, instead of hardcoded ones.Renaming all of the classes to follow a pattern and be namespaced to
Hyrax::Indexers
:—Hyrax::ValkyrieIndexer
🔜Hyrax::Indexers::ResourceIndexer
.Note: This is a somewhat less‐basic base class, as it includes
Hyrax::ResourceIndexer
. If we still wantHyrax::ValkyrieIndexer
as a base class which does not utilizeHyrax::ResourceIndexer
, that’s probably an option.Hyrax::PcdmCollectionIndexer
🔜Hyrax::Indexers::PcdmCollectionIndexer
.Note: This class has already been renamed once in the past (it was originally
Hyrax::ValkyrieCollectionIndexer
; see 7ca32a5).Hyrax::ValkyrieFileSetIndexer
🔜Hyrax::Indexers::FileSetIndexer
.Hyrax::ValkyrieWorkIndexer
🔜Hyrax::Indexers::PcdmObjectIndexer
.The old aliases are supported with deprecation warnings.
Implementing
Hyrax::Indexers::ResourceIndexer()
andHyrax::Indexers::PcdmObjectIndexer()
to matchHyrax::Forms::ResourceForm()
andHyrax::Forms::PcdmObjectForm()
.