-
Notifications
You must be signed in to change notification settings - Fork 5
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
LIBHYDRA-573. Remove Archelon vocabulary management functionality #397
Merged
peichman-umd
merged 19 commits into
umd-lib:develop
from
dsteelma-umd:feature/LIBHYDRA-573
Apr 10, 2024
Merged
LIBHYDRA-573. Remove Archelon vocabulary management functionality #397
peichman-umd
merged 19 commits into
umd-lib:develop
from
dsteelma-umd:feature/LIBHYDRA-573
Apr 10, 2024
+251
−1,717
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
Removed the "Vocabularies" link from the "Manage" drop-down menu as the minimal "remove Vocabulary" change, and to prepare for removing the Vocabulary functionality entirely. https://umd-dit.atlassian.net/browse/LIBHYDRA-573
Added a "Vocab" object that retrieves vocabulary information from the vocabulary server. Methods have been added to the "Vocab" object to make it a "drop-in" replacement of the Vocabulary model in the non-Vocabulary code. Refactored "VocabService" to support the "Vocab" object, pulling out the "vocab_options_hash_by_identifier" method to retrieve an unfiltered vocabulary based solely on the vocabulary identifier. https://umd-dit.atlassian.net/browse/LIBHYDRA-573
Refactored non-Vocabulary code that used the "Vocabulary" model with calls to the "Vocab" object. https://umd-dit.atlassian.net/browse/LIBHYDRA-573
Removed the following models, and related controller, test, and other related files: * Vocabulary * Type * Individual * Datatype Removed related I18n settings from "en.yml" Updated "app/models/import_job.rb" to properly call the "Vocab.find_by" method. https://umd-dit.atlassian.net/browse/LIBHYDRA-573
* Removed "VocabularyEditors" from CAS authentication and LDAP lookup * Removed "VocabularyEditors" permission checking * Removed additional I18n terms * Removed development database seeding of Vocabulary/Datatype tables * Removed unnecessary test fixtures * Removed unnecessary CSS definitions * Modified the "cas_authorization_test" to verify case-insensitive group name matches using the "Administrators" group * Removed "vocab:import" Rake task documentation https://umd-dit.atlassian.net/browse/LIBHYDRA-573
Removed "Vocab.all" method because there is no way to retrieve a list of all the vocabularies from the vocabulary server. The "all" method is only used on the "react_components" page, and so modified that page with a list of sample vocabularies to display. https://umd-dit.atlassian.net/browse/LIBHYDRA-573
Moved "Vocab" class to be a nested class in "VocabService". Moved class methods in "Vocab" into the "VocabService" class and updated code. Refactored code that used the "Vocab" class to use "VocabService::Vocab". https://umd-dit.atlassian.net/browse/LIBHYDRA-573
Removed routes from "routes.rb" for Vocabulary, Type, Individual, and Datatype models and controllers that have been removed. https://umd-dit.atlassian.net/browse/LIBHYDRA-573
Simplified VocabService class and associated Vocab class, removing unnecessary methods and simplifying the interface as much as possible. https://umd-dit.atlassian.net/browse/LIBHYDRA-573
Also renamed "VocabService.find_by" to "VocabService.get_vocabulary" and simplified the interfaces as much as possible. https://umd-dit.atlassian.net/browse/LIBHYDRA-573
The "Vocab*" classes (VocabService, Vocab, VocabTerm) were originally named "Vocab" to distinguish them from the exsting "Vocabulary" model class. After discussions with Peter Eichman, now that the "Vocabulary" model has been removed, would like the new classes to use "Vocabulary" instead of "Vocab" to be more consistent with the class naming in Grove. https://umd-dit.atlassian.net/browse/LIBHYDRA-573
Replaced the "filtered_options" method in "VocabularyService" with "filtered_terms" method, which is more generic, and potentially more useful. https://umd-dit.atlassian.net/browse/LIBHYDRA-573
Added a "terms?" method that returns true only if a Vocabulary has one or more terms. Replaced instances of "vocab.nil?" in the codebase, (reversing the logic) with "vocab.terms?", as the VocabularyService will always return a non-nil Vocabulary object. https://umd-dit.atlassian.net/browse/LIBHYDRA-573
Removed the "VOCAB_PUBLICATION_BASE_URI" environment variable as it is no longer used. https://umd-dit.atlassian.net/browse/LIBHYDRA-573
The "public/published_vocabularies" directory is no longer needed, and so has been removed. Also removed the "public/published_vocabularies" configuration in the ".gitignore" file, to highlight any files the user might have for deletion. Left the "public/published_vocabularies" configuration in the ".dockerignore" file for the moment, to ensure that any lingering contents in that directory will never be added to a Docker image. https://umd-dit.atlassian.net/browse/LIBHYDRA-573
Added documentation about the Vocabulary functionality in Archelon and related configuration. https://umd-dit.atlassian.net/browse/LIBHYDRA-573
77e9ca4
to
b4ceb01
Compare
Loading status checks…
b4ceb01
to
7d52cbf
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Removed the following Rails models related to the Archelon vocabulary management functionality, as well as associated controllers, tests, views, routes, and other configuration:
The Archelon functionality needed to retrieve a vocabulary from the vocabulary server, and various parsing and display functions were added in the following new classes:
To simplify the client code, the classes are designed using “null object” pattern, in that the VocabularyService will always return a valid Vocabulary object, even when a vocabulary does not exist, or a network error occurs – it will simply be a vocabulary with an empty list of VocabularyTerms. A “terms?” method has been added to verify whether or not a Vocabulary object actually has terms.
The VocabularyTerm object currently only allows a single “same_as” value to be associated with a vocabulary term. Based on discussions with Peter Eichman, while LIBHYDRA-390 suggests that multiple “same_as” values for a single vocabulary term may eventually be supported, it was not necessary to add that functionality at this time.
A database migration to drop the “vocabulary”, “type”, “datatype”, and “individual” database tables is not included in this issue (see LIBHYDRA-574). This is to give us time to evaluate the Grove vocabulary management application, and the Archelon changes before permanently deleting the database tables in production.
Additional Cleanup
The following were also removed as part of a general cleanup (they were typically no longer relevant even before this issue):
https://umd-dit.atlassian.net/browse/LIBHYDRA-573