From dabd4197c524e00852997305a5d5698bcbfefec0 Mon Sep 17 00:00:00 2001 From: Kirk Wang Date: Mon, 24 Jun 2024 10:22:48 -0700 Subject: [PATCH 01/46] Update Hyrax branch We are updating Hyku's Hyrax branch to `flexible_double_combo` which contains: - `double_combo` - `flexible_metadata` - `metadata-profiles-ui` - `select-admin-set-prior-to-worktype` This is a temporary change so we can move on with Hyku devleopment while we wait for PRs to get merged into Hyrax. --- Gemfile | 2 +- Gemfile.lock | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Gemfile b/Gemfile index b492a53f1..30d17736c 100644 --- a/Gemfile +++ b/Gemfile @@ -51,7 +51,7 @@ gem 'good_job', '~> 2.99' gem 'googleauth', '~> 1.9.0' gem 'google-protobuf', force_ruby_platform: true # required because google-protobuf is not compatible with Alpine linux gem 'grpc', force_ruby_platform: true # required because google-protobuf is not compatible with Alpine linux -gem 'hyrax', github: 'samvera/hyrax', branch: 'double_combo' +gem 'hyrax', github: 'samvera/hyrax', branch: 'flexible_double_combo' gem 'hyrax-doi', github: 'samvera-labs/hyrax-doi', branch: 'rails_hyrax_upgrade' gem 'hyrax-iiif_av', github: 'samvera-labs/hyrax-iiif_av', branch: 'rails_hyrax_upgrade' gem 'i18n-debug', require: false, group: %i[development test] diff --git a/Gemfile.lock b/Gemfile.lock index 339a977f4..d7f6ff8cb 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -147,8 +147,8 @@ GIT GIT remote: https://github.com/samvera/hyrax.git - revision: 6447872e0bcea17abfc1aab477f2eea57639298f - branch: double_combo + revision: 8b95caf61771403aefdfe1bf74241c024818c2c9 + branch: flexible_double_combo specs: hyrax (5.0.1) active-fedora (~> 14.0) @@ -168,6 +168,7 @@ GIT dry-logic (~> 1.5) dry-monads (~> 1.6) dry-validation (~> 1.10) + faraday (= 2.9.1) flipflop (~> 2.3) flot-rails (~> 0.0.6) font-awesome-rails (~> 4.2) @@ -586,10 +587,8 @@ GEM factory_bot_rails (6.4.2) factory_bot (~> 6.4) railties (>= 5.0.0) - faraday (2.7.12) - base64 - faraday-net_http (>= 2.0, < 3.1) - ruby2_keywords (>= 0.0.4) + faraday (2.9.1) + faraday-net_http (>= 2.0, < 3.2) faraday-encoding (0.0.5) faraday faraday-excon (2.1.0) From 9b63fe1d15c6db71d1e0d38b037610e715580f1b Mon Sep 17 00:00:00 2001 From: Shana Moore Date: Mon, 1 Jul 2024 10:41:46 -0700 Subject: [PATCH 02/46] Update Hyrax --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index d7f6ff8cb..697b195fd 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -147,7 +147,7 @@ GIT GIT remote: https://github.com/samvera/hyrax.git - revision: 8b95caf61771403aefdfe1bf74241c024818c2c9 + revision: 9e65f4a91ff44ba889ba9f5413e94d8be63cc668 branch: flexible_double_combo specs: hyrax (5.0.1) From 77a0198e31a146ace5a60073bb8e578323258b30 Mon Sep 17 00:00:00 2001 From: Shana Moore Date: Mon, 1 Jul 2024 12:10:07 -0700 Subject: [PATCH 03/46] Add HYRAX_FLEXIBLE env var and Hyrax.config.flexible? guards --- .env | 3 +- app/forms/collection_resource_form.rb | 6 +- app/forms/etd_resource_form.rb | 6 +- app/forms/generic_work_resource_form.rb | 10 +- .../forms/pcdm_collection_form_decorator.rb | 4 +- app/forms/image_resource_form.rb | 10 +- app/forms/oer_resource_form.rb | 6 +- app/indexers/collection_resource_indexer.rb | 6 +- app/indexers/etd_resource_indexer.rb | 10 +- app/indexers/generic_work_resource_indexer.rb | 10 +- app/indexers/image_resource_indexer.rb | 10 +- app/indexers/oer_resource_indexer.rb | 10 +- app/models/collection_resource.rb | 6 +- app/models/etd_resource.rb | 8 +- app/models/generic_work_resource.rb | 10 +- app/models/hyrax/file_set_decorator.rb | 4 +- app/models/image_resource.rb | 10 +- app/models/oer_resource.rb | 8 +- config/metadata_profiles/m3_profile.yaml | 1044 +++++++++++++++++ ...606205215_create_hyrax_flexible_schemas.rb | 9 + db/schema.rb | 8 +- db/seeds.rb | 5 + ops/demo-deploy.tmpl.yaml | 2 + ops/staging-deploy.tmpl.yaml | 2 + 24 files changed, 1138 insertions(+), 69 deletions(-) create mode 100644 config/metadata_profiles/m3_profile.yaml create mode 100644 db/migrate/20240606205215_create_hyrax_flexible_schemas.rb diff --git a/.env b/.env index e67aa74b2..6cd549e5e 100644 --- a/.env +++ b/.env @@ -70,4 +70,5 @@ HYKU_RESTRICT_CREATE_AND_DESTROY_PERMISSIONS=true HYRAX_ANALYTICS=false ##END## Enable Google Analytics -HYRAX_VALKYRIE=true +HYRAX_FLEXIBLE=true +HYRAX_VALKYRIE=true \ No newline at end of file diff --git a/app/forms/collection_resource_form.rb b/app/forms/collection_resource_form.rb index 3e9795dde..5a55af498 100644 --- a/app/forms/collection_resource_form.rb +++ b/app/forms/collection_resource_form.rb @@ -3,8 +3,8 @@ # Generated via # `rails generate hyrax:collection_resource CollectionResource` class CollectionResourceForm < Hyrax::Forms::PcdmCollectionForm - include Hyrax::FormFields(:basic_metadata) - include Hyrax::FormFields(:bulkrax_metadata) - include Hyrax::FormFields(:collection_resource) + include Hyrax::FormFields(:basic_metadata) unless Hyrax.config.flexible? + include Hyrax::FormFields(:bulkrax_metadata) unless Hyrax.config.flexible? + include Hyrax::FormFields(:collection_resource) unless Hyrax.config.flexible? include CollectionAccessFiltering end diff --git a/app/forms/etd_resource_form.rb b/app/forms/etd_resource_form.rb index 4838446ac..cea09c0b9 100644 --- a/app/forms/etd_resource_form.rb +++ b/app/forms/etd_resource_form.rb @@ -8,9 +8,9 @@ class EtdResourceForm < Hyrax::Forms::ResourceForm(EtdResource) # Commented out basic_metadata because these terms were added to etd_resource so we can customize it. # include Hyrax::FormFields(:basic_metadata) - include Hyrax::FormFields(:etd_resource) - include Hyrax::FormFields(:with_pdf_viewer) - include Hyrax::FormFields(:with_video_embed) + include Hyrax::FormFields(:etd_resource) unless Hyrax.config.flexible? + include Hyrax::FormFields(:with_pdf_viewer) unless Hyrax.config.flexible? + include Hyrax::FormFields(:with_video_embed) unless Hyrax.config.flexible? include VideoEmbedBehavior::Validation # Define custom form fields using the Valkyrie::ChangeSet interface # diff --git a/app/forms/generic_work_resource_form.rb b/app/forms/generic_work_resource_form.rb index 35a9d6bed..714b0cd3a 100644 --- a/app/forms/generic_work_resource_form.rb +++ b/app/forms/generic_work_resource_form.rb @@ -6,10 +6,10 @@ # @see https://github.com/samvera/hyrax/wiki/Hyrax-Valkyrie-Usage-Guide#forms # @see https://github.com/samvera/valkyrie/wiki/ChangeSets-and-Dirty-Tracking class GenericWorkResourceForm < Hyrax::Forms::ResourceForm(GenericWorkResource) - include Hyrax::FormFields(:basic_metadata) - include Hyrax::FormFields(:bulkrax_metadata) - include Hyrax::FormFields(:generic_work_resource) - include Hyrax::FormFields(:with_pdf_viewer) - include Hyrax::FormFields(:with_video_embed) + include Hyrax::FormFields(:basic_metadata) unless Hyrax.config.flexible? + include Hyrax::FormFields(:bulkrax_metadata) unless Hyrax.config.flexible? + include Hyrax::FormFields(:generic_work_resource) unless Hyrax.config.flexible? + include Hyrax::FormFields(:with_pdf_viewer) unless Hyrax.config.flexible? + include Hyrax::FormFields(:with_video_embed) unless Hyrax.config.flexible? include VideoEmbedBehavior::Validation end diff --git a/app/forms/hyrax/forms/pcdm_collection_form_decorator.rb b/app/forms/hyrax/forms/pcdm_collection_form_decorator.rb index ee5e37753..e5086c3b9 100644 --- a/app/forms/hyrax/forms/pcdm_collection_form_decorator.rb +++ b/app/forms/hyrax/forms/pcdm_collection_form_decorator.rb @@ -2,8 +2,8 @@ # OVERRIDE Hyraxv5.0.0 to add the ability to upload a collection thumbnail Hyrax::Forms::PcdmCollectionForm.class_eval do - include Hyrax::FormFields(:basic_metadata) - include Hyrax::FormFields(:bulkrax_metadata) + include Hyrax::FormFields(:basic_metadata) unless Hyrax.config.flexible? + include Hyrax::FormFields(:bulkrax_metadata) unless Hyrax.config.flexible? include CollectionAccessFiltering ThumbnailInfoPrepopulator = lambda do |_options = nil| diff --git a/app/forms/image_resource_form.rb b/app/forms/image_resource_form.rb index f51e4c2ae..bbaa4e81f 100644 --- a/app/forms/image_resource_form.rb +++ b/app/forms/image_resource_form.rb @@ -6,10 +6,10 @@ # @see https://github.com/samvera/hyrax/wiki/Hyrax-Valkyrie-Usage-Guide#forms # @see https://github.com/samvera/valkyrie/wiki/ChangeSets-and-Dirty-Tracking class ImageResourceForm < Hyrax::Forms::ResourceForm(ImageResource) - include Hyrax::FormFields(:basic_metadata) - include Hyrax::FormFields(:bulkrax_metadata) - include Hyrax::FormFields(:image_resource) - include Hyrax::FormFields(:with_pdf_viewer) - include Hyrax::FormFields(:with_video_embed) + include Hyrax::FormFields(:basic_metadata) unless Hyrax.config.flexible? + include Hyrax::FormFields(:bulkrax_metadata) unless Hyrax.config.flexible? + include Hyrax::FormFields(:image_resource) unless Hyrax.config.flexible? + include Hyrax::FormFields(:with_pdf_viewer) unless Hyrax.config.flexible? + include Hyrax::FormFields(:with_video_embed) unless Hyrax.config.flexible? include VideoEmbedBehavior::Validation end diff --git a/app/forms/oer_resource_form.rb b/app/forms/oer_resource_form.rb index e82a45a86..44efeb8d3 100644 --- a/app/forms/oer_resource_form.rb +++ b/app/forms/oer_resource_form.rb @@ -8,9 +8,9 @@ class OerResourceForm < Hyrax::Forms::ResourceForm(OerResource) # Commented out basic_metadata because these terms were added to etd_resource so we can customize it. # include Hyrax::FormFields(:basic_metadata) - include Hyrax::FormFields(:oer_resource) - include Hyrax::FormFields(:with_pdf_viewer) - include Hyrax::FormFields(:with_video_embed) + include Hyrax::FormFields(:oer_resource) unless Hyrax.config.flexible? + include Hyrax::FormFields(:with_pdf_viewer) unless Hyrax.config.flexible? + include Hyrax::FormFields(:with_video_embed) unless Hyrax.config.flexible? include VideoEmbedBehavior::Validation # Define custom form fields using the Valkyrie::ChangeSet interface # diff --git a/app/indexers/collection_resource_indexer.rb b/app/indexers/collection_resource_indexer.rb index c5af47560..8ad535a6f 100644 --- a/app/indexers/collection_resource_indexer.rb +++ b/app/indexers/collection_resource_indexer.rb @@ -3,9 +3,9 @@ # Generated via # `rails generate hyrax:collection_resource CollectionResource` class CollectionResourceIndexer < Hyrax::Indexers::PcdmCollectionIndexer - include Hyrax::Indexer(:basic_metadata) - include Hyrax::Indexer(:bulkrax_metadata) - include Hyrax::Indexer(:collection_resource) + include Hyrax::Indexer(:basic_metadata) unless Hyrax.config.flexible? + include Hyrax::Indexer(:bulkrax_metadata) unless Hyrax.config.flexible? + include Hyrax::Indexer(:collection_resource) unless Hyrax.config.flexible? include Hyrax::IndexesThumbnails def to_solr diff --git a/app/indexers/etd_resource_indexer.rb b/app/indexers/etd_resource_indexer.rb index cb0ae1d38..ba895c50a 100644 --- a/app/indexers/etd_resource_indexer.rb +++ b/app/indexers/etd_resource_indexer.rb @@ -3,11 +3,11 @@ # Generated via # `rails generate hyrax:work_resource EtdResource` class EtdResourceIndexer < Hyrax::ValkyrieWorkIndexer - include Hyrax::Indexer(:basic_metadata) - include Hyrax::Indexer(:bulkrax_metadata) - include Hyrax::Indexer(:etd_resource) - include Hyrax::Indexer(:with_pdf_viewer) - include Hyrax::Indexer(:with_video_embed) + include Hyrax::Indexer(:basic_metadata) unless Hyrax.config.flexible? + include Hyrax::Indexer(:bulkrax_metadata) unless Hyrax.config.flexible? + include Hyrax::Indexer(:etd_resource) unless Hyrax.config.flexible? + include Hyrax::Indexer(:with_pdf_viewer) unless Hyrax.config.flexible? + include Hyrax::Indexer(:with_video_embed) unless Hyrax.config.flexible? include HykuIndexing diff --git a/app/indexers/generic_work_resource_indexer.rb b/app/indexers/generic_work_resource_indexer.rb index 2ea0303ba..1a3c05ba2 100644 --- a/app/indexers/generic_work_resource_indexer.rb +++ b/app/indexers/generic_work_resource_indexer.rb @@ -3,11 +3,11 @@ # Generated via # `rails generate hyrax:work_resource GenericWorkResource` class GenericWorkResourceIndexer < Hyrax::ValkyrieWorkIndexer - include Hyrax::Indexer(:basic_metadata) - include Hyrax::Indexer(:bulkrax_metadata) - include Hyrax::Indexer(:generic_work_resource) - include Hyrax::Indexer(:with_pdf_viewer) - include Hyrax::Indexer(:with_video_embed) + include Hyrax::Indexer(:basic_metadata) unless Hyrax.config.flexible? + include Hyrax::Indexer(:bulkrax_metadata) unless Hyrax.config.flexible? + include Hyrax::Indexer(:generic_work_resource) unless Hyrax.config.flexible? + include Hyrax::Indexer(:with_pdf_viewer) unless Hyrax.config.flexible? + include Hyrax::Indexer(:with_video_embed) unless Hyrax.config.flexible? include HykuIndexing # Uncomment this block if you want to add custom indexing behavior: diff --git a/app/indexers/image_resource_indexer.rb b/app/indexers/image_resource_indexer.rb index 6a2de1a5c..086c84c3e 100644 --- a/app/indexers/image_resource_indexer.rb +++ b/app/indexers/image_resource_indexer.rb @@ -3,11 +3,11 @@ # Generated via # `rails generate hyrax:work_resource ImageResource` class ImageResourceIndexer < Hyrax::ValkyrieWorkIndexer - include Hyrax::Indexer(:basic_metadata) - include Hyrax::Indexer(:bulkrax_metadata) - include Hyrax::Indexer(:image_resource) - include Hyrax::Indexer(:with_pdf_viewer) - include Hyrax::Indexer(:with_video_embed) + include Hyrax::Indexer(:basic_metadata) unless Hyrax.config.flexible? + include Hyrax::Indexer(:bulkrax_metadata) unless Hyrax.config.flexible? + include Hyrax::Indexer(:image_resource) unless Hyrax.config.flexible? + include Hyrax::Indexer(:with_pdf_viewer) unless Hyrax.config.flexible? + include Hyrax::Indexer(:with_video_embed) unless Hyrax.config.flexible? include HykuIndexing # Uncomment this block if you want to add custom indexing behavior: diff --git a/app/indexers/oer_resource_indexer.rb b/app/indexers/oer_resource_indexer.rb index ce009e3fd..5cff81e2f 100644 --- a/app/indexers/oer_resource_indexer.rb +++ b/app/indexers/oer_resource_indexer.rb @@ -3,11 +3,11 @@ # Generated via # `rails generate hyrax:work_resource OerResource` class OerResourceIndexer < Hyrax::ValkyrieWorkIndexer - include Hyrax::Indexer(:basic_metadata) - include Hyrax::Indexer(:bulkrax_metadata) - include Hyrax::Indexer(:oer_resource) - include Hyrax::Indexer(:with_pdf_viewer) - include Hyrax::Indexer(:with_video_embed) + include Hyrax::Indexer(:basic_metadata) unless Hyrax.config.flexible? + include Hyrax::Indexer(:bulkrax_metadata) unless Hyrax.config.flexible? + include Hyrax::Indexer(:oer_resource) unless Hyrax.config.flexible? + include Hyrax::Indexer(:with_pdf_viewer) unless Hyrax.config.flexible? + include Hyrax::Indexer(:with_video_embed) unless Hyrax.config.flexible? include HykuIndexing diff --git a/app/models/collection_resource.rb b/app/models/collection_resource.rb index d80643d76..d4ee29710 100644 --- a/app/models/collection_resource.rb +++ b/app/models/collection_resource.rb @@ -3,9 +3,9 @@ # Generated via # `rails generate hyrax:collection_resource CollectionResource` class CollectionResource < Hyrax::PcdmCollection - include Hyrax::Schema(:basic_metadata) - include Hyrax::Schema(:bulkrax_metadata) - include Hyrax::Schema(:collection_resource) + include Hyrax::Schema(:basic_metadata) unless Hyrax.config.flexible? + include Hyrax::Schema(:bulkrax_metadata) unless Hyrax.config.flexible? + include Hyrax::Schema(:collection_resource) unless Hyrax.config.flexible? include Hyrax::ArResource include HykuIndexing diff --git a/app/models/etd_resource.rb b/app/models/etd_resource.rb index 3bbaffd47..7376abd1c 100644 --- a/app/models/etd_resource.rb +++ b/app/models/etd_resource.rb @@ -5,10 +5,10 @@ class EtdResource < Hyrax::Work # Commented out basic_metadata because these terms were added to etd_resource so we can customize it. # include Hyrax::Schema(:basic_metadata) - include Hyrax::Schema(:etd_resource) - include Hyrax::Schema(:bulkrax_metadata) - include Hyrax::Schema(:with_pdf_viewer) - include Hyrax::Schema(:with_video_embed) + include Hyrax::Schema(:etd_resource) unless Hyrax.config.flexible? + include Hyrax::Schema(:bulkrax_metadata) unless Hyrax.config.flexible? + include Hyrax::Schema(:with_pdf_viewer) unless Hyrax.config.flexible? + include Hyrax::Schema(:with_video_embed) unless Hyrax.config.flexible? include Hyrax::ArResource include Hyrax::NestedWorks diff --git a/app/models/generic_work_resource.rb b/app/models/generic_work_resource.rb index 74d8791da..10b82550a 100644 --- a/app/models/generic_work_resource.rb +++ b/app/models/generic_work_resource.rb @@ -3,11 +3,11 @@ # Generated via # `rails generate hyrax:work_resource GenericWorkResource` class GenericWorkResource < Hyrax::Work - include Hyrax::Schema(:basic_metadata) - include Hyrax::Schema(:bulkrax_metadata) - include Hyrax::Schema(:generic_work_resource) - include Hyrax::Schema(:with_pdf_viewer) - include Hyrax::Schema(:with_video_embed) + include Hyrax::Schema(:basic_metadata) unless Hyrax.config.flexible? + include Hyrax::Schema(:bulkrax_metadata) unless Hyrax.config.flexible? + include Hyrax::Schema(:generic_work_resource) unless Hyrax.config.flexible? + include Hyrax::Schema(:with_pdf_viewer) unless Hyrax.config.flexible? + include Hyrax::Schema(:with_video_embed) unless Hyrax.config.flexible? include Hyrax::ArResource include Hyrax::NestedWorks diff --git a/app/models/hyrax/file_set_decorator.rb b/app/models/hyrax/file_set_decorator.rb index add44198d..2c4284b17 100644 --- a/app/models/hyrax/file_set_decorator.rb +++ b/app/models/hyrax/file_set_decorator.rb @@ -1,8 +1,8 @@ # frozen_string_literal: true Hyrax::FileSet.class_eval do - include Hyrax::Schema(:bulkrax_metadata) - include Hyrax::Schema(:hyku_file_set_metadata) + include Hyrax::Schema(:bulkrax_metadata) unless Hyrax.config.flexible? + include Hyrax::Schema(:hyku_file_set_metadata) unless Hyrax.config.flexible? include Hyrax::ArResource end diff --git a/app/models/image_resource.rb b/app/models/image_resource.rb index fba13fafc..30aa4e5b6 100644 --- a/app/models/image_resource.rb +++ b/app/models/image_resource.rb @@ -3,11 +3,11 @@ # Generated via # `rails generate hyrax:work_resource ImageResource` class ImageResource < Hyrax::Work - include Hyrax::Schema(:basic_metadata) - include Hyrax::Schema(:bulkrax_metadata) - include Hyrax::Schema(:image_resource) - include Hyrax::Schema(:with_pdf_viewer) - include Hyrax::Schema(:with_video_embed) + include Hyrax::Schema(:basic_metadata) unless Hyrax.config.flexible? + include Hyrax::Schema(:bulkrax_metadata) unless Hyrax.config.flexible? + include Hyrax::Schema(:image_resource) unless Hyrax.config.flexible? + include Hyrax::Schema(:with_pdf_viewer) unless Hyrax.config.flexible? + include Hyrax::Schema(:with_video_embed) unless Hyrax.config.flexible? include Hyrax::ArResource include Hyrax::NestedWorks diff --git a/app/models/oer_resource.rb b/app/models/oer_resource.rb index 990663567..7ef49103f 100644 --- a/app/models/oer_resource.rb +++ b/app/models/oer_resource.rb @@ -5,10 +5,10 @@ class OerResource < Hyrax::Work # Commented out basic_metadata because these terms were added to etd_resource so we can customize it. # include Hyrax::Schema(:basic_metadata) - include Hyrax::Schema(:oer_resource) - include Hyrax::Schema(:bulkrax_metadata) - include Hyrax::Schema(:with_pdf_viewer) - include Hyrax::Schema(:with_video_embed) + include Hyrax::Schema(:oer_resource) unless Hyrax.config.flexible? + include Hyrax::Schema(:bulkrax_metadata) unless Hyrax.config.flexible? + include Hyrax::Schema(:with_pdf_viewer) unless Hyrax.config.flexible? + include Hyrax::Schema(:with_video_embed) unless Hyrax.config.flexible? include Hyrax::ArResource include Hyrax::NestedWorks diff --git a/config/metadata_profiles/m3_profile.yaml b/config/metadata_profiles/m3_profile.yaml new file mode 100644 index 000000000..833b0e608 --- /dev/null +++ b/config/metadata_profiles/m3_profile.yaml @@ -0,0 +1,1044 @@ +--- +m3_version: 1.0.beta2 +profile: + date_modified: '2024-06-01' + responsibility: https://samvera.org + responsibility_statement: Hyrax Initial Profile + type: Initial Profile + version: 1 +classes: + GenericWork: + display_label: Generic Work + Monograph: + display_label: Monograph + Hyrax::AdministrativeSet: + diplay_label: AdministrativeSet + CollectionResource: + display_label: PcdmCollection + Hyrax::FileSet: + display_label: FileSet + Hyrax::PcdmCollection: + display_label: PcdmCollection +contexts: + flexible_context: + display_label: Flexible Metadata Example +mappings: + blacklight: + name: Additional Blacklight Solr Mappings + metatags: + name: Metatags + mods_oai_pmh: + name: MODS OAI PMH + qualified_dc_pmh: + name: Qualified DC OAI PMH + simple_dc_pmh: + name: Simple DC OAI PMH +properties: + title: + available_on: + class: + - Hyrax::AdministrativeSet + - Hyrax::FileSet + - CollectionResource + - GenericWork + - Monograph + cardinality: + minimum: 1 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + definition: + default: Enter a standardized title for display. If only one title is needed, + transcribe the title from the source itself. + display_label: + default: Title + index_documentation: displayable, searchable + indexing: + - title_sim + - title_tesim + form: + required: true + primary: true + multi_value: true + mappings: + metatags: twitter:title, og:title + mods_oai_pmh: mods:titleInfo/mods:title + qualified_dc_pmh: dcterms:title + simple_dc_pmh: dc:title + property_uri: http://purl.org/dc/terms/title + range: http://www.w3.org/2001/XMLSchema#string + requirement: required + sample_values: + - Pencil drawn portrait study of woman + view: + label: + en: 'Title' + es: 'Título' + html_dl: true + date_modified: + available_on: + class: + - Hyrax::AdministrativeSet + - Hyrax::FileSet + - CollectionResource + - GenericWork + - Monograph + cardinality: + minimum: 0 + maximum: 1 + multi_value: false + display_label: + default: Date Modified + property_uri: http://purl.org/dc/terms/modified + range: http://www.w3.org/2001/XMLSchema#dateTime + sample_values: + - '2024-06-06 21:06:51 +0000' + view: + label: + de: 'Zuletzt geändert' + en: 'Last modified' + es: 'Última modificación' + fr: 'Dernière modification' + it: 'Ultima modifica' + pt-BR: 'Última modificação' + zh: '最新修改' + html_dl: true + date_uploaded: + available_on: + class: + - Hyrax::AdministrativeSet + - Hyrax::FileSet + - CollectionResource + - GenericWork + - Monograph + cardinality: + minimum: 0 + maximum: 1 + multi_value: false + display_label: + default: Date Uploaded + property_uri: http://purl.org/dc/terms/dateSubmitted + range: http://www.w3.org/2001/XMLSchema#dateTime + sample_values: + - '2024-06-06 21:06:51 +0000' + depositor: + available_on: + class: + - Hyrax::AdministrativeSet + - Hyrax::FileSet + - CollectionResource + - GenericWork + - Monograph + cardinality: + minimum: 0 + maximum: 1 + multi_value: false + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Depositor + index_documentation: searchable + indexing: + - depositor_tesim + property_uri: http://id.loc.gov/vocabulary/relators/dpt + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - Julie Allinson + creator: + available_on: + class: + - Hyrax::AdministrativeSet + - Hyrax::FileSet + - CollectionResource + - GenericWork + - Monograph + cardinality: + minimum: 1 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Creator + index_documentation: displayable, searchable + indexing: + - creator_sim + - creator_tesim + form: + required: true + primary: true + property_uri: http://purl.org/dc/elements/1.1/creator + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - Julie Allinson + view: + render_as: "faceted" + html_dl: true + license: + available_on: + class: + - Hyrax::FileSet + - CollectionResource + - GenericWork + - Monograph + cardinality: + minimum: 0 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: License + index_documentation: displayable, searchable + indexing: + - license_sim + - license_tesim + form: + primary: false + property_uri: http://purl.org/dc/terms/license + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - http://creativecommons.org/licenses/by/3.0/us/ + view: + render_as: "external_link" + html_dl: true + abstract: + available_on: + class: + - Hyrax::FileSet + - CollectionResource + - GenericWork + - Monograph + cardinality: + minimum: 0 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Abstract + index_documentation: displayable, searchable + indexing: + - abstract_sim + - abstract_tesim + form: + primary: false + property_uri: http://purl.org/dc/terms/abstract + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - This is an abstract. + view: + html_dl: true + access_right: + available_on: + class: + - CollectionResource + - GenericWork + - Monograph + cardinality: + minimum: 0 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Access Right + index_documentation: displayable, searchable + indexing: + - access_right_sim + - access_right_tesim + form: + primary: false + property_uri: http://purl.org/dc/terms/accessRights + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - Open Access + view: + html_dl: true + alternative_title: + available_on: + class: + - Hyrax::AdministrativeSet + - CollectionResource + - GenericWork + - Monograph + cardinality: + minimum: 0 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Alternative Title + index_documentation: displayable, searchable + indexing: + - alternative_title_sim + - alternative_title_tesim + form: + primary: false + property_uri: http://purl.org/dc/terms/alternative + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - Alternate Title Example + view: + label: + en: 'Alternative Title' + es: 'Título Alternativo' + html_dl: true + arkivo_checksum: + available_on: + class: + - CollectionResource + - GenericWork + - Monograph + cardinality: + minimum: 0 + maximum: 1 + multi_value: false + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Arkivo Checksum + form: + primary: false + property_uri: http://scholarsphere.psu.edu/ns#arkivoChecksum + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - c0855931b7f1aefedb91d31af76873c0 + based_near: + available_on: + class: + - Hyrax::FileSet + - CollectionResource + - GenericWork + - Monograph + cardinality: + minimum: 0 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Location + index_documentation: displayable, searchable + indexing: + - based_near_sim + - based_near_tesim + form: + primary: false + property_uri: http://xmlns.com/foaf/0.1/based_near + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - San Diego, California, United States + view: + label: Based Near + html_dl: true + bibliographic_citation: + available_on: + class: + - CollectionResource + - GenericWork + - Monograph + cardinality: + minimum: 0 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Bibliographic Citation + index_documentation: displayable, searchable + indexing: + - bibliographic_citation_sim + - bibliographic_citation_tesim + form: + primary: false + property_uri: http://purl.org/dc/terms/bibliographicCitation + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - Doe, J. (2024). Example Citation. Journal of Examples, 12(3), 45-67. + view: + html_dl: true + contributor: + available_on: + class: + - Hyrax::FileSet + - CollectionResource + - GenericWork + - Monograph + cardinality: + minimum: 0 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Contributor + index_documentation: displayable, searchable + indexing: + - contributor_tesim + - contributor_sim + form: + primary: false + property_uri: http://purl.org/dc/elements/1.1/contributor + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - Julie Allinson + view: + render_as: "faceted" + html_dl: true + date_created: + available_on: + class: + - Hyrax::FileSet + - CollectionResource + - GenericWork + - Monograph + cardinality: + minimum: 0 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#dateTime + sources: + - 'null' + display_label: + default: Date Created + index_documentation: displayable, searchable + indexing: + - date_created_sim + - date_created_tesim + form: + primary: false + property_uri: http://purl.org/dc/terms/created + range: http://www.w3.org/2001/XMLSchema#dateTime + sample_values: + - '2024-06-06 21:06:51 +0000' + view: + render_as: "linked" + search_field: 'date_created_tesim' + html_dl: true + description: + available_on: + class: + - Hyrax::FileSet + - CollectionResource + - GenericWork + - Monograph + cardinality: + minimum: 0 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Description + index_documentation: displayable, searchable + indexing: + - description_sim + - description_tesim + form: + primary: false + property_uri: http://purl.org/dc/elements/1.1/description + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - This is a description. + identifier: + available_on: + class: + - Hyrax::FileSet + - CollectionResource + - GenericWork + - Monograph + cardinality: + minimum: 0 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Identifier + index_documentation: displayable, searchable + indexing: + - identifier_sim + - identifier_tesim + form: + primary: false + property_uri: http://purl.org/dc/terms/identifier + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - abc123 + view: + render_as: "linked" + search_field: 'identifier_tesim' + html_dl: true + import_url: + available_on: + class: + - CollectionResource + - GenericWork + - Monograph + cardinality: + minimum: 0 + maximum: 1 + multi_value: false + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Import URL + property_uri: http://scholarsphere.psu.edu/ns#importUrl + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - http://example.com/resource1 + keyword: + available_on: + class: + - Hyrax::FileSet + - CollectionResource + - GenericWork + - Monograph + cardinality: + minimum: 0 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Keyword + index_documentation: displayable, searchable + indexing: + - keyword_sim + - keyword_tesim + form: + primary: false + property_uri: http://schema.org/keywords + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - Metadata + - Repository + view: + render_as: "faceted" + html_dl: true + label: + available_on: + class: + - Hyrax::FileSet + - CollectionResource + - GenericWork + - Monograph + cardinality: + minimum: 0 + maximum: 1 + multi_value: false + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Label + index_documentation: displayable, searchable + indexing: + - label_sim + - label_tesim + form: + primary: false + property_uri: info:fedora/fedora-system:def/model#downloadFilename + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - file_label.txt + language: + available_on: + class: + - Hyrax::FileSet + - CollectionResource + - GenericWork + - Monograph + cardinality: + minimum: 0 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Language + index_documentation: displayable, searchable + indexing: + - language_sim + - language_tesim + form: + primary: false + property_uri: http://purl.org/dc/elements/1.1/language + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - English + - Spanish + view: + render_as: "faceted" + html_dl: true + publisher: + available_on: + class: + - Hyrax::FileSet + - CollectionResource + - GenericWork + - Monograph + cardinality: + minimum: 0 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Publisher + index_documentation: displayable, searchable + indexing: + - publisher_sim + - publisher_tesim + form: + primary: false + property_uri: http://purl.org/dc/elements/1.1/publisher + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - Scholastic + view: + render_as: "faceted" + html_dl: true + related_url: + available_on: + class: + - Hyrax::FileSet + - CollectionResource + - GenericWork + - Monograph + cardinality: + minimum: 0 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Related URL + index_documentation: displayable, searchable + indexing: + - related_url_sim + - related_url_tesim + form: + primary: false + property_uri: http://www.w3.org/2000/01/rdf-schema#seeAlso + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - http://example.com/resource1 + view: + render_as: "external_link" + html_dl: true + relative_path: + available_on: + class: + - Hyrax::FileSet + - CollectionResource + - GenericWork + - Monograph + cardinality: + minimum: 0 + maximum: 1 + multi_value: false + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Relative Path + property_uri: http://scholarsphere.psu.edu/ns#relativePath + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - "/path/to/resource" + resource_type: + available_on: + class: + - Hyrax::FileSet + - CollectionResource + - GenericWork + - Monograph + cardinality: + minimum: 0 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Resource Type + index_documentation: displayable, searchable + indexing: + - resource_type_sim + - resource_type_tesim + form: + primary: false + property_uri: http://purl.org/dc/terms/type + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - Article + - Conference Proceeding + view: + render_as: "faceted" + html_dl: true + rights_notes: + available_on: + class: + - Hyrax::FileSet + - CollectionResource + - GenericWork + - Monograph + cardinality: + minimum: 0 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Rights Notes + index_documentation: displayable, searchable + indexing: + - rights_notes_sim + - rights_notes_tesim + form: + primary: false + property_uri: http://purl.org/dc/elements/1.1/rights + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - Creative Commons license. + view: + html_dl: true + rights_statement: + available_on: + class: + - Hyrax::FileSet + - CollectionResource + - GenericWork + - Monograph + cardinality: + minimum: 0 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Rights Statement + index_documentation: displayable, searchable + indexing: + - rights_statement_sim + - rights_statement_tesim + form: + primary: true + property_uri: http://www.europeana.eu/schemas/edm/rights + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - http://rightsstatements.org/vocab/InC/1.0/ + view: + html_dl: true + render_as: "rights_statement" + source: + available_on: + class: + - Hyrax::FileSet + - CollectionResource + - GenericWork + - Monograph + cardinality: + minimum: 0 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Source + index_documentation: displayable, searchable + indexing: + - source_sim + - source_tesim + form: + primary: false + property_uri: http://purl.org/dc/terms/source + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - Original Manuscript + - Digital Archive + view: + html_dl: true + subject: + available_on: + class: + - Hyrax::FileSet + - CollectionResource + - GenericWork + - Monograph + cardinality: + minimum: 0 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Subject + index_documentation: displayable, searchable + indexing: + - subject_sim + - subject_tesim + form: + primary: false + property_uri: http://purl.org/dc/elements/1.1/subject + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - Art + - Science + view: + render_as: "faceted" + html_dl: true + target_audience: + available_on: + class: + - Monograph + cardinality: + minimum: 0 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Target Audience + form: + multiple: true + property_uri: http://hyrax-example.com/target_audience + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - Researchers + - Students + view: + html_dl: true + department: + available_on: + class: + - CollectionResource + cardinality: + minimum: 0 + maximum: 1 + multi_value: false + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Department + form: + primary: true + property_uri: http://hyrax-example.com/department + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - Mathematics + - History + view: + html_dl: true + course: + available_on: + class: + - CollectionResource + cardinality: + minimum: 0 + maximum: 1 + multi_value: false + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Course + form: + primary: false + property_uri: http://hyrax-example.com/course + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - Computer Science 50 + view: + html_dl: true + monograph_title: + available_on: + class: + - Monograph + cardinality: + minimum: 1 + maximum: 1 + multi_value: false + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Monograph Title + property_uri: http://hyrax-example.com/monograph_title + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - Example Monograph Title + view: + html_dl: true + record_info: + available_on: + class: + - Monograph + cardinality: + minimum: 1 + maximum: 1 + multi_value: false + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Record Info + index_documentation: searchable + indexing: + - record_info_tesim + form: + required: true + primary: true + property_uri: http://hyrax-example.com/record_info + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - Example Record Info + view: + html_dl: true + place_of_publication: + available_on: + class: + - Monograph + cardinality: + minimum: 0 + maximum: 1 + multi_value: false + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Place of Publication + form: + required: false + primary: true + property_uri: http://hyrax-example.com/place_of_publication + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - Example Place of Publication + view: + html_dl: true + genre: + available_on: + class: + - Monograph + cardinality: + minimum: 0 + maximum: 1 + multi_value: false + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Genre + form: + primary: true + property_uri: http://hyrax-example.com/genre + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - Fiction + - Non-Fiction + view: + html_dl: true + series_title: + available_on: + class: + - Monograph + cardinality: + minimum: 0 + maximum: 1 + multi_value: false + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Series Title + form: + primary: false + property_uri: http://hyrax-example.com/series_title + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - Example Series Title + view: + html_dl: true + table_of_contents: + available_on: + class: + - Monograph + cardinality: + minimum: 0 + maximum: 1 + multi_value: false + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Table of Contents + form: + multiple: false + property_uri: http://hyrax-example.com/table_of_contents + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - Example Table of Contents + view: + html_dl: true + date_of_issuance: + available_on: + class: + - Monograph + cardinality: + minimum: 0 + maximum: 1 + multi_value: false + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Date of Issuance + property_uri: http://hyrax-example.com/date_of_issuance + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - '2024-06-06 21:06:51 +0000' + view: + html_dl: true diff --git a/db/migrate/20240606205215_create_hyrax_flexible_schemas.rb b/db/migrate/20240606205215_create_hyrax_flexible_schemas.rb new file mode 100644 index 000000000..bdbac2bc4 --- /dev/null +++ b/db/migrate/20240606205215_create_hyrax_flexible_schemas.rb @@ -0,0 +1,9 @@ +class CreateHyraxFlexibleSchemas < ActiveRecord::Migration[6.1] + def change + create_table :hyrax_flexible_schemas do |t| + t.text :profile + + t.timestamps + end + end +end diff --git a/db/schema.rb b/db/schema.rb index e2ee3e0b5..fcd1606c6 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 2024_05_30_205142) do +ActiveRecord::Schema.define(version: 2024_06_06_205215) do # These are extensions that must be enabled in order to support this database enable_extension "hstore" @@ -407,6 +407,12 @@ t.datetime "updated_at", null: false end + create_table "hyrax_flexible_schemas", force: :cascade do |t| + t.text "profile" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + end + create_table "hyrax_groups", id: :serial, force: :cascade do |t| t.string "name" t.text "description" diff --git a/db/seeds.rb b/db/seeds.rb index 5d1829e6d..4e1812338 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -31,6 +31,11 @@ puts "\n== Finished creating single tenant resources" end +if Hyrax.config.flexible? + puts "\n== Loading basic metata profile" + Hyrax::RequiredDataSeeders::FlexibleProfileSeeder.generate_seeds(logger: Logger.new(STDOUT)) +end + Account.find_each do |account| Apartment::Tenant.switch!(account.tenant) next if Site.instance.available_works.present? diff --git a/ops/demo-deploy.tmpl.yaml b/ops/demo-deploy.tmpl.yaml index ce5ac3288..bbd060274 100644 --- a/ops/demo-deploy.tmpl.yaml +++ b/ops/demo-deploy.tmpl.yaml @@ -125,6 +125,8 @@ extraEnvVars: &envVars value: "false" - name: HYRAX_FITS_PATH value: /app/fits/fits.sh + - name: HYRAX_FLEXIBLE + value: "true" - name: HYRAX_VALKYRIE value: "true" - name: HYKU_ADMIN_HOST diff --git a/ops/staging-deploy.tmpl.yaml b/ops/staging-deploy.tmpl.yaml index e2ec85915..7ea29b25e 100644 --- a/ops/staging-deploy.tmpl.yaml +++ b/ops/staging-deploy.tmpl.yaml @@ -125,6 +125,8 @@ extraEnvVars: &envVars value: "false" - name: HYRAX_FITS_PATH value: /app/fits/fits.sh + - name: HYRAX_FLEXIBLE + value: "true" - name: HYRAX_VALKYRIE value: "true" - name: HYKU_ADMIN_HOST From cda1c39f3b60957d32b8bc7bfc24ffb44fda08a6 Mon Sep 17 00:00:00 2001 From: Shana Moore Date: Mon, 1 Jul 2024 15:29:57 -0700 Subject: [PATCH 04/46] temp ref specific sha of iiif_print We need to reference this sha until the commit gets merged in with main. --- Gemfile | 2 +- Gemfile.lock | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index 30d17736c..9b96cbf64 100644 --- a/Gemfile +++ b/Gemfile @@ -56,7 +56,7 @@ gem 'hyrax-doi', github: 'samvera-labs/hyrax-doi', branch: 'rails_hyrax_upgrade' gem 'hyrax-iiif_av', github: 'samvera-labs/hyrax-iiif_av', branch: 'rails_hyrax_upgrade' gem 'i18n-debug', require: false, group: %i[development test] gem 'i18n-tasks', group: %i[development test] -gem 'iiif_print', github: 'scientist-softserv/iiif_print', branch: 'main' +gem 'iiif_print', github: 'scientist-softserv/iiif_print', branch: 'i84-support-dynamic-metadata' gem 'jbuilder', '~> 2.5' gem 'jquery-rails' # Use jquery as the JavaScript library gem 'openssl', '>= 3.2.0' diff --git a/Gemfile.lock b/Gemfile.lock index 697b195fd..9200f334e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -221,8 +221,8 @@ GIT GIT remote: https://github.com/scientist-softserv/iiif_print.git - revision: fb07dcdafdf1b2e7e05ebd34a50187bf69b46474 - branch: main + revision: 8d949ea88f0d68cb8e5fbc297c1e179b70cb6668 + branch: i84-support-dynamic-metadata specs: iiif_print (2.0.1) blacklight_iiif_search (>= 1.0, < 3.0) From 4689f5f857691f4dbc248a94a61ebd8768c86d50 Mon Sep 17 00:00:00 2001 From: Shana Moore Date: Tue, 2 Jul 2024 08:39:50 -0700 Subject: [PATCH 05/46] :construction: WIP: Update m3 profile This update includes converting the schemas of: :bulkrax_metadata, :with_pdf_viewer), and :with_video_embed --- config/metadata_profiles/m3_profile.yaml | 313 +++++++++-------------- 1 file changed, 117 insertions(+), 196 deletions(-) diff --git a/config/metadata_profiles/m3_profile.yaml b/config/metadata_profiles/m3_profile.yaml index 833b0e608..429dab9b6 100644 --- a/config/metadata_profiles/m3_profile.yaml +++ b/config/metadata_profiles/m3_profile.yaml @@ -7,12 +7,12 @@ profile: type: Initial Profile version: 1 classes: - GenericWork: + GenericWorkResource: display_label: Generic Work - Monograph: - display_label: Monograph - Hyrax::AdministrativeSet: - diplay_label: AdministrativeSet + ImageResource: + display_label: Image + AdminSetResource: + display_label: AdminSetResource CollectionResource: display_label: PcdmCollection Hyrax::FileSet: @@ -37,11 +37,11 @@ properties: title: available_on: class: - - Hyrax::AdministrativeSet + - AdminSetResource - Hyrax::FileSet - CollectionResource - - GenericWork - - Monograph + - GenericWorkResource + - ImageResource cardinality: minimum: 1 multi_value: true @@ -80,11 +80,11 @@ properties: date_modified: available_on: class: - - Hyrax::AdministrativeSet + - AdminSetResource - Hyrax::FileSet - CollectionResource - - GenericWork - - Monograph + - GenericWorkResource + - ImageResource cardinality: minimum: 0 maximum: 1 @@ -108,11 +108,11 @@ properties: date_uploaded: available_on: class: - - Hyrax::AdministrativeSet + - AdminSetResource - Hyrax::FileSet - CollectionResource - - GenericWork - - Monograph + - GenericWorkResource + - ImageResource cardinality: minimum: 0 maximum: 1 @@ -126,11 +126,11 @@ properties: depositor: available_on: class: - - Hyrax::AdministrativeSet + - AdminSetResource - Hyrax::FileSet - CollectionResource - - GenericWork - - Monograph + - GenericWorkResource + - ImageResource cardinality: minimum: 0 maximum: 1 @@ -151,11 +151,11 @@ properties: creator: available_on: class: - - Hyrax::AdministrativeSet + - AdminSetResource - Hyrax::FileSet - CollectionResource - - GenericWork - - Monograph + - GenericWorkResource + - ImageResource cardinality: minimum: 1 multi_value: true @@ -184,8 +184,8 @@ properties: class: - Hyrax::FileSet - CollectionResource - - GenericWork - - Monograph + - GenericWorkResource + - ImageResource cardinality: minimum: 0 multi_value: true @@ -213,8 +213,8 @@ properties: class: - Hyrax::FileSet - CollectionResource - - GenericWork - - Monograph + - GenericWorkResource + - ImageResource cardinality: minimum: 0 multi_value: true @@ -240,8 +240,8 @@ properties: available_on: class: - CollectionResource - - GenericWork - - Monograph + - GenericWorkResource + - ImageResource cardinality: minimum: 0 multi_value: true @@ -266,10 +266,10 @@ properties: alternative_title: available_on: class: - - Hyrax::AdministrativeSet + - AdminSetResource - CollectionResource - - GenericWork - - Monograph + - GenericWorkResource + - ImageResource cardinality: minimum: 0 multi_value: true @@ -298,8 +298,8 @@ properties: available_on: class: - CollectionResource - - GenericWork - - Monograph + - GenericWorkResource + - ImageResource cardinality: minimum: 0 maximum: 1 @@ -321,8 +321,8 @@ properties: class: - Hyrax::FileSet - CollectionResource - - GenericWork - - Monograph + - GenericWorkResource + - ImageResource cardinality: minimum: 0 multi_value: true @@ -349,8 +349,8 @@ properties: available_on: class: - CollectionResource - - GenericWork - - Monograph + - GenericWorkResource + - ImageResource cardinality: minimum: 0 multi_value: true @@ -377,8 +377,8 @@ properties: class: - Hyrax::FileSet - CollectionResource - - GenericWork - - Monograph + - GenericWorkResource + - ImageResource cardinality: minimum: 0 multi_value: true @@ -406,8 +406,8 @@ properties: class: - Hyrax::FileSet - CollectionResource - - GenericWork - - Monograph + - GenericWorkResource + - ImageResource cardinality: minimum: 0 multi_value: true @@ -436,8 +436,8 @@ properties: class: - Hyrax::FileSet - CollectionResource - - GenericWork - - Monograph + - GenericWorkResource + - ImageResource cardinality: minimum: 0 multi_value: true @@ -462,8 +462,8 @@ properties: class: - Hyrax::FileSet - CollectionResource - - GenericWork - - Monograph + - GenericWorkResource + - ImageResource cardinality: minimum: 0 multi_value: true @@ -491,8 +491,8 @@ properties: available_on: class: - CollectionResource - - GenericWork - - Monograph + - GenericWorkResource + - ImageResource cardinality: minimum: 0 maximum: 1 @@ -512,8 +512,8 @@ properties: class: - Hyrax::FileSet - CollectionResource - - GenericWork - - Monograph + - GenericWorkResource + - ImageResource cardinality: minimum: 0 multi_value: true @@ -542,8 +542,8 @@ properties: class: - Hyrax::FileSet - CollectionResource - - GenericWork - - Monograph + - GenericWorkResource + - ImageResource cardinality: minimum: 0 maximum: 1 @@ -569,8 +569,8 @@ properties: class: - Hyrax::FileSet - CollectionResource - - GenericWork - - Monograph + - GenericWorkResource + - ImageResource cardinality: minimum: 0 multi_value: true @@ -599,8 +599,8 @@ properties: class: - Hyrax::FileSet - CollectionResource - - GenericWork - - Monograph + - GenericWorkResource + - ImageResource cardinality: minimum: 0 multi_value: true @@ -628,8 +628,8 @@ properties: class: - Hyrax::FileSet - CollectionResource - - GenericWork - - Monograph + - GenericWorkResource + - ImageResource cardinality: minimum: 0 multi_value: true @@ -657,8 +657,8 @@ properties: class: - Hyrax::FileSet - CollectionResource - - GenericWork - - Monograph + - GenericWorkResource + - ImageResource cardinality: minimum: 0 maximum: 1 @@ -678,8 +678,8 @@ properties: class: - Hyrax::FileSet - CollectionResource - - GenericWork - - Monograph + - GenericWorkResource + - ImageResource cardinality: minimum: 0 multi_value: true @@ -708,8 +708,8 @@ properties: class: - Hyrax::FileSet - CollectionResource - - GenericWork - - Monograph + - GenericWorkResource + - ImageResource cardinality: minimum: 0 multi_value: true @@ -736,8 +736,8 @@ properties: class: - Hyrax::FileSet - CollectionResource - - GenericWork - - Monograph + - GenericWorkResource + - ImageResource cardinality: minimum: 0 multi_value: true @@ -765,8 +765,8 @@ properties: class: - Hyrax::FileSet - CollectionResource - - GenericWork - - Monograph + - GenericWorkResource + - ImageResource cardinality: minimum: 0 multi_value: true @@ -794,8 +794,8 @@ properties: class: - Hyrax::FileSet - CollectionResource - - GenericWork - - Monograph + - GenericWorkResource + - ImageResource cardinality: minimum: 0 multi_value: true @@ -819,28 +819,6 @@ properties: view: render_as: "faceted" html_dl: true - target_audience: - available_on: - class: - - Monograph - cardinality: - minimum: 0 - multi_value: true - controlled_values: - format: http://www.w3.org/2001/XMLSchema#string - sources: - - 'null' - display_label: - default: Target Audience - form: - multiple: true - property_uri: http://hyrax-example.com/target_audience - range: http://www.w3.org/2001/XMLSchema#string - sample_values: - - Researchers - - Students - view: - html_dl: true department: available_on: class: @@ -886,12 +864,15 @@ properties: - Computer Science 50 view: html_dl: true - monograph_title: + bulkrax_identifier: available_on: class: - - Monograph + - Hyrax::FileSet + - CollectionResource + - GenericWorkResource + - ImageResource cardinality: - minimum: 1 + minimum: 0 maximum: 1 multi_value: false controlled_values: @@ -899,133 +880,70 @@ properties: sources: - 'null' display_label: - default: Monograph Title - property_uri: http://hyrax-example.com/monograph_title + default: Bulkrax Identifier + property_uri: http://hyrax-example.com/bulkrax_identifier range: http://www.w3.org/2001/XMLSchema#string - sample_values: - - Example Monograph Title - view: - html_dl: true - record_info: - available_on: - class: - - Monograph - cardinality: - minimum: 1 - maximum: 1 - multi_value: false - controlled_values: - format: http://www.w3.org/2001/XMLSchema#string - sources: - - 'null' - display_label: - default: Record Info - index_documentation: searchable indexing: - - record_info_tesim - form: - required: true - primary: true - property_uri: http://hyrax-example.com/record_info - range: http://www.w3.org/2001/XMLSchema#string - sample_values: - - Example Record Info - view: - html_dl: true - place_of_publication: - available_on: - class: - - Monograph - cardinality: - minimum: 0 - maximum: 1 - multi_value: false - controlled_values: - format: http://www.w3.org/2001/XMLSchema#string - sources: - - 'null' - display_label: - default: Place of Publication + - bulkrax_identifier_tesim + - bulkrax_identifier_ssi form: + display: false required: false - primary: true - property_uri: http://hyrax-example.com/place_of_publication - range: http://www.w3.org/2001/XMLSchema#string - sample_values: - - Example Place of Publication - view: - html_dl: true - genre: - available_on: - class: - - Monograph - cardinality: - minimum: 0 - maximum: 1 - multi_value: false - controlled_values: - format: http://www.w3.org/2001/XMLSchema#string - sources: - - 'null' - display_label: - default: Genre - form: - primary: true - property_uri: http://hyrax-example.com/genre - range: http://www.w3.org/2001/XMLSchema#string - sample_values: - - Fiction - - Non-Fiction - view: - html_dl: true - series_title: + primary: false + multi_value: false + show_pdf_viewer: available_on: class: - - Monograph + - GenericWorkResource + - ImageResource cardinality: minimum: 0 maximum: 1 multi_value: false controlled_values: - format: http://www.w3.org/2001/XMLSchema#string + format: http://www.w3.org/2001/XMLSchema#bool sources: - 'null' display_label: - default: Series Title + default: Show PDF Viewer + property_uri: http://id.loc.gov/vocabulary/identifiers/show_pdf_viewer + range: http://www.w3.org/2001/XMLSchema#bool + indexing: + - show_pdf_viewer_bdi form: + display: false + required: false primary: false - property_uri: http://hyrax-example.com/series_title - range: http://www.w3.org/2001/XMLSchema#string - sample_values: - - Example Series Title - view: - html_dl: true - table_of_contents: + multi_value: false + show_pdf_download_button: available_on: class: - - Monograph + - GenericWorkResource + - ImageResource cardinality: minimum: 0 maximum: 1 multi_value: false controlled_values: - format: http://www.w3.org/2001/XMLSchema#string + format: http://www.w3.org/2001/XMLSchema#bool sources: - 'null' display_label: - default: Table of Contents + default: Show PDF Download Button + property_uri: http://id.loc.gov/vocabulary/identifiers/show_pdf_download_button + range: http://www.w3.org/2001/XMLSchema#bool + indexing: + - show_pdf_download_button_bsi form: - multiple: false - property_uri: http://hyrax-example.com/table_of_contents - range: http://www.w3.org/2001/XMLSchema#string - sample_values: - - Example Table of Contents - view: - html_dl: true - date_of_issuance: + display: false + required: false + primary: false + multi_value: false + video_embed: available_on: class: - - Monograph + - GenericWorkResource + - ImageResource cardinality: minimum: 0 maximum: 1 @@ -1035,10 +953,13 @@ properties: sources: - 'null' display_label: - default: Date of Issuance - property_uri: http://hyrax-example.com/date_of_issuance + default: Video Embed + property_uri: https://atla.com/terms/video_embed range: http://www.w3.org/2001/XMLSchema#string - sample_values: - - '2024-06-06 21:06:51 +0000' - view: - html_dl: true + indexing: + - video_embed_tesi + form: + display: false + required: false + primary: false + multi_value: false From 958426c6f1011b99440291cd350721668cc0946c Mon Sep 17 00:00:00 2001 From: Shana Moore Date: Tue, 2 Jul 2024 08:49:55 -0700 Subject: [PATCH 06/46] Add Oer/Etd resources to m3_profile + convert iiif print yml iiif print yaml has been included in the base m3 profile. we may want to consider how to support multiple, separate profiles. otherwise all of the work types will be forced to hold the same properties. ref: - https://github.com/scientist-softserv/iiif_print/blob/main/config/metadata/child_works_from_pdf_splitting.yaml --- config/metadata_profiles/m3_profile.yaml | 117 +++++++++++++++++++++++ 1 file changed, 117 insertions(+) diff --git a/config/metadata_profiles/m3_profile.yaml b/config/metadata_profiles/m3_profile.yaml index 429dab9b6..95aa67c00 100644 --- a/config/metadata_profiles/m3_profile.yaml +++ b/config/metadata_profiles/m3_profile.yaml @@ -11,6 +11,10 @@ classes: display_label: Generic Work ImageResource: display_label: Image + OerResource: + display_label: OER + EtdResource: + display_label: ETD AdminSetResource: display_label: AdminSetResource CollectionResource: @@ -42,6 +46,8 @@ properties: - CollectionResource - GenericWorkResource - ImageResource + - OerResource + - EtdResource cardinality: minimum: 1 multi_value: true @@ -85,6 +91,8 @@ properties: - CollectionResource - GenericWorkResource - ImageResource + - OerResource + - EtdResource cardinality: minimum: 0 maximum: 1 @@ -113,6 +121,8 @@ properties: - CollectionResource - GenericWorkResource - ImageResource + - OerResource + - EtdResource cardinality: minimum: 0 maximum: 1 @@ -131,6 +141,8 @@ properties: - CollectionResource - GenericWorkResource - ImageResource + - OerResource + - EtdResource cardinality: minimum: 0 maximum: 1 @@ -156,6 +168,8 @@ properties: - CollectionResource - GenericWorkResource - ImageResource + - OerResource + - EtdResource cardinality: minimum: 1 multi_value: true @@ -186,6 +200,8 @@ properties: - CollectionResource - GenericWorkResource - ImageResource + - OerResource + - EtdResource cardinality: minimum: 0 multi_value: true @@ -215,6 +231,8 @@ properties: - CollectionResource - GenericWorkResource - ImageResource + - OerResource + - EtdResource cardinality: minimum: 0 multi_value: true @@ -242,6 +260,8 @@ properties: - CollectionResource - GenericWorkResource - ImageResource + - OerResource + - EtdResource cardinality: minimum: 0 multi_value: true @@ -270,6 +290,8 @@ properties: - CollectionResource - GenericWorkResource - ImageResource + - OerResource + - EtdResource cardinality: minimum: 0 multi_value: true @@ -300,6 +322,8 @@ properties: - CollectionResource - GenericWorkResource - ImageResource + - OerResource + - EtdResource cardinality: minimum: 0 maximum: 1 @@ -323,6 +347,8 @@ properties: - CollectionResource - GenericWorkResource - ImageResource + - OerResource + - EtdResource cardinality: minimum: 0 multi_value: true @@ -351,6 +377,8 @@ properties: - CollectionResource - GenericWorkResource - ImageResource + - OerResource + - EtdResource cardinality: minimum: 0 multi_value: true @@ -379,6 +407,8 @@ properties: - CollectionResource - GenericWorkResource - ImageResource + - OerResource + - EtdResource cardinality: minimum: 0 multi_value: true @@ -408,6 +438,8 @@ properties: - CollectionResource - GenericWorkResource - ImageResource + - OerResource + - EtdResource cardinality: minimum: 0 multi_value: true @@ -438,6 +470,8 @@ properties: - CollectionResource - GenericWorkResource - ImageResource + - OerResource + - EtdResource cardinality: minimum: 0 multi_value: true @@ -464,6 +498,8 @@ properties: - CollectionResource - GenericWorkResource - ImageResource + - OerResource + - EtdResource cardinality: minimum: 0 multi_value: true @@ -493,6 +529,8 @@ properties: - CollectionResource - GenericWorkResource - ImageResource + - OerResource + - EtdResource cardinality: minimum: 0 maximum: 1 @@ -514,6 +552,8 @@ properties: - CollectionResource - GenericWorkResource - ImageResource + - OerResource + - EtdResource cardinality: minimum: 0 multi_value: true @@ -544,6 +584,8 @@ properties: - CollectionResource - GenericWorkResource - ImageResource + - OerResource + - EtdResource cardinality: minimum: 0 maximum: 1 @@ -571,6 +613,8 @@ properties: - CollectionResource - GenericWorkResource - ImageResource + - OerResource + - EtdResource cardinality: minimum: 0 multi_value: true @@ -601,6 +645,8 @@ properties: - CollectionResource - GenericWorkResource - ImageResource + - OerResource + - EtdResource cardinality: minimum: 0 multi_value: true @@ -630,6 +676,8 @@ properties: - CollectionResource - GenericWorkResource - ImageResource + - OerResource + - EtdResource cardinality: minimum: 0 multi_value: true @@ -659,6 +707,8 @@ properties: - CollectionResource - GenericWorkResource - ImageResource + - OerResource + - EtdResource cardinality: minimum: 0 maximum: 1 @@ -680,6 +730,8 @@ properties: - CollectionResource - GenericWorkResource - ImageResource + - OerResource + - EtdResource cardinality: minimum: 0 multi_value: true @@ -710,6 +762,8 @@ properties: - CollectionResource - GenericWorkResource - ImageResource + - OerResource + - EtdResource cardinality: minimum: 0 multi_value: true @@ -738,6 +792,8 @@ properties: - CollectionResource - GenericWorkResource - ImageResource + - OerResource + - EtdResource cardinality: minimum: 0 multi_value: true @@ -767,6 +823,8 @@ properties: - CollectionResource - GenericWorkResource - ImageResource + - OerResource + - EtdResource cardinality: minimum: 0 multi_value: true @@ -796,6 +854,8 @@ properties: - CollectionResource - GenericWorkResource - ImageResource + - OerResource + - EtdResource cardinality: minimum: 0 multi_value: true @@ -871,6 +931,8 @@ properties: - CollectionResource - GenericWorkResource - ImageResource + - OerResource + - EtdResource cardinality: minimum: 0 maximum: 1 @@ -896,6 +958,8 @@ properties: class: - GenericWorkResource - ImageResource + - OerResource + - EtdResource cardinality: minimum: 0 maximum: 1 @@ -920,6 +984,8 @@ properties: class: - GenericWorkResource - ImageResource + - OerResource + - EtdResource cardinality: minimum: 0 maximum: 1 @@ -944,6 +1010,8 @@ properties: class: - GenericWorkResource - ImageResource + - OerResource + - EtdResource cardinality: minimum: 0 maximum: 1 @@ -963,3 +1031,52 @@ properties: required: false primary: false multi_value: false + is_child: + available_on: + class: + - GenericWorkResource + - ImageResource + - OerResource + - EtdResource + cardinality: + minimum: 0 + maximum: 1 + multi_value: false + controlled_values: + format: http://www.w3.org/2001/XMLSchema#bool + sources: + - 'null' + property_uri: http://id.loc.gov/vocabulary/identifiers/isChild + range: http://www.w3.org/2001/XMLSchema#bool + indexing: + - is_child_bsi + form: + display: false + required: false + primary: false + multi_value: false + split_from_pdf_id: + available_on: + class: + - GenericWorkResource + - ImageResource + - OerResource + - EtdResource + cardinality: + minimum: 0 + maximum: 1 + multi_value: false + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + property_uri: http://id.loc.gov/vocabulary/identifiers/splitFromPdfId + range: http://www.w3.org/2001/XMLSchema#string + indexing: + - split_from_pdf_id_ssi + form: + display: false + required: false + primary: false + multi_value: false + From a3773d9657f9eb7b4e3abcebe3a6742e58b5668a Mon Sep 17 00:00:00 2001 From: Shana Moore Date: Tue, 2 Jul 2024 09:58:00 -0700 Subject: [PATCH 07/46] :gift: Add metadata_profiles route --- config/metadata_profiles/m3_profile.yaml | 32 ++---------------------- config/routes.rb | 8 ++++++ db/seeds.rb | 2 +- 3 files changed, 11 insertions(+), 31 deletions(-) diff --git a/config/metadata_profiles/m3_profile.yaml b/config/metadata_profiles/m3_profile.yaml index 95aa67c00..89500859d 100644 --- a/config/metadata_profiles/m3_profile.yaml +++ b/config/metadata_profiles/m3_profile.yaml @@ -3,8 +3,8 @@ m3_version: 1.0.beta2 profile: date_modified: '2024-06-01' responsibility: https://samvera.org - responsibility_statement: Hyrax Initial Profile - type: Initial Profile + responsibility_statement: Hyku Initial Profile + type: Hyku Initial Profile version: 1 classes: GenericWorkResource: @@ -19,10 +19,6 @@ classes: display_label: AdminSetResource CollectionResource: display_label: PcdmCollection - Hyrax::FileSet: - display_label: FileSet - Hyrax::PcdmCollection: - display_label: PcdmCollection contexts: flexible_context: display_label: Flexible Metadata Example @@ -42,7 +38,6 @@ properties: available_on: class: - AdminSetResource - - Hyrax::FileSet - CollectionResource - GenericWorkResource - ImageResource @@ -87,7 +82,6 @@ properties: available_on: class: - AdminSetResource - - Hyrax::FileSet - CollectionResource - GenericWorkResource - ImageResource @@ -117,7 +111,6 @@ properties: available_on: class: - AdminSetResource - - Hyrax::FileSet - CollectionResource - GenericWorkResource - ImageResource @@ -137,7 +130,6 @@ properties: available_on: class: - AdminSetResource - - Hyrax::FileSet - CollectionResource - GenericWorkResource - ImageResource @@ -164,7 +156,6 @@ properties: available_on: class: - AdminSetResource - - Hyrax::FileSet - CollectionResource - GenericWorkResource - ImageResource @@ -196,7 +187,6 @@ properties: license: available_on: class: - - Hyrax::FileSet - CollectionResource - GenericWorkResource - ImageResource @@ -227,7 +217,6 @@ properties: abstract: available_on: class: - - Hyrax::FileSet - CollectionResource - GenericWorkResource - ImageResource @@ -343,7 +332,6 @@ properties: based_near: available_on: class: - - Hyrax::FileSet - CollectionResource - GenericWorkResource - ImageResource @@ -403,7 +391,6 @@ properties: contributor: available_on: class: - - Hyrax::FileSet - CollectionResource - GenericWorkResource - ImageResource @@ -434,7 +421,6 @@ properties: date_created: available_on: class: - - Hyrax::FileSet - CollectionResource - GenericWorkResource - ImageResource @@ -466,7 +452,6 @@ properties: description: available_on: class: - - Hyrax::FileSet - CollectionResource - GenericWorkResource - ImageResource @@ -494,7 +479,6 @@ properties: identifier: available_on: class: - - Hyrax::FileSet - CollectionResource - GenericWorkResource - ImageResource @@ -548,7 +532,6 @@ properties: keyword: available_on: class: - - Hyrax::FileSet - CollectionResource - GenericWorkResource - ImageResource @@ -580,7 +563,6 @@ properties: label: available_on: class: - - Hyrax::FileSet - CollectionResource - GenericWorkResource - ImageResource @@ -609,7 +591,6 @@ properties: language: available_on: class: - - Hyrax::FileSet - CollectionResource - GenericWorkResource - ImageResource @@ -641,7 +622,6 @@ properties: publisher: available_on: class: - - Hyrax::FileSet - CollectionResource - GenericWorkResource - ImageResource @@ -672,7 +652,6 @@ properties: related_url: available_on: class: - - Hyrax::FileSet - CollectionResource - GenericWorkResource - ImageResource @@ -703,7 +682,6 @@ properties: relative_path: available_on: class: - - Hyrax::FileSet - CollectionResource - GenericWorkResource - ImageResource @@ -726,7 +704,6 @@ properties: resource_type: available_on: class: - - Hyrax::FileSet - CollectionResource - GenericWorkResource - ImageResource @@ -758,7 +735,6 @@ properties: rights_notes: available_on: class: - - Hyrax::FileSet - CollectionResource - GenericWorkResource - ImageResource @@ -788,7 +764,6 @@ properties: rights_statement: available_on: class: - - Hyrax::FileSet - CollectionResource - GenericWorkResource - ImageResource @@ -819,7 +794,6 @@ properties: source: available_on: class: - - Hyrax::FileSet - CollectionResource - GenericWorkResource - ImageResource @@ -850,7 +824,6 @@ properties: subject: available_on: class: - - Hyrax::FileSet - CollectionResource - GenericWorkResource - ImageResource @@ -927,7 +900,6 @@ properties: bulkrax_identifier: available_on: class: - - Hyrax::FileSet - CollectionResource - GenericWorkResource - ImageResource diff --git a/config/routes.rb b/config/routes.rb index 49dc6a798..8b3bfc9bb 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -159,4 +159,12 @@ post "/dashboard/collections/:id/delete_uploaded_thumbnail", to: "hyrax/dashboard/collections#delete_uploaded_thumbnail", as: :delete_uploaded_thumbnail + + if ENV.fetch('HYRAX_FLEXIBLE', false) + # Metadata profiles routes + resources :metadata_profiles, except: [:update, :show, :destroy] do + collection { post :import } + get 'export' + end + end end diff --git a/db/seeds.rb b/db/seeds.rb index 4e1812338..41a03f3ff 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -32,7 +32,7 @@ end if Hyrax.config.flexible? - puts "\n== Loading basic metata profile" + puts "\n== Loading basic metadata profile" Hyrax::RequiredDataSeeders::FlexibleProfileSeeder.generate_seeds(logger: Logger.new(STDOUT)) end From f2e2be88cc751ce7a1555692aae47839257f8175 Mon Sep 17 00:00:00 2001 From: Shana Moore Date: Tue, 2 Jul 2024 10:10:58 -0700 Subject: [PATCH 08/46] revert changes to m3 for Hyrax::FileSet --- config/metadata_profiles/m3_profile.yaml | 28 ++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/config/metadata_profiles/m3_profile.yaml b/config/metadata_profiles/m3_profile.yaml index 89500859d..bc364c5f1 100644 --- a/config/metadata_profiles/m3_profile.yaml +++ b/config/metadata_profiles/m3_profile.yaml @@ -18,6 +18,10 @@ classes: AdminSetResource: display_label: AdminSetResource CollectionResource: + display_label: pcdmcollection + Hyrax::FileSet: + display_label: FileSet + Hyrax::PcdmCollection: display_label: PcdmCollection contexts: flexible_context: @@ -38,6 +42,7 @@ properties: available_on: class: - AdminSetResource + - Hyrax::FileSet - CollectionResource - GenericWorkResource - ImageResource @@ -82,6 +87,7 @@ properties: available_on: class: - AdminSetResource + - Hyrax::FileSet - CollectionResource - GenericWorkResource - ImageResource @@ -111,6 +117,7 @@ properties: available_on: class: - AdminSetResource + - Hyrax::FileSet - CollectionResource - GenericWorkResource - ImageResource @@ -130,6 +137,7 @@ properties: available_on: class: - AdminSetResource + - Hyrax::FileSet - CollectionResource - GenericWorkResource - ImageResource @@ -156,6 +164,7 @@ properties: available_on: class: - AdminSetResource + - Hyrax::FileSet - CollectionResource - GenericWorkResource - ImageResource @@ -187,6 +196,7 @@ properties: license: available_on: class: + - Hyrax::FileSet - CollectionResource - GenericWorkResource - ImageResource @@ -217,6 +227,7 @@ properties: abstract: available_on: class: + - Hyrax::FileSet - CollectionResource - GenericWorkResource - ImageResource @@ -332,6 +343,7 @@ properties: based_near: available_on: class: + - Hyrax::FileSet - CollectionResource - GenericWorkResource - ImageResource @@ -391,6 +403,7 @@ properties: contributor: available_on: class: + - Hyrax::FileSet - CollectionResource - GenericWorkResource - ImageResource @@ -421,6 +434,7 @@ properties: date_created: available_on: class: + - Hyrax::FileSet - CollectionResource - GenericWorkResource - ImageResource @@ -452,6 +466,7 @@ properties: description: available_on: class: + - Hyrax::FileSet - CollectionResource - GenericWorkResource - ImageResource @@ -479,6 +494,7 @@ properties: identifier: available_on: class: + - Hyrax::FileSet - CollectionResource - GenericWorkResource - ImageResource @@ -532,6 +548,7 @@ properties: keyword: available_on: class: + - Hyrax::FileSet - CollectionResource - GenericWorkResource - ImageResource @@ -563,6 +580,7 @@ properties: label: available_on: class: + - Hyrax::FileSet - CollectionResource - GenericWorkResource - ImageResource @@ -591,6 +609,7 @@ properties: language: available_on: class: + - Hyrax::FileSet - CollectionResource - GenericWorkResource - ImageResource @@ -622,6 +641,7 @@ properties: publisher: available_on: class: + - Hyrax::FileSet - CollectionResource - GenericWorkResource - ImageResource @@ -652,6 +672,7 @@ properties: related_url: available_on: class: + - Hyrax::FileSet - CollectionResource - GenericWorkResource - ImageResource @@ -682,6 +703,7 @@ properties: relative_path: available_on: class: + - Hyrax::FileSet - CollectionResource - GenericWorkResource - ImageResource @@ -704,6 +726,7 @@ properties: resource_type: available_on: class: + - Hyrax::FileSet - CollectionResource - GenericWorkResource - ImageResource @@ -735,6 +758,7 @@ properties: rights_notes: available_on: class: + - Hyrax::FileSet - CollectionResource - GenericWorkResource - ImageResource @@ -764,6 +788,7 @@ properties: rights_statement: available_on: class: + - Hyrax::FileSet - CollectionResource - GenericWorkResource - ImageResource @@ -794,6 +819,7 @@ properties: source: available_on: class: + - Hyrax::FileSet - CollectionResource - GenericWorkResource - ImageResource @@ -824,6 +850,7 @@ properties: subject: available_on: class: + - Hyrax::FileSet - CollectionResource - GenericWorkResource - ImageResource @@ -900,6 +927,7 @@ properties: bulkrax_identifier: available_on: class: + - Hyrax::FileSet - CollectionResource - GenericWorkResource - ImageResource From 601f5a9f31c5affb8ef352ded01aa0ea30d638aa Mon Sep 17 00:00:00 2001 From: Shana Moore Date: Tue, 2 Jul 2024 13:02:41 -0700 Subject: [PATCH 09/46] :gift: update m3_profile with Oer and Etd specifications --- config/metadata_profiles/m3_profile.yaml | 711 +++++++++++++++++++++-- 1 file changed, 678 insertions(+), 33 deletions(-) diff --git a/config/metadata_profiles/m3_profile.yaml b/config/metadata_profiles/m3_profile.yaml index bc364c5f1..141683574 100644 --- a/config/metadata_profiles/m3_profile.yaml +++ b/config/metadata_profiles/m3_profile.yaml @@ -883,6 +883,7 @@ properties: available_on: class: - CollectionResource + - EtdResource cardinality: minimum: 0 maximum: 1 @@ -924,6 +925,622 @@ properties: - Computer Science 50 view: html_dl: true + format: + available_on: + class: + - EtdResource + cardinality: + minimum: 0 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Format + index_documentation: searchable + indexing: + - 'format_tesim' + form: + required: false + primary: false + multiple: true + property_uri: http://purl.org/dc/terms/format + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - PDF + + # Image-specific metadata from image_resource.yaml + extent: + available_on: + class: + - ImageResource + cardinality: + minimum: 0 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Extent + index_documentation: searchable + indexing: + - 'extent_tesim' + form: + required: false + primary: false + multiple: true + property_uri: http://purl.org/dc/terms/extent + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - "300 dpi" + - "1024x768 pixels" + # OER-specific metadata from oer_resource.yaml + accessibility_feature: + available_on: + class: + - OerResource + cardinality: + minimum: 0 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Accessibility Feature + index_documentation: displayable, searchable + indexing: + - 'accessibility_feature_tesim' + - 'accessibility_feature_sim' + form: + primary: false + multiple: true + property_uri: http://schema.org/accessibilityFeature + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - Subtitles + - Audio Description + - Transcripts + accessibility_hazard: + available_on: + class: + - OerResource + cardinality: + minimum: 0 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Accessibility Hazard + index_documentation: displayable, searchable + indexing: + - 'accessibility_hazard_tesim' + - 'accessibility_hazard_sim' + form: + primary: false + multiple: true + property_uri: http://schema.org/accessibilityHazard + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - Motion Simulation + accessibility_summary: + available_on: + class: + - OerResource + cardinality: + minimum: 0 + maximum: 1 + multi_value: false + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Accessibility Summary + index_documentation: displayable, searchable + indexing: + - 'accessibility_summary_tesim' + - 'accessibility_summary_sim' + form: + primary: false + multiple: false + property_uri: http://schema.org/accessibilitySummary + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - This resource includes subtitles for all video content. + - The resource provides text descriptions for all images. + admin_note: + available_on: + class: + - OerResource + - EtdResource + cardinality: + minimum: 0 + maximum: 1 + multi_value: false + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Admin Note + index_documentation: searchable + indexing: + - 'admin_note_tesim' + form: + primary: false + multiple: false + property_uri: http://schema.org/positiveNotes + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - This is an admin note. + - Another example of an admin note. + additional_information: + available_on: + class: + - OerResource + - EtdResource + cardinality: + minimum: 0 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Additional Information + index_documentation: searchable + indexing: + - 'additional_information_tesim' + form: + primary: false + multiple: true + property_uri: http://purl.org/dc/terms/accessRights + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - This is some additional information. + - More details and context. + alternate_version_id: + available_on: + class: + - OerResource + cardinality: + minimum: 0 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Alternate Version ID + index_documentation: displayable, searchable + indexing: + - 'alternate_version_id_tesim' + - 'alternate_version_id_sim' + property_uri: http://purl.org/dc/terms/hasVersion + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - alt_version_1 + - alt_version_2 + audience: + available_on: + class: + - OerResource + cardinality: + minimum: 1 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Audience + index_documentation: displayable, searchable + indexing: + - 'audience_tesim' + - 'audience_sim' + form: + required: true + primary: true + property_uri: http://schema.org/EducationalAudience + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - Student + - Instructor + date: + available_on: + class: + - OerResource + - EtdResource + cardinality: + minimum: 0 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Date + index_documentation: displayable, searchable + indexing: + - 'date_tesim' + - 'date_sim' + property_uri: https://hykucommons.org/terms/date + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - "2024-06-07" + - "2023-05-12" + discipline: + available_on: + class: + - OerResource + cardinality: + minimum: 1 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Discipline + index_documentation: searchable + indexing: + - 'discipline_tesim' + form: + required: true + primary: true + property_uri: https://hykucommons.org/terms/degree_discipline + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - "Languages - Spanish" + - "Natural Sciences - Physics" + education_level: + available_on: + class: + - OerResource + cardinality: + minimum: 1 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Education Level + index_documentation: displayable, searchable + indexing: + - 'education_level_tesim' + - 'education_level_sim' + form: + required: true + primary: true + property_uri: http://purl.org/dc/terms/educationLevel + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - "Community college / Lower division" + - "College / Upper division" + learning_resource_type: + available_on: + class: + - OerResource + cardinality: + minimum: 1 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Learning Resource Type + index_documentation: displayable, searchable + indexing: + - 'learning_resource_type_tesim' + - 'learning_resource_type_sim' + form: + required: true + primary: true + property_uri: http://schema.org/learningResourceType + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - "Activity/lab" + - "Assessment (test, quizzes, etc.)" + newer_version_id: + available_on: + class: + - OerResource + cardinality: + minimum: 0 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Newer Version ID + index_documentation: displayable, searchable + indexing: + - 'newer_version_id_tesim' + - 'newer_version_id_sim' + property_uri: http://purl.org/dc/terms/isReplacedBy + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - new_version_1 + - new_version_2 + oer_size: + available_on: + class: + - OerResource + cardinality: + minimum: 0 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: OER Size + index_documentation: searchable + indexing: + - 'oer_size_tesim' + form: + primary: false + multiple: true + property_uri: http://purl.org/dc/terms/extent + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - 15MB + - 200 pages + previous_version_id: + available_on: + class: + - OerResource + cardinality: + minimum: 0 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Previous Version ID + index_documentation: displayable, searchable + indexing: + - 'previous_version_id_tesim' + - 'previous_version_id_sim' + property_uri: http://purl.org/dc/terms/replaces + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - prev_version_1 + - prev_version_2 + related_item_id: + available_on: + class: + - OerResource + cardinality: + minimum: 0 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Related Item ID + index_documentation: displayable, searchable + indexing: + - 'related_item_id_tesim' + - 'related_item_id_sim' + property_uri: http://purl.org/dc/terms/relation + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - related_item_1 + - related_item_2 + rights_holder: + available_on: + class: + - OerResource + cardinality: + minimum: 0 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Rights Holder + index_documentation: displayable, searchable + indexing: + - 'rights_holder_tesim' + - 'rights_holder_sim' + form: + primary: false + multiple: true + property_uri: http://purl.org/dc/terms/rightsHolder + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - John Doe + - Jane Smith + table_of_contents: + available_on: + class: + - OerResource + cardinality: + minimum: 0 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Table of Contents + index_documentation: searchable + indexing: + - 'table_of_contents_tesim' + form: + primary: false + multiple: true + property_uri: http://purl.org/dc/terms/tableOfContents + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - "Chapter 1: Introduction" + - "Chapter 2: Literature Review" + - "Chapter 3: Methodology" + # ETD-specific metadata - etd_resource.yaml + advisor: + available_on: + class: + - EtdResource + cardinality: + minimum: 0 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Advisor + index_documentation: searchable + indexing: + - 'advisor_tesim' + form: + required: false + primary: false + multiple: true + property_uri: https://hykucommons.org/terms/advisor + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - Dr. John Doe + - Dr. Jane Smith + committee_member: + available_on: + class: + - EtdResource + cardinality: + minimum: 0 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Committee Member + index_documentation: searchable + indexing: + - 'committee_member_tesim' + form: + required: false + primary: false + multiple: true + property_uri: https://hykucommons.org/terms/committee_member + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - Dr. John Doe + - Dr. Jane Smith + degree_name: + available_on: + class: + - EtdResource + cardinality: + minimum: 1 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Degree Name + index_documentation: searchable + indexing: + - 'degree_name_tesim' + form: + required: true + primary: true + multiple: true + property_uri: https://hykucommons.org/terms/degree_name + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - Bachelor of Science + - Master of Arts + degree_level: + available_on: + class: + - EtdResource + cardinality: + minimum: 1 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Degree Level + index_documentation: searchable + indexing: + - 'degree_level_tesim' + form: + required: true + primary: true + multiple: true + property_uri: https://hykucommons.org/terms/degree_level + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - Undergraduate + - Graduate + degree_discipline: + available_on: + class: + - EtdResource + cardinality: + minimum: 1 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Degree Discipline + index_documentation: searchable + indexing: + - 'degree_discipline_tesim' + form: + required: true + primary: true + multiple: true + property_uri: https://hykucommons.org/terms/degree_discipline + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - Computer Science + - Biology + degree_grantor: + available_on: + class: + - EtdResource + cardinality: + minimum: 1 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Degree Grantor + index_documentation: searchable + indexing: + - 'degree_grantor_tesim' + form: + required: true + primary: true + multiple: true + property_uri: https://hykucommons.org/terms/degree_grantor + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - University of Example + - Example State University + format: + # Bulkrax metadata from bulkrax_metadata.yaml bulkrax_identifier: available_on: class: @@ -943,16 +1560,20 @@ properties: - 'null' display_label: default: Bulkrax Identifier - property_uri: http://hyrax-example.com/bulkrax_identifier - range: http://www.w3.org/2001/XMLSchema#string + index_documentation: displayable, searchable indexing: - - bulkrax_identifier_tesim - - bulkrax_identifier_ssi + - 'bulkrax_identifier_tesi' + - 'bulkrax_identifier_ssi' form: display: false - required: false primary: false - multi_value: false + required: false + multiple: false + property_uri: https://hykucommons.org/terms/bulkrax_identifier + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - example-bulkrax-identifier + # PDF.js metadata from with_pdf_viewer.yaml show_pdf_viewer: available_on: class: @@ -970,15 +1591,19 @@ properties: - 'null' display_label: default: Show PDF Viewer - property_uri: http://id.loc.gov/vocabulary/identifiers/show_pdf_viewer - range: http://www.w3.org/2001/XMLSchema#bool + index_documentation: displayable, searchable indexing: - - show_pdf_viewer_bdi + - 'show_pdf_viewer_bsi' form: display: false - required: false primary: false - multi_value: false + required: false + multiple: false + property_uri: http://id.loc.gov/vocabulary/identifiers/show_pdf_viewer + range: http://www.w3.org/2001/XMLSchema#bool + sample_values: + - "0" + - "1" show_pdf_download_button: available_on: class: @@ -996,15 +1621,20 @@ properties: - 'null' display_label: default: Show PDF Download Button - property_uri: http://id.loc.gov/vocabulary/identifiers/show_pdf_download_button - range: http://www.w3.org/2001/XMLSchema#bool + index_documentation: displayable, searchable indexing: - - show_pdf_download_button_bsi + - 'show_pdf_download_button_bsi' form: display: false - required: false primary: false - multi_value: false + required: false + multiple: false + property_uri: http://id.loc.gov/vocabulary/identifiers/show_pdf_download_button + range: http://www.w3.org/2001/XMLSchema#bool + sample_values: + - "0" + - "1" + # Video Embed metadata - with_video_embed.yaml video_embed: available_on: class: @@ -1022,16 +1652,21 @@ properties: - 'null' display_label: default: Video Embed - property_uri: https://atla.com/terms/video_embed - range: http://www.w3.org/2001/XMLSchema#string + index_documentation: searchable indexing: - - video_embed_tesi + - 'video_embed_tesi' form: - display: false - required: false + display: true primary: false - multi_value: false - is_child: + required: false + multiple: false + property_uri: https://atla.com/terms/video_embed + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - "https://player.vimeo.com/video/467264493?h=b089de0eab" + - "https://www.youtube.com/embed/Znf73dsFdC8" + # IiifPrint metadata - child_works_from_pdf_splitting.yaml + is_child: available_on: class: - GenericWorkResource @@ -1046,16 +1681,22 @@ properties: format: http://www.w3.org/2001/XMLSchema#bool sources: - 'null' - property_uri: http://id.loc.gov/vocabulary/identifiers/isChild - range: http://www.w3.org/2001/XMLSchema#bool + display_label: + default: Is Child + index_documentation: displayable, searchable indexing: - - is_child_bsi + - 'is_child_bsi' form: display: false required: false primary: false - multi_value: false - split_from_pdf_id: + multiple: false + property_uri: http://id.loc.gov/vocabulary/identifiers/isChild + range: http://www.w3.org/2001/XMLSchema#bool + sample_values: + - true + - false + split_from_pdf_id: available_on: class: - GenericWorkResource @@ -1070,13 +1711,17 @@ properties: format: http://www.w3.org/2001/XMLSchema#string sources: - 'null' - property_uri: http://id.loc.gov/vocabulary/identifiers/splitFromPdfId - range: http://www.w3.org/2001/XMLSchema#string + display_label: + default: Split from PDF ID + index_documentation: searchable indexing: - - split_from_pdf_id_ssi + - 'split_from_pdf_id_ssi' form: display: false required: false primary: false - multi_value: false - + multiple: false + property_uri: http://id.loc.gov/vocabulary/identifiers/splitFromPdfId + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - example-split-from-pdf-id From e57f8e6ed7b91b7cb8b3c0d157a43fb64db42e3d Mon Sep 17 00:00:00 2001 From: Shana Moore Date: Tue, 2 Jul 2024 13:21:25 -0700 Subject: [PATCH 10/46] Update m3_profile.yaml --- config/metadata_profiles/m3_profile.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/config/metadata_profiles/m3_profile.yaml b/config/metadata_profiles/m3_profile.yaml index 141683574..519938e47 100644 --- a/config/metadata_profiles/m3_profile.yaml +++ b/config/metadata_profiles/m3_profile.yaml @@ -949,7 +949,6 @@ properties: range: http://www.w3.org/2001/XMLSchema#string sample_values: - PDF - # Image-specific metadata from image_resource.yaml extent: available_on: @@ -1539,7 +1538,6 @@ properties: sample_values: - University of Example - Example State University - format: # Bulkrax metadata from bulkrax_metadata.yaml bulkrax_identifier: available_on: From 7c2ce59c213c989d79b19fd6808f1116b0ad44ce Mon Sep 17 00:00:00 2001 From: Shana Moore Date: Tue, 2 Jul 2024 14:24:47 -0700 Subject: [PATCH 11/46] set VALKYRIE_TRANSITION env vars --- .env | 3 ++- ops/demo-deploy.tmpl.yaml | 2 ++ ops/staging-deploy.tmpl.yaml | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.env b/.env index 6cd549e5e..515544d72 100644 --- a/.env +++ b/.env @@ -71,4 +71,5 @@ HYRAX_ANALYTICS=false ##END## Enable Google Analytics HYRAX_FLEXIBLE=true -HYRAX_VALKYRIE=true \ No newline at end of file +HYRAX_VALKYRIE=true +VALKYRIE_TRANSITION=true \ No newline at end of file diff --git a/ops/demo-deploy.tmpl.yaml b/ops/demo-deploy.tmpl.yaml index bbd060274..e58f77510 100644 --- a/ops/demo-deploy.tmpl.yaml +++ b/ops/demo-deploy.tmpl.yaml @@ -183,6 +183,8 @@ extraEnvVars: &envVars value: $SENTRY_DSN - name: SENTRY_ENVIRONMENT value: $SENTRY_ENVIRONMENT + - name: VALKYRIE_TRANSITION + value: true worker: replicaCount: 1 extraVolumeMounts: *volMounts diff --git a/ops/staging-deploy.tmpl.yaml b/ops/staging-deploy.tmpl.yaml index 7ea29b25e..ecc25c793 100644 --- a/ops/staging-deploy.tmpl.yaml +++ b/ops/staging-deploy.tmpl.yaml @@ -185,6 +185,8 @@ extraEnvVars: &envVars value: $SENTRY_DSN - name: SENTRY_ENVIRONMENT value: $SENTRY_ENVIRONMENT + - name: VALKYRIE_TRANSITION + value: true worker: replicaCount: 1 From 270490392a4f4ffa9943543e4346061dc2815063 Mon Sep 17 00:00:00 2001 From: Shana Moore Date: Tue, 2 Jul 2024 14:41:31 -0700 Subject: [PATCH 12/46] :bug: override hyrax to fix files bug - reason for missing pdf.js checkboxes --- .../hyrax/solr_document_behavior_decorator.rb | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 app/models/concerns/hyrax/solr_document_behavior_decorator.rb diff --git a/app/models/concerns/hyrax/solr_document_behavior_decorator.rb b/app/models/concerns/hyrax/solr_document_behavior_decorator.rb new file mode 100644 index 000000000..ead09c204 --- /dev/null +++ b/app/models/concerns/hyrax/solr_document_behavior_decorator.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true +# OVERRIDE: Hyrax v5.0.1 to fix a bug +# previously presenter.file_set_presenters didn't know it +# had any files to display. +module Hyrax + ## + # @api public + # + # Hyrax extensions for +Blacklight+'s generated +SolrDocument+. + # + # @example using with +Blacklight::Solr::Document+ + # class SolrDocument + # include Blacklight::Solr::Document + # include Hyrax::SolrDocumentBehavior + # end + # + # @see https://github.com/projectblacklight/blacklight/wiki/Understanding-Rails-and-Blacklight#models + module SolrDocumentBehaviorDecorator + # Method to return the model + def hydra_model(classifier: nil) + model = first('has_model_ssim')&.safe_constantize + model = (first('has_model_ssim')&.+ 'Resource')&.safe_constantize if Hyrax.config.valkyrie_transition? + model || model_classifier(classifier).classifier(self).best_model + end + end +end + +Hyrax::SolrDocumentBehavior.prepend(Hyrax::SolrDocumentBehaviorDecorator) From a48da68ce38e8ca6eba06a05b2c51af6f1467b31 Mon Sep 17 00:00:00 2001 From: Shana Moore Date: Tue, 2 Jul 2024 14:42:27 -0700 Subject: [PATCH 13/46] :broom: update indexers for non flexible metadata --- app/indexers/admin_set_resource_indexer.rb | 3 +++ app/indexers/collection_resource_indexer.rb | 2 ++ app/indexers/etd_resource_indexer.rb | 1 + app/indexers/generic_work_resource_indexer.rb | 1 + app/indexers/image_resource_indexer.rb | 1 + app/indexers/oer_resource_indexer.rb | 1 + 6 files changed, 9 insertions(+) diff --git a/app/indexers/admin_set_resource_indexer.rb b/app/indexers/admin_set_resource_indexer.rb index f8555ef99..7a42e8aa0 100644 --- a/app/indexers/admin_set_resource_indexer.rb +++ b/app/indexers/admin_set_resource_indexer.rb @@ -1,4 +1,7 @@ # frozen_string_literal: true class AdminSetResourceIndexer < Hyrax::Indexers::AdministrativeSetIndexer + # include Hyrax::Indexer(:core_metadata) unless Hyrax.config.flexible? + # include Hyrax::Indexer('AdminSetResource') if Hyrax.config.flexible? end + diff --git a/app/indexers/collection_resource_indexer.rb b/app/indexers/collection_resource_indexer.rb index 8ad535a6f..05b5b7a3f 100644 --- a/app/indexers/collection_resource_indexer.rb +++ b/app/indexers/collection_resource_indexer.rb @@ -6,6 +6,8 @@ class CollectionResourceIndexer < Hyrax::Indexers::PcdmCollectionIndexer include Hyrax::Indexer(:basic_metadata) unless Hyrax.config.flexible? include Hyrax::Indexer(:bulkrax_metadata) unless Hyrax.config.flexible? include Hyrax::Indexer(:collection_resource) unless Hyrax.config.flexible? + include Hyrax::Indexer('CollectionResource') if Hyrax.config.flexible? + include Hyrax::IndexesThumbnails def to_solr diff --git a/app/indexers/etd_resource_indexer.rb b/app/indexers/etd_resource_indexer.rb index ba895c50a..30bfa34ee 100644 --- a/app/indexers/etd_resource_indexer.rb +++ b/app/indexers/etd_resource_indexer.rb @@ -8,6 +8,7 @@ class EtdResourceIndexer < Hyrax::ValkyrieWorkIndexer include Hyrax::Indexer(:etd_resource) unless Hyrax.config.flexible? include Hyrax::Indexer(:with_pdf_viewer) unless Hyrax.config.flexible? include Hyrax::Indexer(:with_video_embed) unless Hyrax.config.flexible? + include Hyrax::Indexer('EtdResource') if Hyrax.config.flexible? include HykuIndexing diff --git a/app/indexers/generic_work_resource_indexer.rb b/app/indexers/generic_work_resource_indexer.rb index 1a3c05ba2..ab2a7fd92 100644 --- a/app/indexers/generic_work_resource_indexer.rb +++ b/app/indexers/generic_work_resource_indexer.rb @@ -8,6 +8,7 @@ class GenericWorkResourceIndexer < Hyrax::ValkyrieWorkIndexer include Hyrax::Indexer(:generic_work_resource) unless Hyrax.config.flexible? include Hyrax::Indexer(:with_pdf_viewer) unless Hyrax.config.flexible? include Hyrax::Indexer(:with_video_embed) unless Hyrax.config.flexible? + include Hyrax::Indexer('GenericWorkResource') if Hyrax.config.flexible? include HykuIndexing # Uncomment this block if you want to add custom indexing behavior: diff --git a/app/indexers/image_resource_indexer.rb b/app/indexers/image_resource_indexer.rb index 086c84c3e..9d0005702 100644 --- a/app/indexers/image_resource_indexer.rb +++ b/app/indexers/image_resource_indexer.rb @@ -8,6 +8,7 @@ class ImageResourceIndexer < Hyrax::ValkyrieWorkIndexer include Hyrax::Indexer(:image_resource) unless Hyrax.config.flexible? include Hyrax::Indexer(:with_pdf_viewer) unless Hyrax.config.flexible? include Hyrax::Indexer(:with_video_embed) unless Hyrax.config.flexible? + include Hyrax::Indexer('ImageResource') if Hyrax.config.flexible? include HykuIndexing # Uncomment this block if you want to add custom indexing behavior: diff --git a/app/indexers/oer_resource_indexer.rb b/app/indexers/oer_resource_indexer.rb index 5cff81e2f..3d8ffd989 100644 --- a/app/indexers/oer_resource_indexer.rb +++ b/app/indexers/oer_resource_indexer.rb @@ -8,6 +8,7 @@ class OerResourceIndexer < Hyrax::ValkyrieWorkIndexer include Hyrax::Indexer(:oer_resource) unless Hyrax.config.flexible? include Hyrax::Indexer(:with_pdf_viewer) unless Hyrax.config.flexible? include Hyrax::Indexer(:with_video_embed) unless Hyrax.config.flexible? + include Hyrax::Indexer('OerResource') if Hyrax.config.flexible? include HykuIndexing From 98be47c5efd005333b0b9dfbe2f2daa596745059 Mon Sep 17 00:00:00 2001 From: Shana Moore Date: Wed, 3 Jul 2024 12:53:39 -0700 Subject: [PATCH 14/46] Update routes.rb --- config/routes.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/routes.rb b/config/routes.rb index 8b3bfc9bb..ea9f924eb 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -160,11 +160,11 @@ to: "hyrax/dashboard/collections#delete_uploaded_thumbnail", as: :delete_uploaded_thumbnail - if ENV.fetch('HYRAX_FLEXIBLE', false) + if ENV.fetch('HYRAX_FLEXIBLE', false) # Metadata profiles routes resources :metadata_profiles, except: [:update, :show, :destroy] do collection { post :import } get 'export' end end -end +end \ No newline at end of file From 9834baaae5626f77b36dee991052cd28426da97b Mon Sep 17 00:00:00 2001 From: LaRita Robinson Date: Wed, 3 Jul 2024 18:00:22 -0400 Subject: [PATCH 15/46] Fix bug in configuration menu --- .../dashboard/sidebar/_configuration.html.erb | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/app/views/hyrax/dashboard/sidebar/_configuration.html.erb b/app/views/hyrax/dashboard/sidebar/_configuration.html.erb index 0005e6fa6..6fe3b7855 100644 --- a/app/views/hyrax/dashboard/sidebar/_configuration.html.erb +++ b/app/views/hyrax/dashboard/sidebar/_configuration.html.erb @@ -30,7 +30,7 @@ <% end %> <% end %> <% if can?(:manage, Hyrax::Feature) %> - <%= menu.nav_link(hyrax.edit_pages_path, class: "nav-link", title: t('hyrax.admin.sidebar.pages')) do %> + <%= menu.nav_link(hyrax.edit_pages_path, class: "nav-link", title: t('hyrax.admin.sidebar.pages')) do %> <%= t('hyrax.admin.sidebar.pages') %> <% end %> <%= menu.nav_link(hyrax.edit_content_blocks_path, class: "nav-link", title: t('hyrax.admin.sidebar.content_blocks')) do %> @@ -43,20 +43,21 @@ <%= t('hyku.admin.work_types') %> <% end %> <% end %> + <% end %> + + <% end %> - <% if Flipflop.show_workflow_roles_menu_item_in_admin_dashboard_sidebar? && can?(:manage, Sipity::WorkflowResponsibility) %> - <%= menu.nav_link(hyrax.admin_workflow_roles_path, class: "nav-link", title: t('hyrax.admin.sidebar.workflow_roles')) do %> - <%= t('hyrax.admin.sidebar.workflow_roles') %> - <% end %> - <% end %> + <% if Flipflop.show_workflow_roles_menu_item_in_admin_dashboard_sidebar? && can?(:manage, Sipity::WorkflowResponsibility) %> + <%= menu.nav_link(hyrax.admin_workflow_roles_path, class: "nav-link", title: t('hyrax.admin.sidebar.workflow_roles')) do %> + <%= t('hyrax.admin.sidebar.workflow_roles') %> + <% end %> + <% end %> <% if can?(:update, RolesService) %> <%= menu.nav_link(main_app.admin_roles_service_jobs_path, class: "nav-link", title: t('hyrax.admin.sidebar.roles_service_jobs')) do %> <%= t('hyrax.admin.sidebar.roles_service_jobs') %> - <% end %> + <% end %> <% end %> - <% end %> - - <% end %> + <%= render 'hyrax/dashboard/sidebar/menu_partials', menu: menu, section: :configuration %> <% end %> From 8d849e4b2230dc0a77f34b835da8338b5fb8dc57 Mon Sep 17 00:00:00 2001 From: Shana Moore Date: Fri, 5 Jul 2024 07:43:57 -0700 Subject: [PATCH 16/46] Updates iiif_print and hyrax gems --- Gemfile.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 9200f334e..a7b4a3fdb 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -147,7 +147,7 @@ GIT GIT remote: https://github.com/samvera/hyrax.git - revision: 9e65f4a91ff44ba889ba9f5413e94d8be63cc668 + revision: 17f1e60f0c6d9d6339da8d8c085c6294517eed3e branch: flexible_double_combo specs: hyrax (5.0.1) @@ -221,10 +221,10 @@ GIT GIT remote: https://github.com/scientist-softserv/iiif_print.git - revision: 8d949ea88f0d68cb8e5fbc297c1e179b70cb6668 + revision: 63ef540419fcb3aabc73d61c0010638b173c11aa branch: i84-support-dynamic-metadata specs: - iiif_print (2.0.1) + iiif_print (3.0.1) blacklight_iiif_search (>= 1.0, < 3.0) derivative-rodeo (~> 0.5) hyrax (>= 2.5, < 6) From 7b3100df070966ee3f33bbb8b3f93203aae0fa10 Mon Sep 17 00:00:00 2001 From: Shana Moore Date: Fri, 5 Jul 2024 08:29:27 -0700 Subject: [PATCH 17/46] :broom: guard against order already if flexible_metadata? is true This causes errors if not in place. Given that the gem specifies its purpose was to solve an issue in fedora, it may not be necessary for valkyrie objects anyway. ref: - https://github.com/samvera-labs/order_already?tab=readme-ov-file#orderalready --- app/models/collection_resource.rb | 2 +- app/models/etd_resource.rb | 2 +- app/models/generic_work_resource.rb | 2 +- app/models/image_resource.rb | 2 +- app/models/oer_resource.rb | 2 +- config/initializers/riiif.rb | 5 +++++ 6 files changed, 10 insertions(+), 5 deletions(-) diff --git a/app/models/collection_resource.rb b/app/models/collection_resource.rb index d4ee29710..d6444a477 100644 --- a/app/models/collection_resource.rb +++ b/app/models/collection_resource.rb @@ -19,7 +19,7 @@ class CollectionResource < Hyrax::PcdmCollection include WithPermissionTemplateShim - prepend OrderAlready.for(:creator) + prepend OrderAlready.for(:creator) unless Hyrax.config.flexible? ## # @!group Methods to Extract diff --git a/app/models/etd_resource.rb b/app/models/etd_resource.rb index 7376abd1c..b36e77731 100644 --- a/app/models/etd_resource.rb +++ b/app/models/etd_resource.rb @@ -19,7 +19,7 @@ class EtdResource < Hyrax::Work pdf_splitter_service: IiifPrint::TenantConfig::PdfSplitter ) - prepend OrderAlready.for(:creator) + prepend OrderAlready.for(:creator) unless Hyrax.config.flexible? def human_readable_type super.upcase diff --git a/app/models/generic_work_resource.rb b/app/models/generic_work_resource.rb index 10b82550a..caae0e419 100644 --- a/app/models/generic_work_resource.rb +++ b/app/models/generic_work_resource.rb @@ -18,5 +18,5 @@ class GenericWorkResource < Hyrax::Work pdf_splitter_service: IiifPrint::TenantConfig::PdfSplitter ) - prepend OrderAlready.for(:creator) + prepend OrderAlready.for(:creator) unless Hyrax.config.flexible? end diff --git a/app/models/image_resource.rb b/app/models/image_resource.rb index 30aa4e5b6..92e35d418 100644 --- a/app/models/image_resource.rb +++ b/app/models/image_resource.rb @@ -18,5 +18,5 @@ class ImageResource < Hyrax::Work pdf_splitter_service: IiifPrint::TenantConfig::PdfSplitter ) - prepend OrderAlready.for(:creator) + prepend OrderAlready.for(:creator) unless Hyrax.config.flexible? end diff --git a/app/models/oer_resource.rb b/app/models/oer_resource.rb index 7ef49103f..8dca0765c 100644 --- a/app/models/oer_resource.rb +++ b/app/models/oer_resource.rb @@ -19,7 +19,7 @@ class OerResource < Hyrax::Work pdf_splitter_service: IiifPrint::TenantConfig::PdfSplitter ) - prepend OrderAlready.for(:creator) + prepend OrderAlready.for(:creator) unless Hyrax.config.flexible? def previous_version @previous_version ||= Hyrax.query_service.find_many_by_ids(ids: previous_version_id) if previous_version_id.present? diff --git a/config/initializers/riiif.rb b/config/initializers/riiif.rb index bae90983c..4e34cdcf7 100644 --- a/config/initializers/riiif.rb +++ b/config/initializers/riiif.rb @@ -1,4 +1,9 @@ # frozen_string_literal: true +require 'riiif/imagemagick_transformer' +require 'riiif/imagemagick_command_factory' +require 'riiif/crop' +require 'riiif/resize' + Rails.application.reloader.to_prepare do Riiif::Image.info_service = lambda do |id, _file| # id will look like a path to a pcdm:file From d3a7346e7ebd750ceca13c1d4287bbe5a72e661e Mon Sep 17 00:00:00 2001 From: Shana Moore Date: Fri, 5 Jul 2024 09:58:22 -0700 Subject: [PATCH 18/46] :construction: WIP - progress on making attribute_rows dynamic --- app/views/hyrax/base/_attribute_rows.html.erb | 25 +++++++ app/views/hyrax/etds/_attribute_rows.html.erb | 67 ++++++++++------- app/views/hyrax/oers/_attribute_rows.html.erb | 73 +++++++++++-------- config/metadata_profiles/m3_profile.yaml | 25 ++++++- 4 files changed, 132 insertions(+), 58 deletions(-) create mode 100644 app/views/hyrax/base/_attribute_rows.html.erb diff --git a/app/views/hyrax/base/_attribute_rows.html.erb b/app/views/hyrax/base/_attribute_rows.html.erb new file mode 100644 index 000000000..f8a2b91cc --- /dev/null +++ b/app/views/hyrax/base/_attribute_rows.html.erb @@ -0,0 +1,25 @@ +<%# OVERRIDE hyrax-doi to support dynamic metadata %> +<%# TODO: remove after hyrax-doi gem v0.2.0 and code is removed %> +<%# hyrax-doi doesn't work post hyrax v3.0.0 %> +<% if Hyrax.config.flexible? %> + <% view_options_for(presenter).each do |field, options| %> + <%= presenter.attribute_to_html(conform_field(field, options), conform_options(field, options)) %> + <% end %> +<% else %> + <%# Copied from hyrax-doi v0.2.0 %> + <%= presenter.attribute_to_html(:date_modified, label: t('hyrax.base.show.last_modified'), html_dl: true) %> + <%= presenter.attribute_to_html(:creator, render_as: :faceted, html_dl: true) %> + <%= presenter.attribute_to_html(:contributor, render_as: :faceted, html_dl: true) %> + <%= presenter.attribute_to_html(:subject, render_as: :faceted, html_dl: true) %> + <%= presenter.attribute_to_html(:publisher, render_as: :faceted, html_dl: true) %> + <%= presenter.attribute_to_html(:language, render_as: :faceted, html_dl: true) %> + <%= presenter.attribute_to_html(:identifier, render_as: :linked, search_field: 'identifier_tesim', html_dl: true) %> + <%= presenter.attribute_to_html(:keyword, render_as: :faceted, html_dl: true) %> + <%= presenter.attribute_to_html(:date_created, render_as: :linked, search_field: 'date_created_tesim', html_dl: true) %> + <%= presenter.attribute_to_html(:based_near_label, html_dl: true) %> + <%= presenter.attribute_to_html(:related_url, render_as: :external_link, html_dl: true) %> + <%= presenter.attribute_to_html(:resource_type, render_as: :faceted, html_dl: true) %> + <%= presenter.attribute_to_html(:source, html_dl: true) %> + <%= presenter.attribute_to_html(:rights_statement, render_as: :rights_statement, html_dl: true) %> + <%= presenter.attribute_to_html(:doi, render_as: :external_link, html_dl: true) if respond_to?(:render_doi?) && render_doi?(presenter) %> +<% end %> diff --git a/app/views/hyrax/etds/_attribute_rows.html.erb b/app/views/hyrax/etds/_attribute_rows.html.erb index bd2a37cde..9b8b42074 100644 --- a/app/views/hyrax/etds/_attribute_rows.html.erb +++ b/app/views/hyrax/etds/_attribute_rows.html.erb @@ -1,27 +1,40 @@ -<%= presenter.attribute_to_html(:admin_note, html_dl: true) if presenter.editor? %> -<%= presenter.attribute_to_html(:creator, render_as: :faceted, label: label_for(term: :creator, record_class: Etd), html_dl: true) %> -<%= presenter.attribute_to_html(:contributor, render_as: :faceted, html_dl: true) %> -<%= presenter.attribute_to_html(:subject, render_as: :faceted, html_dl: true) %> -<%= presenter.attribute_to_html(:publisher, render_as: :faceted, html_dl: true) %> -<%= presenter.attribute_to_html(:abstract, html_dl: true) %> -<%= presenter.attribute_to_html(:language, render_as: :faceted, html_dl: true) %> -<%= presenter.attribute_to_html(:identifier, render_as: :linked, search_field: 'identifier_tesim', html_dl: true) %> -<%= presenter.attribute_to_html(:keyword, render_as: :faceted, html_dl: true) %> -<%= presenter.attribute_to_html(:date_created, render_as: :linked, search_field: 'date_created_tesim', label: label_for(term: :date_created, record_class: Etd), html_dl: true) %> -<%= presenter.attribute_to_html(:based_near_label, html_dl: true) %> -<%= presenter.attribute_to_html(:related_url, render_as: :external_link, html_dl: true, label: 'Related URL') %> -<%= presenter.attribute_to_html(:resource_type, render_as: :faceted, label: label_for(term: :resource_type, record_class: Etd), html_dl: true) %> -<%= presenter.attribute_to_html(:source, html_dl: true) %> -<%= presenter.attribute_to_html(:bibliographic_citation, html_dl: true) %> -<%= presenter.attribute_to_html(:rights_statement, label: label_for(term: :rights_statement, record_class: Etd), html_dl: true) %> -<%= presenter.attribute_to_html(:additional_information, html_dl: true) %> -<%= presenter.attribute_to_html(:rights_notes, render_as: :linked, html_dl: true) %> -<%= presenter.attribute_to_html(:extent) %> -<%= presenter.attribute_to_html(:format, label: label_for(term: :format, record_class: Etd), html_dl: true) %> -<%= presenter.attribute_to_html(:degree_name, label: label_for(term: :degree_name, record_class: Etd), html_dl: true) %> -<%= presenter.attribute_to_html(:degree_level, label: label_for(term: :degree_level, record_class: Etd), html_dl: true) %> -<%= presenter.attribute_to_html(:degree_discipline, label: label_for(term: :degree_discipline, record_class: Etd), html_dl: true) %> -<%= presenter.attribute_to_html(:degree_grantor, label: label_for(term: :degree_grantor, record_class: Etd), html_dl: true) %> -<%= presenter.attribute_to_html(:advisor, label: label_for(term: :advisor, record_class: Etd), html_dl: true) %> -<%= presenter.attribute_to_html(:committee_member, label: label_for(term: :committee_member, record_class: Etd), html_dl: true) %> -<%= presenter.attribute_to_html(:department, label: label_for(term: :department, record_class: Etd), html_dl: true) %> +<%# OVERRIDE hyrax-doi to support dynamic metadata %> +<%# TODO: remove after hyrax-doi gem v0.2.0 and code is removed %> +<%# hyrax-doi doesn't work post hyrax v3.0.0 %> +<% if Hyrax.config.flexible? %> + <% view_options_for(presenter).each do |field, options| %> + <% if field == :admin_note %> + <%= presenter.attribute_to_html(:admin_note, options) if presenter.editor? %> + <% else %> + <%= presenter.attribute_to_html(conform_field(field, options), conform_options(field, options)) %> + <% end %> + <% end %> + <% else %> + <%= presenter.attribute_to_html(:admin_note, html_dl: true) if presenter.editor? %> + <%= presenter.attribute_to_html(:creator, render_as: :faceted, label: label_for(term: :creator, record_class: Etd), html_dl: true) %> + <%= presenter.attribute_to_html(:contributor, render_as: :faceted, html_dl: true) %> + <%= presenter.attribute_to_html(:subject, render_as: :faceted, html_dl: true) %> + <%= presenter.attribute_to_html(:publisher, render_as: :faceted, html_dl: true) %> + <%= presenter.attribute_to_html(:abstract, html_dl: true) %> + <%= presenter.attribute_to_html(:language, render_as: :faceted, html_dl: true) %> + <%= presenter.attribute_to_html(:identifier, render_as: :linked, search_field: 'identifier_tesim', html_dl: true) %> + <%= presenter.attribute_to_html(:keyword, render_as: :faceted, html_dl: true) %> + <%= presenter.attribute_to_html(:date_created, render_as: :linked, search_field: 'date_created_tesim', label: label_for(term: :date_created, record_class: Etd), html_dl: true) %> + <%= presenter.attribute_to_html(:based_near_label, html_dl: true) %> + <%= presenter.attribute_to_html(:related_url, render_as: :external_link, html_dl: true, label: 'Related URL') %> + <%= presenter.attribute_to_html(:resource_type, render_as: :faceted, label: label_for(term: :resource_type, record_class: Etd), html_dl: true) %> + <%= presenter.attribute_to_html(:source, html_dl: true) %> + <%= presenter.attribute_to_html(:bibliographic_citation, html_dl: true) %> + <%= presenter.attribute_to_html(:rights_statement, label: label_for(term: :rights_statement, record_class: Etd), html_dl: true) %> + <%= presenter.attribute_to_html(:additional_information, html_dl: true) %> + <%= presenter.attribute_to_html(:rights_notes, render_as: :linked, html_dl: true) %> + <%= presenter.attribute_to_html(:extent) %> + <%= presenter.attribute_to_html(:format, label: label_for(term: :format, record_class: Etd), html_dl: true) %> + <%= presenter.attribute_to_html(:degree_name, label: label_for(term: :degree_name, record_class: Etd), html_dl: true) %> + <%= presenter.attribute_to_html(:degree_level, label: label_for(term: :degree_level, record_class: Etd), html_dl: true) %> + <%= presenter.attribute_to_html(:degree_discipline, label: label_for(term: :degree_discipline, record_class: Etd), html_dl: true) %> + <%= presenter.attribute_to_html(:degree_grantor, label: label_for(term: :degree_grantor, record_class: Etd), html_dl: true) %> + <%= presenter.attribute_to_html(:advisor, label: label_for(term: :advisor, record_class: Etd), html_dl: true) %> + <%= presenter.attribute_to_html(:committee_member, label: label_for(term: :committee_member, record_class: Etd), html_dl: true) %> + <%= presenter.attribute_to_html(:department, label: label_for(term: :department, record_class: Etd), html_dl: true) %> + <% end %> \ No newline at end of file diff --git a/app/views/hyrax/oers/_attribute_rows.html.erb b/app/views/hyrax/oers/_attribute_rows.html.erb index b86c23b7a..2500f8e1c 100644 --- a/app/views/hyrax/oers/_attribute_rows.html.erb +++ b/app/views/hyrax/oers/_attribute_rows.html.erb @@ -1,30 +1,43 @@ -<%= presenter.attribute_to_html(:admin_note, html_dl: true) if presenter.editor? %> -<%= presenter.attribute_to_html(:title, html_dl: true) %> -<%= presenter.attribute_to_html(:alternative_title, html_dl: true) %> -<%= presenter.attribute_to_html(:creator, render_as: :faceted, html_dl: true) %> -<%= presenter.attribute_to_html(:contributor, render_as: :faceted, html_dl: true) %> -<%= presenter.attribute_to_html(:related_url, render_as: :external_link, html_dl: true, label: 'Related URL') %> -<%= presenter.attribute_to_html(:learning_resource_type, render_as: :faceted, html_dl: true) %> -<%= presenter.attribute_to_html(:abstract, html_dl: true) %> -<%= presenter.attribute_to_html(:education_level, render_as: :faceted, html_dl: true) %> -<%= presenter.attribute_to_html(:audience, render_as: :faceted, html_dl: true) %> -<%= presenter.attribute_to_html(:discipline, render_as: :faceted, html_dl: true) %> -<%= presenter.attribute_to_html(:date_created, html_dl: true) %> -<%= presenter.attribute_to_html(:table_of_contents, html_dl: true) %> -<%= presenter.attribute_to_html(:subject, render_as: :faceted, html_dl: true) %> -<%= presenter.attribute_to_html(:rights_statement, render_as: :rights_statement, html_dl: true) %> -<%= presenter.attribute_to_html(:license, render_as: :license, html_dl: true) %> -<%= presenter.attribute_to_html(:rights_holder, render_as: :linked, html_dl: true) %> -<%= presenter.attribute_to_html(:rights_notes, render_as: :linked, html_dl: true) %> -<%= presenter.attribute_to_html(:additional_information, html_dl: true) %> -<%= presenter.attribute_to_html(:language, render_as: :faceted, html_dl: true) %> -<%= presenter.attribute_to_html(:oer_size, label: t('simple_form.labels.default.size'), html_dl: true) %> -<%= presenter.attribute_to_html(:publisher, render_as: :faceted, html_dl: true) %> -<%= presenter.attribute_to_html(:identifier, search_field: 'identifier_tesim', html_dl: true) %> -<%= presenter.attribute_to_html(:resource_type, label: t("hyrax.oer.labels.resource_type"), render_as: :faceted, html_dl: true) %> -<%= presenter.attribute_to_html(:accessibility_feature, render_as: :faceted, html_dl: true) %> -<%= presenter.attribute_to_html(:accessibility_hazard, render_as: :faceted, html_dl: true) %> -<%= presenter.attribute_to_html(:accessibility_summary, render_as: :faceted, html_dl: true) %> -<%= presenter.attribute_to_html(:keyword, render_as: :faceted, html_dl: true) %> -<%= presenter.attribute_to_html(:source, html_dl: true) %> -<%= presenter.attribute_to_html(:bibliographic_citation, html_dl: true) %> \ No newline at end of file +<%# OVERRIDE hyrax-doi to support dynamic metadata %> +<%# TODO: remove after hyrax-doi gem v0.2.0 and code is removed %> +<%# hyrax-doi doesn't work post hyrax v3.0.0 %> +<% if Hyrax.config.flexible? %> + <% view_options_for(presenter).each do |field, options| %> + <% if field == :admin_note %> + <%= presenter.attribute_to_html(:admin_note, options) if presenter.editor? %> + <% else %> + <%= presenter.attribute_to_html(conform_field(field, options), conform_options(field, options)) %> + <% end %> + <% end %> +<% else %> + <%= presenter.attribute_to_html(:admin_note, html_dl: true) if presenter.editor? %> + <%= presenter.attribute_to_html(:title, html_dl: true) %> + <%= presenter.attribute_to_html(:alternative_title, html_dl: true) %> + <%= presenter.attribute_to_html(:creator, render_as: :faceted, html_dl: true) %> + <%= presenter.attribute_to_html(:contributor, render_as: :faceted, html_dl: true) %> + <%= presenter.attribute_to_html(:related_url, render_as: :external_link, html_dl: true, label: 'Related URL') %> + <%= presenter.attribute_to_html(:learning_resource_type, render_as: :faceted, html_dl: true) %> + <%= presenter.attribute_to_html(:abstract, html_dl: true) %> + <%= presenter.attribute_to_html(:education_level, render_as: :faceted, html_dl: true) %> + <%= presenter.attribute_to_html(:audience, render_as: :faceted, html_dl: true) %> + <%= presenter.attribute_to_html(:discipline, render_as: :faceted, html_dl: true) %> + <%= presenter.attribute_to_html(:date_created, html_dl: true) %> + <%= presenter.attribute_to_html(:table_of_contents, html_dl: true) %> + <%= presenter.attribute_to_html(:subject, render_as: :faceted, html_dl: true) %> + <%= presenter.attribute_to_html(:rights_statement, render_as: :rights_statement, html_dl: true) %> + <%= presenter.attribute_to_html(:license, render_as: :license, html_dl: true) %> + <%= presenter.attribute_to_html(:rights_holder, render_as: :linked, html_dl: true) %> + <%= presenter.attribute_to_html(:rights_notes, render_as: :linked, html_dl: true) %> + <%= presenter.attribute_to_html(:additional_information, html_dl: true) %> + <%= presenter.attribute_to_html(:language, render_as: :faceted, html_dl: true) %> + <%= presenter.attribute_to_html(:oer_size, label: t('simple_form.labels.default.size'), html_dl: true) %> + <%= presenter.attribute_to_html(:publisher, render_as: :faceted, html_dl: true) %> + <%= presenter.attribute_to_html(:identifier, search_field: 'identifier_tesim', html_dl: true) %> + <%= presenter.attribute_to_html(:resource_type, label: t("hyrax.oer.labels.resource_type"), render_as: :faceted, html_dl: true) %> + <%= presenter.attribute_to_html(:accessibility_feature, render_as: :faceted, html_dl: true) %> + <%= presenter.attribute_to_html(:accessibility_hazard, render_as: :faceted, html_dl: true) %> + <%= presenter.attribute_to_html(:accessibility_summary, render_as: :faceted, html_dl: true) %> + <%= presenter.attribute_to_html(:keyword, render_as: :faceted, html_dl: true) %> + <%= presenter.attribute_to_html(:source, html_dl: true) %> + <%= presenter.attribute_to_html(:bibliographic_citation, html_dl: true) %> +<% end %> \ No newline at end of file diff --git a/config/metadata_profiles/m3_profile.yaml b/config/metadata_profiles/m3_profile.yaml index 519938e47..9f17c32d4 100644 --- a/config/metadata_profiles/m3_profile.yaml +++ b/config/metadata_profiles/m3_profile.yaml @@ -809,6 +809,7 @@ properties: - rights_statement_tesim form: primary: true + required: true property_uri: http://www.europeana.eu/schemas/edm/rights range: http://www.w3.org/2001/XMLSchema#string sample_values: @@ -1078,6 +1079,8 @@ properties: sample_values: - This is an admin note. - Another example of an admin note. + view: + html_dl: true additional_information: available_on: class: @@ -1150,6 +1153,9 @@ properties: sample_values: - Student - Instructor + view: + html_dl: true + render_as: "faceted" date: available_on: class: @@ -1197,6 +1203,9 @@ properties: sample_values: - "Languages - Spanish" - "Natural Sciences - Physics" + view: + html_dl: true + render_as: "faceted" education_level: available_on: class: @@ -1222,6 +1231,9 @@ properties: sample_values: - "Community college / Lower division" - "College / Upper division" + view: + html_dl: true + render_as: "faceted" learning_resource_type: available_on: class: @@ -1247,6 +1259,9 @@ properties: sample_values: - "Activity/lab" - "Assessment (test, quizzes, etc.)" + view: + html_dl: true + render_as: "faceted" newer_version_id: available_on: class: @@ -1463,6 +1478,8 @@ properties: sample_values: - Bachelor of Science - Master of Arts + view: + html_dl: true degree_level: available_on: class: @@ -1488,6 +1505,8 @@ properties: sample_values: - Undergraduate - Graduate + view: + html_dl: true degree_discipline: available_on: class: @@ -1513,6 +1532,8 @@ properties: sample_values: - Computer Science - Biology + view: + html_dl: true degree_grantor: available_on: class: @@ -1537,7 +1558,9 @@ properties: range: http://www.w3.org/2001/XMLSchema#string sample_values: - University of Example - - Example State University + - Example State University + view: + html_dl: true # Bulkrax metadata from bulkrax_metadata.yaml bulkrax_identifier: available_on: From 881f3676ff53109248f17196359f8c547cb49334 Mon Sep 17 00:00:00 2001 From: Shana Moore Date: Fri, 5 Jul 2024 12:12:01 -0700 Subject: [PATCH 19/46] add translation for profile version and version to works/collection index table TODO: run translations --- .../hyrax/dashboard/collections/_list_collections.html.erb | 3 +++ app/views/hyrax/dashboard/works/_list_works.html.erb | 4 +++- app/views/hyrax/my/collections/_list_collections.html.erb | 3 +++ app/views/hyrax/my/works/_list_works.html.erb | 3 +++ config/locales/hyrax.en.yml | 1 + 5 files changed, 13 insertions(+), 1 deletion(-) diff --git a/app/views/hyrax/dashboard/collections/_list_collections.html.erb b/app/views/hyrax/dashboard/collections/_list_collections.html.erb index cd09d7e71..02cf74b50 100644 --- a/app/views/hyrax/dashboard/collections/_list_collections.html.erb +++ b/app/views/hyrax/dashboard/collections/_list_collections.html.erb @@ -58,6 +58,9 @@ <% if !current_ability.admin? %> <%= collection_presenter.managed_access %> <% end %> + <% if Hyrax.config.flexible? %> + <%= collection_presenter.schema_version.to_f if collection_presenter.schema_version %> + <% end %> <%= collection_presenter.collection_type_badge %> diff --git a/app/views/hyrax/dashboard/works/_list_works.html.erb b/app/views/hyrax/dashboard/works/_list_works.html.erb index d39ec5023..f6a52ac75 100644 --- a/app/views/hyrax/dashboard/works/_list_works.html.erb +++ b/app/views/hyrax/dashboard/works/_list_works.html.erb @@ -33,7 +33,9 @@ - + <% if Hyrax.config.flexible? %> + <%= document.schema_version.to_f if document.schema_version %> + <% end %> <%= document.date_modified %> <%= presenter.workflow.state_label %> <%= render_visibility_link document %> diff --git a/app/views/hyrax/my/collections/_list_collections.html.erb b/app/views/hyrax/my/collections/_list_collections.html.erb index 893942d2c..1960c21a1 100644 --- a/app/views/hyrax/my/collections/_list_collections.html.erb +++ b/app/views/hyrax/my/collections/_list_collections.html.erb @@ -58,6 +58,9 @@ + <% if Hyrax.config.flexible? %> + <%= collection_presenter.schema_version.to_f if collection_presenter.schema_version %> + <% end %> <%= collection_presenter.collection_type_badge %> diff --git a/app/views/hyrax/my/works/_list_works.html.erb b/app/views/hyrax/my/works/_list_works.html.erb index 545404058..8a70869fd 100644 --- a/app/views/hyrax/my/works/_list_works.html.erb +++ b/app/views/hyrax/my/works/_list_works.html.erb @@ -28,6 +28,9 @@ + <% if Hyrax.config.flexible? %> + <%= document.schema_version.to_f if document.schema_version %> + <% end %> <%= document.date_modified %> diff --git a/config/locales/hyrax.en.yml b/config/locales/hyrax.en.yml index c18a64c8f..319ecdc0a 100644 --- a/config/locales/hyrax.en.yml +++ b/config/locales/hyrax.en.yml @@ -707,6 +707,7 @@ en: highlighted: Highlighted items: Items last_modified: Last modified + profile_version: Profile Version title: Title type: Type visibility: Visibility From 489d4f845e959a77baed360a6a23e62397beb4da Mon Sep 17 00:00:00 2001 From: Shana Moore Date: Mon, 8 Jul 2024 11:56:52 -0700 Subject: [PATCH 20/46] update hyrax --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index a7b4a3fdb..118287ff8 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -147,7 +147,7 @@ GIT GIT remote: https://github.com/samvera/hyrax.git - revision: 17f1e60f0c6d9d6339da8d8c085c6294517eed3e + revision: 8110efecfaaa20c17a6af4d5d5b46a4375e3e0e1 branch: flexible_double_combo specs: hyrax (5.0.1) From 56384103db114d626d05ae762b017c22f3356a5a Mon Sep 17 00:00:00 2001 From: Shana Moore Date: Mon, 8 Jul 2024 15:57:22 -0700 Subject: [PATCH 21/46] Update db/migrate/20240606205215_create_hyrax_flexible_schemas.rb --- .../20240606205215_create_hyrax_flexible_schemas.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/db/migrate/20240606205215_create_hyrax_flexible_schemas.rb b/db/migrate/20240606205215_create_hyrax_flexible_schemas.rb index bdbac2bc4..c74117b0b 100644 --- a/db/migrate/20240606205215_create_hyrax_flexible_schemas.rb +++ b/db/migrate/20240606205215_create_hyrax_flexible_schemas.rb @@ -1,4 +1,14 @@ class CreateHyraxFlexibleSchemas < ActiveRecord::Migration[6.1] + def change + unless table_exists?(:hyrax_flexible_schemas) + create_table :hyrax_flexible_schemas do |t| + t.text :profile + + t.timestamps + end + end + end +end def change create_table :hyrax_flexible_schemas do |t| t.text :profile From e605d59605a55ee60a4c570cc6146715c3e1ed0e Mon Sep 17 00:00:00 2001 From: Shana Moore Date: Mon, 8 Jul 2024 16:00:35 -0700 Subject: [PATCH 22/46] correct guard clause on migration --- .../20240606205215_create_hyrax_flexible_schemas.rb | 8 -------- 1 file changed, 8 deletions(-) diff --git a/db/migrate/20240606205215_create_hyrax_flexible_schemas.rb b/db/migrate/20240606205215_create_hyrax_flexible_schemas.rb index c74117b0b..f74968dfb 100644 --- a/db/migrate/20240606205215_create_hyrax_flexible_schemas.rb +++ b/db/migrate/20240606205215_create_hyrax_flexible_schemas.rb @@ -8,12 +8,4 @@ def change end end end -end - def change - create_table :hyrax_flexible_schemas do |t| - t.text :profile - - t.timestamps - end - end end From 4bce0e7a4e3a5153731515909b0afa39b826a26d Mon Sep 17 00:00:00 2001 From: Shana Moore Date: Tue, 9 Jul 2024 15:25:28 -0700 Subject: [PATCH 23/46] :gift: add Hyrax::Administrative set to m3_profile and update hyrax --- Gemfile.lock | 2 +- config/environments/development.rb | 1 + config/metadata_profiles/m3_profile.yaml | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 118287ff8..d30731ae8 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -147,7 +147,7 @@ GIT GIT remote: https://github.com/samvera/hyrax.git - revision: 8110efecfaaa20c17a6af4d5d5b46a4375e3e0e1 + revision: 19e50c546218881eff6e910b83ef6681f75c69ec branch: flexible_double_combo specs: hyrax (5.0.1) diff --git a/config/environments/development.rb b/config/environments/development.rb index 48d781838..e5677055a 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -12,6 +12,7 @@ else false end + config.reload_classes_only_on_change = false # Do not eager load code on boot. config.eager_load = false diff --git a/config/metadata_profiles/m3_profile.yaml b/config/metadata_profiles/m3_profile.yaml index 9f17c32d4..53caf6355 100644 --- a/config/metadata_profiles/m3_profile.yaml +++ b/config/metadata_profiles/m3_profile.yaml @@ -19,6 +19,8 @@ classes: display_label: AdminSetResource CollectionResource: display_label: pcdmcollection + Hyrax::AdministrativeSet: + display_label: Administrative Set Hyrax::FileSet: display_label: FileSet Hyrax::PcdmCollection: From 361ddc228e9a54af57a6392221638f69d00deaf3 Mon Sep 17 00:00:00 2001 From: Shana Moore Date: Tue, 9 Jul 2024 15:28:47 -0700 Subject: [PATCH 24/46] =?UTF-8?q?=F0=9F=A7=B9=20move=20seeds=20flexible=20?= =?UTF-8?q?metadata=20code=20inside=20Account=20iteration?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/seeds.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/db/seeds.rb b/db/seeds.rb index 41a03f3ff..d4d1b3a0b 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -31,16 +31,16 @@ puts "\n== Finished creating single tenant resources" end -if Hyrax.config.flexible? - puts "\n== Loading basic metadata profile" - Hyrax::RequiredDataSeeders::FlexibleProfileSeeder.generate_seeds(logger: Logger.new(STDOUT)) -end - Account.find_each do |account| Apartment::Tenant.switch!(account.tenant) next if Site.instance.available_works.present? Site.instance.available_works = Hyrax.config.registered_curation_concern_types Site.instance.save + + if Hyrax.config.flexible? + puts "\n== Loading basic metadata profile" + Hyrax::RequiredDataSeeders::FlexibleProfileSeeder.generate_seeds(logger: Logger.new(STDOUT)) + end end if ENV['INITIAL_ADMIN_EMAIL'] && ENV['INITIAL_ADMIN_PASSWORD'] From 93bcb81efbb960a0171ea1a66ac128eb495f7b0b Mon Sep 17 00:00:00 2001 From: Shana Moore Date: Tue, 9 Jul 2024 16:07:07 -0700 Subject: [PATCH 25/46] =?UTF-8?q?=F0=9F=A7=B9=20removes=20reload=20config?= =?UTF-8?q?=20-=20caused=20very=20slow=20app?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/environments/development.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/config/environments/development.rb b/config/environments/development.rb index e5677055a..48d781838 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -12,7 +12,6 @@ else false end - config.reload_classes_only_on_change = false # Do not eager load code on boot. config.eager_load = false From fa1134a9caf083be4e0317da2dfd1cf71c7d205d Mon Sep 17 00:00:00 2001 From: Shana Moore Date: Wed, 10 Jul 2024 10:13:04 -0700 Subject: [PATCH 26/46] updates hyrax version --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index d30731ae8..753e86488 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -147,7 +147,7 @@ GIT GIT remote: https://github.com/samvera/hyrax.git - revision: 19e50c546218881eff6e910b83ef6681f75c69ec + revision: 4f24cbddd437557c434693f466670709f7abb824 branch: flexible_double_combo specs: hyrax (5.0.1) From 74d3bc35b0f72e9a4063e38ad35bc97abdc698ea Mon Sep 17 00:00:00 2001 From: Shana Moore Date: Tue, 16 Jul 2024 11:29:13 -0700 Subject: [PATCH 27/46] Update Hyrax to pull in validations for bad profiles bad profiles means the basic hyrax classes are missing. --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 753e86488..36a5abe07 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -147,7 +147,7 @@ GIT GIT remote: https://github.com/samvera/hyrax.git - revision: 4f24cbddd437557c434693f466670709f7abb824 + revision: 7e7844106a49aaab18a3aa5c2382bca5ce73c5df branch: flexible_double_combo specs: hyrax (5.0.1) From ac31e3627740487e5b95b3f69a044f0ee9bdb548 Mon Sep 17 00:00:00 2001 From: Shana Moore Date: Tue, 16 Jul 2024 13:22:48 -0700 Subject: [PATCH 28/46] Update Gemfile.lock --- Gemfile.lock | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index eaa1835df..fd87c2299 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -740,12 +740,6 @@ GEM json iiif_manifest (1.3.1) activesupport (>= 4) - iiif_print (3.0.1) - blacklight_iiif_search (>= 1.0, < 3.0) - derivative-rodeo (~> 0.5) - hyrax (>= 2.5, < 6) - nokogiri (>= 1.13.2) - rdf-vocab (~> 3.0) iso-639 (0.3.6) iso8601 (0.9.1) jaro_winkler (1.5.6) @@ -1504,7 +1498,7 @@ DEPENDENCIES hyrax-iiif_av! i18n-debug i18n-tasks - iiif_print + iiif_print! jbuilder (~> 2.5) jquery-rails json-canonicalization (= 0.3.1) From d12b22577802fac758d82c034aa683b1102afa84 Mon Sep 17 00:00:00 2001 From: Shana Moore Date: Tue, 16 Jul 2024 16:54:21 -0700 Subject: [PATCH 29/46] Add ability to re run a specific step for debugging update actions branch to pull in ability to ssh into a specific step. --- .github/workflows/build-test-lint.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-test-lint.yaml b/.github/workflows/build-test-lint.yaml index 36f517f20..c062613d1 100644 --- a/.github/workflows/build-test-lint.yaml +++ b/.github/workflows/build-test-lint.yaml @@ -22,7 +22,7 @@ env: jobs: build: - uses: scientist-softserv/actions/.github/workflows/build.yaml@v0.0.22 + uses: scientist-softserv/actions/.github/workflows/build.yaml@test-debug-step-selection-in-ci secrets: inherit with: platforms: "linux/amd64" # "linux/amd64,linux/arm64" @@ -32,7 +32,7 @@ jobs: lint: needs: build - uses: scientist-softserv/actions/.github/workflows/lint.yaml@v0.0.22 + uses: scientist-softserv/actions/.github/workflows/lint.yaml@test-debug-step-selection-in-ci with: webTarget: hyku-web workerTarget: hyku-worker @@ -40,7 +40,7 @@ jobs: test: needs: build - uses: scientist-softserv/actions/.github/workflows/test.yaml@v0.0.22 + uses: scientist-softserv/actions/.github/workflows/test.yaml@test-debug-step-selection-in-ci with: confdir: '/app/samvera/hyrax-webapp/solr/conf' rspec_cmd: "gem install semaphore_test_boosters && bundle && rspec_booster --job $CI_NODE_INDEX/$CI_NODE_TOTAL" @@ -48,4 +48,4 @@ jobs: reports: if: always() needs: [test, lint] - uses: scientist-softserv/actions/.github/workflows/report.yaml@v0.0.22 + uses: scientist-softserv/actions/.github/workflows/report.yaml@test-debug-step-selection-in-ci From ab0c718b42280cdd5b450eedf7fc4763420c2736 Mon Sep 17 00:00:00 2001 From: Shana Moore Date: Tue, 16 Jul 2024 17:00:40 -0700 Subject: [PATCH 30/46] debug pipeline --- .github/workflows/build-test-lint.yaml | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-test-lint.yaml b/.github/workflows/build-test-lint.yaml index c062613d1..2d92585c7 100644 --- a/.github/workflows/build-test-lint.yaml +++ b/.github/workflows/build-test-lint.yaml @@ -9,11 +9,16 @@ on: - main workflow_dispatch: inputs: - debug_enabled: - type: boolean - description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)' + debug_step: required: false - default: false + description: 'Pause the selected step to debug using tmate' + type: choice + default: '' + options: + - '' + - build + - test + - lint env: REGISTRY: ghcr.io @@ -22,7 +27,7 @@ env: jobs: build: - uses: scientist-softserv/actions/.github/workflows/build.yaml@test-debug-step-selection-in-ci + uses: scientist-softserv/actions/.github/workflows/build.yaml@choose-which-step-to-debug-with-tmate secrets: inherit with: platforms: "linux/amd64" # "linux/amd64,linux/arm64" @@ -32,7 +37,7 @@ jobs: lint: needs: build - uses: scientist-softserv/actions/.github/workflows/lint.yaml@test-debug-step-selection-in-ci + uses: scientist-softserv/actions/.github/workflows/lint.yaml@choose-which-step-to-debug-with-tmate with: webTarget: hyku-web workerTarget: hyku-worker @@ -40,7 +45,7 @@ jobs: test: needs: build - uses: scientist-softserv/actions/.github/workflows/test.yaml@test-debug-step-selection-in-ci + uses: scientist-softserv/actions/.github/workflows/test.yaml@choose-which-step-to-debug-with-tmate with: confdir: '/app/samvera/hyrax-webapp/solr/conf' rspec_cmd: "gem install semaphore_test_boosters && bundle && rspec_booster --job $CI_NODE_INDEX/$CI_NODE_TOTAL" @@ -48,4 +53,4 @@ jobs: reports: if: always() needs: [test, lint] - uses: scientist-softserv/actions/.github/workflows/report.yaml@test-debug-step-selection-in-ci + uses: scientist-softserv/actions/.github/workflows/report.yaml@choose-which-step-to-debug-with-tmate From f0da1a52f8be72f91d7857607411322b94f8a30d Mon Sep 17 00:00:00 2001 From: Rob Kaufman Date: Fri, 16 Aug 2024 17:22:05 -0700 Subject: [PATCH 31/46] bump hyrax to get delete working --- Gemfile.lock | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index fd87c2299..f353a025a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -61,7 +61,7 @@ GIT GIT remote: https://github.com/samvera/hyrax.git - revision: 7e7844106a49aaab18a3aa5c2382bca5ce73c5df + revision: bc14e4d7732ca197921ee9369f469f8b6f830df6 branch: flexible_double_combo specs: hyrax (5.0.1) @@ -330,7 +330,7 @@ GEM blacklight (> 6.0, < 8) cancancan (>= 1.8) deprecation (~> 1.0) - blacklight-gallery (4.4.0) + blacklight-gallery (4.5.1) blacklight (>= 7.17, < 9) rails (>= 6.1, < 8) blacklight_advanced_search (7.0.0) @@ -490,7 +490,7 @@ GEM dropbox_api (0.1.21) faraday (< 3.0) oauth2 (~> 1.1) - dry-configurable (1.1.0) + dry-configurable (1.2.0) dry-core (~> 1.0, < 2) zeitwerk (~> 2.6) dry-container (0.11.0) @@ -616,31 +616,31 @@ GEM thor (>= 0.14.1) webrick (>= 1.3) zeitwerk (>= 2.0) - google-analytics-data (0.6.0) + google-analytics-data (0.6.1) google-analytics-data-v1beta (>= 0.11, < 2.a) google-cloud-core (~> 1.6) - google-analytics-data-v1beta (0.12.0) + google-analytics-data-v1beta (0.13.0) gapic-common (>= 0.21.1, < 2.a) google-cloud-errors (~> 1.0) - google-apis-core (0.15.0) + google-apis-core (0.15.1) addressable (~> 2.5, >= 2.5.1) googleauth (~> 1.9) - httpclient (>= 2.8.1, < 3.a) + httpclient (>= 2.8.3, < 3.a) mini_mime (~> 1.0) + mutex_m representable (~> 3.0) retriable (>= 2.0, < 4.a) - rexml - google-apis-drive_v3 (0.51.0) + google-apis-drive_v3 (0.54.0) google-apis-core (>= 0.15.0, < 2.a) - google-cloud-core (1.7.0) + google-cloud-core (1.7.1) google-cloud-env (>= 1.0, < 3.a) google-cloud-errors (~> 1.0) google-cloud-env (2.1.1) faraday (>= 1.0, < 3.a) google-cloud-errors (1.4.0) google-protobuf (3.25.3) - googleapis-common-protos (1.5.0) - google-protobuf (~> 3.18) + googleapis-common-protos (1.6.0) + google-protobuf (>= 3.18, < 5.a) googleapis-common-protos-types (~> 1.7) grpc (~> 1.41) googleapis-common-protos-types (1.14.0) @@ -769,7 +769,7 @@ GEM json-ld-preloaded (3.2.2) json-ld (~> 3.2) rdf (~> 3.2) - json-schema (4.3.0) + json-schema (4.3.1) addressable (>= 2.8) jsonlint (0.3.0) oj (~> 3) @@ -902,6 +902,7 @@ GEM multi_json (1.15.0) multi_xml (0.6.0) multipart-post (2.3.0) + mutex_m (0.2.0) namae (1.1.1) negative_captcha (0.5) actionpack @@ -978,8 +979,8 @@ GEM validate_email validate_url webfinger (~> 2.0) - openseadragon (0.6.0) - rails (> 3.2.0) + openseadragon (0.7.0) + rails (> 6.1.0) openssl (3.2.0) optimist (3.1.0) order_already (0.3.1) @@ -1009,7 +1010,7 @@ GEM public_suffix (4.0.7) puma (5.6.7) nio4r (~> 2.0) - qa (5.11.0) + qa (5.12.0) activerecord-import deprecation faraday (< 3.0, != 2.0.0) From fc7d9a9a4f4b6c85e853135de61ae8379095d3f8 Mon Sep 17 00:00:00 2001 From: Shana Moore Date: Fri, 23 Aug 2024 11:12:46 -0700 Subject: [PATCH 32/46] Update build-test-lint.yaml --- .github/workflows/build-test-lint.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-test-lint.yaml b/.github/workflows/build-test-lint.yaml index 2d92585c7..8f6803cad 100644 --- a/.github/workflows/build-test-lint.yaml +++ b/.github/workflows/build-test-lint.yaml @@ -1,4 +1,4 @@ -name: "Build" +name: "build-test-lint" run-name: Build of ${{ github.ref_name }} by @${{ github.actor }} on: push: @@ -11,11 +11,11 @@ on: inputs: debug_step: required: false - description: 'Pause the selected step to debug using tmate' + description: "Pause the selected step to debug using tmate" type: choice - default: '' + default: "" options: - - '' + - "" - build - test - lint @@ -47,7 +47,7 @@ jobs: needs: build uses: scientist-softserv/actions/.github/workflows/test.yaml@choose-which-step-to-debug-with-tmate with: - confdir: '/app/samvera/hyrax-webapp/solr/conf' + confdir: "/app/samvera/hyrax-webapp/solr/conf" rspec_cmd: "gem install semaphore_test_boosters && bundle && rspec_booster --job $CI_NODE_INDEX/$CI_NODE_TOTAL" reports: From 53c040ccd23f58f321db4e83781145f335888a36 Mon Sep 17 00:00:00 2001 From: Shana Moore Date: Fri, 23 Aug 2024 11:46:16 -0700 Subject: [PATCH 33/46] =?UTF-8?q?=F0=9F=92=84=20rubocop=20fixes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/indexers/admin_set_resource_indexer.rb | 1 - config/routes.rb | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app/indexers/admin_set_resource_indexer.rb b/app/indexers/admin_set_resource_indexer.rb index 7a42e8aa0..93f6066c7 100644 --- a/app/indexers/admin_set_resource_indexer.rb +++ b/app/indexers/admin_set_resource_indexer.rb @@ -4,4 +4,3 @@ class AdminSetResourceIndexer < Hyrax::Indexers::AdministrativeSetIndexer # include Hyrax::Indexer(:core_metadata) unless Hyrax.config.flexible? # include Hyrax::Indexer('AdminSetResource') if Hyrax.config.flexible? end - diff --git a/config/routes.rb b/config/routes.rb index ea9f924eb..bb7e81e45 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -167,4 +167,4 @@ get 'export' end end -end \ No newline at end of file +end From 38a483fef335499d446dc6d5550cf13d0cc369c7 Mon Sep 17 00:00:00 2001 From: Rob Kaufman Date: Mon, 9 Dec 2024 14:39:49 -0800 Subject: [PATCH 34/46] add contexts to hyku --- Gemfile.lock | 2 +- config/initializers/wings.rb | 71 +++---------------- config/metadata_profiles/m3_profile.yaml | 31 ++++++++ ...ontexts_to_hyrax_flexible_schemas.hyrax.rb | 5 ++ db/schema.rb | 3 +- 5 files changed, 47 insertions(+), 65 deletions(-) create mode 100644 db/migrate/20240606205216_add_contexts_to_hyrax_flexible_schemas.hyrax.rb diff --git a/Gemfile.lock b/Gemfile.lock index f353a025a..2f9c2982e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -61,7 +61,7 @@ GIT GIT remote: https://github.com/samvera/hyrax.git - revision: bc14e4d7732ca197921ee9369f469f8b6f830df6 + revision: dcd9d738d330aff8e9101ab45a135e5900ab4f56 branch: flexible_double_combo specs: hyrax (5.0.1) diff --git a/config/initializers/wings.rb b/config/initializers/wings.rb index 242a43082..844180668 100644 --- a/config/initializers/wings.rb +++ b/config/initializers/wings.rb @@ -20,6 +20,11 @@ Wings::ModelRegistry.register(Hydra::PCDM::File, Hydra::PCDM::File) Wings::ModelRegistry.register(Hyrax::FileMetadata, Hydra::PCDM::File) + Wings::ModelRegistry.register(GenericWorkResource, GenericWork) + Wings::ModelRegistry.register(ImageResource, Image) + Wings::ModelRegistry.register(EtdResource, Etd) + Wings::ModelRegistry.register(OerResource, Oer) + Valkyrie::MetadataAdapter.register( Freyja::MetadataAdapter.new, :freyja @@ -35,38 +40,9 @@ ) Valkyrie.config.storage_adapter = :disk Valkyrie.config.indexing_adapter = :solr_index - - # load all the sql based custom queries - [ - Hyrax::CustomQueries::Navigators::CollectionMembers, - Hyrax::CustomQueries::Navigators::ChildCollectionsNavigator, - Hyrax::CustomQueries::Navigators::ParentCollectionsNavigator, - Hyrax::CustomQueries::Navigators::ChildFileSetsNavigator, - Hyrax::CustomQueries::Navigators::ChildWorksNavigator, - Hyrax::CustomQueries::Navigators::FindFiles, - Hyrax::CustomQueries::FindAccessControl, - Hyrax::CustomQueries::FindCollectionsByType, - Hyrax::CustomQueries::FindFileMetadata, - Hyrax::CustomQueries::FindIdsByModel, - Hyrax::CustomQueries::FindManyByAlternateIds, - Hyrax::CustomQueries::FindModelsByAccess, - Hyrax::CustomQueries::FindCountBy, - Hyrax::CustomQueries::FindByDateRange, - Hyrax::CustomQueries::FindBySourceIdentifier - ].each do |handler| - Hyrax.query_service.services[0].custom_queries.register_query_handler(handler) - end - - [ - Wings::CustomQueries::FindBySourceIdentifier - ].each do |handler| - Hyrax.query_service.services[1].custom_queries.register_query_handler(handler) - end - - Wings::ModelRegistry.register(GenericWorkResource, GenericWork) - Wings::ModelRegistry.register(ImageResource, Image) - Wings::ModelRegistry.register(EtdResource, Etd) - Wings::ModelRegistry.register(OerResource, Oer) + # TODO move these to bulkrax somehow + Hyrax.query_service.services[0].custom_queries.register_query_handler(Hyrax::CustomQueries::FindBySourceIdentifier) + Hyrax.query_service.services[1].custom_queries.register_query_handler(Wings::CustomQueries::FindBySourceIdentifier) end Rails.application.config.to_prepare do @@ -77,36 +53,5 @@ CollectionResource.class_eval do attribute :internal_resource, Valkyrie::Types::Any.default("Collection"), internal: true end - - Valkyrie.config.resource_class_resolver = lambda do |resource_klass_name| - # TODO: Can we use some kind of lookup. - klass_name = resource_klass_name.gsub(/Resource$/, '') - if %w[ - GenericWork - Image - Etd - Oer - ].include?(klass_name) - "#{klass_name}Resource".constantize - elsif 'Collection' == klass_name - CollectionResource - elsif 'AdminSet' == klass_name - AdminSetResource - # Without this mapping, we'll see cases of Postgres Valkyrie adapter attempting to write to - # Fedora. Yeah! - elsif 'Hydra::AccessControl' == klass_name - Hyrax::AccessControl - elsif 'FileSet' == klass_name - Hyrax::FileSet - elsif 'Hydra::AccessControls::Embargo' == klass_name - Hyrax::Embargo - elsif 'Hydra::AccessControls::Lease' == klass_name - Hyrax::Lease - elsif 'Hydra::PCDM::File' == klass_name - Hyrax::FileMetadata - else - klass_name.constantize - end - end end # rubocop:enable Metrics/BlockLength diff --git a/config/metadata_profiles/m3_profile.yaml b/config/metadata_profiles/m3_profile.yaml index 53caf6355..426886747 100644 --- a/config/metadata_profiles/m3_profile.yaml +++ b/config/metadata_profiles/m3_profile.yaml @@ -28,6 +28,8 @@ classes: contexts: flexible_context: display_label: Flexible Metadata Example + special_context: + display_label: Special Context mappings: blacklight: name: Additional Blacklight Solr Mappings @@ -1748,3 +1750,32 @@ properties: range: http://www.w3.org/2001/XMLSchema#string sample_values: - example-split-from-pdf-id + dimensions: + available_on: + class: + - ImageResource + context: + - special_context + cardinality: + minimum: 0 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Dimensions + index_documentation: displayable, searchable + indexing: + - dimensions_sim + - dimensions_tesim + form: + primary: false + property_uri: http://purl.org/dc/terms/format + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - 50" x 20" + - 5 m x 10 m x 8 m + view: + render_as: "faceted" + html_dl: true diff --git a/db/migrate/20240606205216_add_contexts_to_hyrax_flexible_schemas.hyrax.rb b/db/migrate/20240606205216_add_contexts_to_hyrax_flexible_schemas.hyrax.rb new file mode 100644 index 000000000..09efc63f3 --- /dev/null +++ b/db/migrate/20240606205216_add_contexts_to_hyrax_flexible_schemas.hyrax.rb @@ -0,0 +1,5 @@ +class AddContextsToHyraxFlexibleSchemas < ActiveRecord::Migration[6.1] + def change + add_column :hyrax_flexible_schemas, :contexts, :text + end +end diff --git a/db/schema.rb b/db/schema.rb index fcd1606c6..e128f5f60 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 2024_06_06_205215) do +ActiveRecord::Schema.define(version: 2024_06_06_205216) do # These are extensions that must be enabled in order to support this database enable_extension "hstore" @@ -411,6 +411,7 @@ t.text "profile" t.datetime "created_at", precision: 6, null: false t.datetime "updated_at", precision: 6, null: false + t.text "contexts" end create_table "hyrax_groups", id: :serial, force: :cascade do |t| From 9becebe1ad0543840190513bdd85a96b3dc018b0 Mon Sep 17 00:00:00 2001 From: Rob Kaufman Date: Thu, 12 Dec 2024 14:27:07 -0800 Subject: [PATCH 35/46] working through double combo update issues --- .gitignore | 1 + Gemfile | 2 +- Gemfile.lock | 16 ++++++++-------- app/jobs/tenant_maintenance_job.rb | 2 +- db/schema.rb | 9 ++++++++- 5 files changed, 19 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index ff801b915..258ea0ba0 100644 --- a/.gitignore +++ b/.gitignore @@ -57,3 +57,4 @@ docker-compose.override.yml *~undo-tree~ .DS_Store /bundler.d/ +.tool-versions diff --git a/Gemfile b/Gemfile index 71f9c864d..3acbd5925 100644 --- a/Gemfile +++ b/Gemfile @@ -30,7 +30,7 @@ gem 'blacklight_range_limit' gem 'bolognese', '>= 1.9.10' gem 'bootstrap', '~> 4.6' gem 'bootstrap-datepicker-rails' -gem 'bulkrax', github: 'samvera/bulkrax', branch: 'main' +gem 'bulkrax', github: 'samvera/bulkrax', branch: 'bootstrap_card_fixes' gem 'byebug', group: %i[development test] gem 'capybara', group: %i[test] gem 'capybara-screenshot', '~> 1.0', group: %i[test] diff --git a/Gemfile.lock b/Gemfile.lock index 6b5136302..7f838066e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -120,17 +120,17 @@ GIT GIT remote: https://github.com/samvera/bulkrax.git - revision: 189b95c2fa463918be3a42c8a66539c0ab0983f0 - branch: main + revision: f408ab592b8c7d061bde0fb18f3811dc0b7c7e96 + branch: bootstrap_card_fixes specs: - bulkrax (8.1.0) + bulkrax (8.3.0) bagit (~> 0.4.6) coderay denormalize_fields iso8601 (~> 0.9.0) kaminari language_list (~> 1.2, >= 1.2.1) - libxml-ruby (~> 3.2.4) + libxml-ruby (~> 5.0) loofah (>= 2.2.3) marcel oai (>= 0.4, < 2.x) @@ -142,7 +142,7 @@ GIT GIT remote: https://github.com/samvera/hyrax.git - revision: dcd9d738d330aff8e9101ab45a135e5900ab4f56 + revision: 96c867a33c3e6442f1a322f50d3d8e9ffd1fa9e2 branch: flexible_double_combo specs: hyrax (5.0.1) @@ -228,11 +228,11 @@ GIT GIT remote: https://github.com/scientist-softserv/willow_sword.git - revision: 0c1e8afd3bce446005b65bd42067e10d1e991cd9 + revision: e4edebde9a29636d74c794efca423535db296880 branch: main specs: willow_sword (0.2.0) - bagit (~> 0.4.1) + bagit (~> 0.4) rails (~> 6.1) rubyzip (>= 1.0.0) @@ -849,7 +849,7 @@ GEM rdf-vocab (~> 3.0) legato (0.7.0) multi_json - libxml-ruby (3.2.4) + libxml-ruby (5.0.3) link_header (0.0.8) linkeddata (3.2.1) json-ld (~> 3.2, >= 3.2.3) diff --git a/app/jobs/tenant_maintenance_job.rb b/app/jobs/tenant_maintenance_job.rb index 3937cdb1e..d8269d371 100644 --- a/app/jobs/tenant_maintenance_job.rb +++ b/app/jobs/tenant_maintenance_job.rb @@ -6,7 +6,7 @@ class TenantMaintenanceJob < ApplicationJob non_tenant_job def perform - Account.each(&:find_or_schedule_jobs) + Account.find_each(&:find_or_schedule_jobs) TenantMaintenanceJob.set(wait_until: Date.tomorrow.midnight).perform_later end end diff --git a/db/schema.rb b/db/schema.rb index 6190206e0..4ae656c56 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 2024_08_20_200440) do +ActiveRecord::Schema.define(version: 2024_12_05_212513) do # These are extensions that must be enabled in order to support this database enable_extension "hstore" @@ -74,7 +74,9 @@ t.string "importerexporter_type", default: "Bulkrax::Importer" t.integer "import_attempts", default: 0 t.string "status_message", default: "Pending" + t.string "error_class" t.index ["identifier", "importerexporter_id", "importerexporter_type"], name: "bulkrax_identifier_idx" + t.index ["importerexporter_id", "importerexporter_type", "id"], name: "index_bulkrax_entries_on_importerexporter_id_type_and_id" t.index ["importerexporter_id", "importerexporter_type"], name: "bulkrax_entries_importerexporter_idx" t.index ["type"], name: "index_bulkrax_entries_on_type" end @@ -110,6 +112,7 @@ t.boolean "include_thumbnails", default: false t.boolean "generated_metadata", default: false t.string "status_message", default: "Pending" + t.string "error_class" t.index ["user_id"], name: "index_bulkrax_exporters_on_user_id" end @@ -151,6 +154,9 @@ t.datetime "last_error_at" t.datetime "last_succeeded_at" t.string "status_message", default: "Pending" + t.datetime "last_imported_at" + t.datetime "next_import_at" + t.string "error_class" t.index ["user_id"], name: "index_bulkrax_importers_on_user_id" end @@ -161,6 +167,7 @@ t.datetime "created_at", null: false t.datetime "updated_at", null: false t.integer "order", default: 0 + t.string "status_message", default: "Pending" t.index ["child_id"], name: "index_bulkrax_pending_relationships_on_child_id" t.index ["importer_run_id"], name: "index_bulkrax_pending_relationships_on_importer_run_id" t.index ["parent_id"], name: "index_bulkrax_pending_relationships_on_parent_id" From cac96ff22ea6a457c9a017179a67c0b6591986c7 Mon Sep 17 00:00:00 2001 From: Rob Kaufman Date: Thu, 12 Dec 2024 14:27:43 -0800 Subject: [PATCH 36/46] bootstrap 4 uses card instead of panel --- app/assets/stylesheets/application.css | 2 +- app/assets/stylesheets/hyku.scss | 8 ++++---- app/assets/stylesheets/themes/cultural_repository.scss | 10 +++++----- app/views/admin/roles_service/index.html.erb | 4 ++-- app/views/hyrax/content_blocks/_form.html.erb | 8 ++++---- app/views/hyrax/oers/show.html.erb | 6 +++--- app/views/roles/index.html.erb | 4 ++-- app/views/themes/cultural_repository/_facets.html.erb | 2 +- app/views/themes/image_show/hyrax/base/show.html.erb | 6 +++--- .../themes/scholarly_show/hyrax/oers/show.html.erb | 6 +++--- 10 files changed, 28 insertions(+), 28 deletions(-) diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css index 1a530ae27..49f59fbd5 100644 --- a/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.css @@ -10,7 +10,6 @@ * defined in the other CSS/SCSS files in this directory. It is generally better to create a new * file per style scope. * - *= require bulkrax/application *= require fontselect *= require codemirror *= require codemirror/themes/neat @@ -22,6 +21,7 @@ *= require blacklight_advanced_search *= require blacklight_range_limit *= require cropper.min + *= require bulkrax/application *= require_self *= require hyku_knapsack/application */ diff --git a/app/assets/stylesheets/hyku.scss b/app/assets/stylesheets/hyku.scss index 959ed3781..49e74a31c 100644 --- a/app/assets/stylesheets/hyku.scss +++ b/app/assets/stylesheets/hyku.scss @@ -176,7 +176,7 @@ footer.navbar { padding-left: 1em; } - .panel-heading { + .card-heading { line-height: 2.4em; } @@ -334,8 +334,8 @@ footer.navbar { padding: 0; } -#users > .panel { - .panel-body { +#users > .card { + .card-body { padding-left: 0; } @@ -544,7 +544,7 @@ span.constraint-value p, .facet-values p { } // make the facet counts appear at the end of the facet panel -.facet-content .panel-body .facet-values p { +.facet-content .card-body .facet-values p { display: flex; justify-content: space-between; } diff --git a/app/assets/stylesheets/themes/cultural_repository.scss b/app/assets/stylesheets/themes/cultural_repository.scss index 598c138ef..95bb34934 100644 --- a/app/assets/stylesheets/themes/cultural_repository.scss +++ b/app/assets/stylesheets/themes/cultural_repository.scss @@ -241,19 +241,19 @@ // Note: copied over to override /* line 226, /usr/local/bundle/gems/bootstrap-sass-3.4.1/assets/stylesheets/bootstrap/_panels.scss .panel-group { - .panel { + .card { border-radius: 0 !important; margin-bottom: 0 !important; } - .panel + .panel { + .card + .card { margin-top: 0 !important; } } // Note: copied over to override /* line 238, /usr/local/bundle/gems/bootstrap-sass-3.4.1/assets/stylesheets/bootstrap/_panels.scss */ - .panel-group .panel-heading + .panel-collapse > .panel-body, - .panel-group .panel-heading + .panel-collapse > .list-group { + .panel-group .card-heading + .panel-collapse > .card-body, + .panel-group .card-heading + .panel-collapse > .list-group { border-top: 0 !important; } @@ -311,7 +311,7 @@ @media (max-width: 768px) { // Note: copied over to override /* line 163, /usr/local/bundle/gems/blacklight-6.23.0/app/assets/stylesheets/blacklight/_facets.scss */ - #facets .top-panel-heading { + #facets .top-card-heading { border: 1px solid #999999 !important; } } diff --git a/app/views/admin/roles_service/index.html.erb b/app/views/admin/roles_service/index.html.erb index 93307704a..150183433 100644 --- a/app/views/admin/roles_service/index.html.erb +++ b/app/views/admin/roles_service/index.html.erb @@ -4,8 +4,8 @@ <%= t('hyrax.admin.roles_service_jobs.header') %> <% end %> -
-
+
+
diff --git a/app/views/hyrax/content_blocks/_form.html.erb b/app/views/hyrax/content_blocks/_form.html.erb index 01d84fdf7..4284de64d 100644 --- a/app/views/hyrax/content_blocks/_form.html.erb +++ b/app/views/hyrax/content_blocks/_form.html.erb @@ -151,9 +151,9 @@
-
+
<%= simple_form_for ContentBlock.for(:homepage_about_section_heading), url: hyrax.content_block_path(ContentBlock.for(:homepage_about_section_heading)), html: {class: 'nav-safety'} do |f| %> -
+
<%= f.label :homepage_about_section_heading %>
<%# the following line was changed from hyrax to give some context for what this context block does %> @@ -169,9 +169,9 @@
-
+
<%= simple_form_for ContentBlock.for(:homepage_about_section_content), url: hyrax.content_block_path(ContentBlock.for(:homepage_about_section_content)), html: {class: 'nav-safety'} do |f| %> -
+
<%= f.label :homepage_about_section_content %>
<%# the following line was changed from hyrax to give some context for what this context block does %> diff --git a/app/views/hyrax/oers/show.html.erb b/app/views/hyrax/oers/show.html.erb index f76f358df..b3804f300 100644 --- a/app/views/hyrax/oers/show.html.erb +++ b/app/views/hyrax/oers/show.html.erb @@ -12,12 +12,12 @@
 
-
-
+
+
<%= render 'work_title', presenter: @presenter %> <%= render 'show_actions', presenter: @presenter %>
-
+
<%= render 'workflow_actions_widget', presenter: @presenter %> <% if @presenter.video_embed_viewer? %> diff --git a/app/views/roles/index.html.erb b/app/views/roles/index.html.erb index 9645c8c45..a33f29eaf 100644 --- a/app/views/roles/index.html.erb +++ b/app/views/roles/index.html.erb @@ -4,8 +4,8 @@
-
-
+
+
diff --git a/app/views/themes/cultural_repository/_facets.html.erb b/app/views/themes/cultural_repository/_facets.html.erb index d2fcd50c1..dae1313ec 100644 --- a/app/views/themes/cultural_repository/_facets.html.erb +++ b/app/views/themes/cultural_repository/_facets.html.erb @@ -1,7 +1,7 @@ <% # main container for facets/limits menu -%> <% if has_facet_values? %>
-
+
-
-
+
+
<%= render 'work_title', presenter: @presenter %>
-
+
<%= render 'workflow_actions_widget', presenter: @presenter %> <% if @presenter.iiif_viewer? %> diff --git a/app/views/themes/scholarly_show/hyrax/oers/show.html.erb b/app/views/themes/scholarly_show/hyrax/oers/show.html.erb index 0b3347cc5..160dee116 100644 --- a/app/views/themes/scholarly_show/hyrax/oers/show.html.erb +++ b/app/views/themes/scholarly_show/hyrax/oers/show.html.erb @@ -9,11 +9,11 @@ <%= render 'work_type', presenter: @presenter %>
-
-
+
+
<%= render 'work_title', presenter: @presenter %>
-
+
<%= render 'workflow_actions_widget', presenter: @presenter %> <% if @presenter.iiif_viewer? %> From b443edccfce769952d5eb4acc2536a847b1330c8 Mon Sep 17 00:00:00 2001 From: Rob Kaufman Date: Thu, 12 Dec 2024 14:44:28 -0800 Subject: [PATCH 37/46] clean up wings initializer after merge --- config/initializers/wings.rb | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/config/initializers/wings.rb b/config/initializers/wings.rb index 0f4af7afd..ed4058a14 100644 --- a/config/initializers/wings.rb +++ b/config/initializers/wings.rb @@ -60,9 +60,33 @@ Valkyrie.config.storage_adapter = :disk end Valkyrie.config.indexing_adapter = :solr_index - # TODO move these to bulkrax somehow - Hyrax.query_service.services[0].custom_queries.register_query_handler(Hyrax::CustomQueries::FindBySourceIdentifier) - Hyrax.query_service.services[1].custom_queries.register_query_handler(Wings::CustomQueries::FindBySourceIdentifier) + + # load all the sql based custom queries + [ + Hyrax::CustomQueries::Navigators::CollectionMembers, + Hyrax::CustomQueries::Navigators::ChildCollectionsNavigator, + Hyrax::CustomQueries::Navigators::ParentCollectionsNavigator, + Hyrax::CustomQueries::Navigators::ChildFileSetsNavigator, + Hyrax::CustomQueries::Navigators::ChildWorksNavigator, + Hyrax::CustomQueries::Navigators::FindFiles, + Hyrax::CustomQueries::FindAccessControl, + Hyrax::CustomQueries::FindCollectionsByType, + Hyrax::CustomQueries::FindFileMetadata, + Hyrax::CustomQueries::FindIdsByModel, + Hyrax::CustomQueries::FindManyByAlternateIds, + Hyrax::CustomQueries::FindModelsByAccess, + Hyrax::CustomQueries::FindCountBy, + Hyrax::CustomQueries::FindByDateRange, + Hyrax::CustomQueries::FindBySourceIdentifier + ].each do |handler| + Hyrax.query_service.services[0].custom_queries.register_query_handler(handler) + end + + [ + Wings::CustomQueries::FindBySourceIdentifier + ].each do |handler| + Hyrax.query_service.services[1].custom_queries.register_query_handler(handler) + end end Rails.application.config.to_prepare do From 37cea10bfc486cca66163e9b637bb3a8bbb60392 Mon Sep 17 00:00:00 2001 From: Rob Kaufman Date: Tue, 17 Dec 2024 16:40:50 -0800 Subject: [PATCH 38/46] fix gem versions after merge --- Gemfile.lock | 15 +++++++++++++-- app/indexers/hyku/indexers/file_set_indexer.rb | 4 ++-- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 7f838066e..fe6d43f94 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -459,6 +459,7 @@ GEM colorize (0.8.1) concurrent-ruby (1.3.4) connection_pool (2.4.1) + content_disposition (1.0.0) crack (0.4.5) rexml crass (1.0.6) @@ -508,6 +509,8 @@ GEM representable (>= 3.1.1, < 4) docile (1.4.0) docopt (0.5.0) + down (5.4.2) + addressable (~> 2.8) draper (4.0.2) actionpack (>= 5.0) activemodel (>= 5.0) @@ -1012,7 +1015,7 @@ GEM rails (> 6.1.0) openssl (3.2.0) optimist (3.1.0) - order_already (0.3.1) + order_already (0.3.2) rails-html-sanitizer (~> 1.4) orm_adapter (0.5.0) os (1.1.4) @@ -1298,6 +1301,9 @@ GEM sxp (~> 1.2) shoulda-matchers (4.5.1) activesupport (>= 4.2.0) + shrine (3.6.0) + content_disposition (~> 1.0) + down (~> 5.1) sidekiq (6.5.12) connection_pool (>= 2.2.5, < 3) rack (~> 2.0) @@ -1429,6 +1435,10 @@ GEM rdf-vocab reform (~> 2.2) reform-rails + valkyrie-shrine (1.0.0) + aws-sdk-s3 (~> 1) + shrine (>= 2.0, < 4.0) + valkyrie (> 1.0) version_gem (1.1.4) view_component (2.74.1) activesupport (>= 5.0.0, < 8.0) @@ -1534,7 +1544,7 @@ DEPENDENCIES omniauth-saml (~> 2.1) omniauth_openid_connect openssl (>= 3.2.0) - order_already + order_already (~> 0.3.2) parser (>= 3.1.0.0) pg postrank-uri (>= 1.0.24) @@ -1577,6 +1587,7 @@ DEPENDENCIES turbolinks (~> 5) twitter-typeahead-rails (= 0.11.1.pre.corejavascript) valkyrie (~> 3.0, >= 3.1.4) + valkyrie-shrine web-console (>= 3.3.0) webdrivers (~> 4.7.0) webmock diff --git a/app/indexers/hyku/indexers/file_set_indexer.rb b/app/indexers/hyku/indexers/file_set_indexer.rb index febbb2dd7..3ab8f73be 100644 --- a/app/indexers/hyku/indexers/file_set_indexer.rb +++ b/app/indexers/hyku/indexers/file_set_indexer.rb @@ -3,8 +3,8 @@ module Hyku module Indexers class FileSetIndexer < Hyrax::Indexers::FileSetIndexer - include Hyrax::Indexer(:bulkrax_metadata) - include Hyrax::Indexer(:hyku_file_set_metadata) + include Hyrax::Indexer(:bulkrax_metadata) unless Hyrax.config.flexible? + include Hyrax::Indexer(:hyku_file_set_metadata) unless Hyrax.config.flexible? def to_solr return super unless Flipflop.default_pdf_viewer? From 1accf06769c6b4c917d60ea7bda868ba52b6af8f Mon Sep 17 00:00:00 2001 From: Rob Kaufman Date: Fri, 20 Dec 2024 10:30:39 -0800 Subject: [PATCH 39/46] bump bulkrax --- Gemfile | 2 +- Gemfile.lock | 111 ++++++++++++++++++++++++--------------------------- 2 files changed, 54 insertions(+), 59 deletions(-) diff --git a/Gemfile b/Gemfile index 94465f332..64264f8b3 100644 --- a/Gemfile +++ b/Gemfile @@ -30,7 +30,7 @@ gem 'blacklight_range_limit' gem 'bolognese', '>= 1.9.10' gem 'bootstrap', '~> 4.6' gem 'bootstrap-datepicker-rails' -gem 'bulkrax', github: 'samvera/bulkrax', branch: 'bootstrap_card_fixes' +gem 'bulkrax', '~> 9.0.0' # github: 'samvera/bulkrax', branch: 'bootstrap_card_fixes' gem 'byebug', group: %i[development test] gem 'capybara', group: %i[test] gem 'capybara-screenshot', '~> 1.0', group: %i[test] diff --git a/Gemfile.lock b/Gemfile.lock index deeb832f7..27a2588fd 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -118,31 +118,9 @@ GIT iiif_manifest (> 0.5) rails (>= 5.1, < 8.0) -GIT - remote: https://github.com/samvera/bulkrax.git - revision: f408ab592b8c7d061bde0fb18f3811dc0b7c7e96 - branch: bootstrap_card_fixes - specs: - bulkrax (8.3.0) - bagit (~> 0.4.6) - coderay - denormalize_fields - iso8601 (~> 0.9.0) - kaminari - language_list (~> 1.2, >= 1.2.1) - libxml-ruby (~> 5.0) - loofah (>= 2.2.3) - marcel - oai (>= 0.4, < 2.x) - rack (>= 2.0.6) - rails (>= 5.1.6) - rdf (>= 2.0.2, < 4.0) - rubyzip - simple_form - GIT remote: https://github.com/samvera/hyrax.git - revision: 96c867a33c3e6442f1a322f50d3d8e9ffd1fa9e2 + revision: a64afcf0cb09ca68399025d4151010aca6f3e73d branch: flexible_double_combo specs: hyrax (5.0.1) @@ -267,11 +245,11 @@ GEM active_encode (0.8.2) rails sprockets (< 4) - activemodel-serializers-xml (1.0.2) - activemodel (> 5.x) - activesupport (> 5.x) + activemodel-serializers-xml (1.0.3) + activemodel (>= 5.0.0.a) + activesupport (>= 5.0.0.a) builder (~> 3.1) - activerecord-import (1.7.0) + activerecord-import (2.0.0) activerecord (>= 4.2) activerecord-nulldb-adapter (1.0.1) activerecord (>= 5.2.0, < 7.2) @@ -290,8 +268,8 @@ GEM attr_required (1.0.1) autoprefixer-rails (10.4.16.0) execjs (~> 2) - awesome_nested_set (3.6.0) - activerecord (>= 4.0.0, < 7.2) + awesome_nested_set (3.8.0) + activerecord (>= 4.0.0, < 8.1) aws-eventstream (1.3.0) aws-partitions (1.865.0) aws-sdk-core (3.190.0) @@ -316,7 +294,7 @@ GEM babel-source (>= 4.0, < 6) execjs (~> 2.0) backport (1.2.0) - bagit (0.4.6) + bagit (0.6.0) docopt (~> 0.5.0) validatable (~> 1.6) base64 (0.2.0) @@ -358,9 +336,9 @@ GEM blacklight (> 6.0, < 8) cancancan (>= 1.8) deprecation (~> 1.0) - blacklight-gallery (4.5.1) + blacklight-gallery (4.6.4) blacklight (>= 7.17, < 9) - rails (>= 6.1, < 8) + rails (>= 6.1, < 9) blacklight_advanced_search (7.0.0) blacklight (~> 7.0) parslet @@ -407,17 +385,33 @@ GEM bootstrap-datepicker-rails (1.10.0.1) railties (>= 3.0) breadcrumbs_on_rails (3.0.1) - browse-everything (1.3.0) + browse-everything (1.5.0) addressable (~> 2.5) aws-sdk-s3 dropbox_api (>= 0.1.20) google-apis-drive_v3 googleauth (>= 0.6.6, < 2.0) - rails (>= 4.2, < 7.2) + rails (>= 4.2, < 8.1) ruby-box signet (~> 0.8) typhoeus builder (3.2.4) + bulkrax (9.0.0) + bagit (~> 0.6.0) + coderay + denormalize_fields + iso8601 (~> 0.9.0) + kaminari + language_list (~> 1.2, >= 1.2.1) + libxml-ruby (~> 5.0) + loofah (>= 2.2.3) + marcel + oai (>= 0.4, < 2.x) + rack (>= 2.0.6) + rails (>= 5.1.6) + rdf (>= 2.0.2, < 4.0) + rubyzip + simple_form byebug (11.1.3) cancancan (3.6.1) capybara (3.39.2) @@ -617,8 +611,8 @@ GEM flot-rails (0.0.7) jquery-rails flutie (2.2.0) - font-awesome-rails (4.7.0.8) - railties (>= 3.2, < 8.0) + font-awesome-rails (4.7.0.9) + railties (>= 3.2, < 9.0) fugit (1.11.1) et-orbi (~> 1, >= 1.2.11) raabro (~> 1.4) @@ -633,7 +627,7 @@ GEM gender_detector (0.1.2) unicode_utils (>= 1.3.0) geo_coord (0.2.0) - geocoder (1.8.3) + geocoder (1.8.5) base64 (>= 0.1.0) csv (>= 3.0.0) globalid (1.2.1) @@ -650,7 +644,7 @@ GEM google-analytics-data (0.6.1) google-analytics-data-v1beta (>= 0.11, < 2.a) google-cloud-core (~> 1.6) - google-analytics-data-v1beta (0.13.0) + google-analytics-data-v1beta (0.14.0) gapic-common (>= 0.21.1, < 2.a) google-cloud-errors (~> 1.0) google-apis-core (0.15.1) @@ -661,7 +655,7 @@ GEM mutex_m representable (~> 3.0) retriable (>= 2.0, < 4.a) - google-apis-drive_v3 (0.54.0) + google-apis-drive_v3 (0.61.0) google-apis-core (>= 0.15.0, < 2.a) google-cloud-core (1.7.1) google-cloud-env (>= 1.0, < 3.a) @@ -721,13 +715,13 @@ GEM deprecation mime-types (> 2.0, < 4.0) mini_magick (>= 3.2, < 5) - hydra-editor (6.2.0) + hydra-editor (6.3.0) active-fedora (>= 9.0.0) - activerecord (>= 5.2, < 7.1) + activerecord (>= 5.2, < 8.0) almond-rails (~> 0.1) cancancan psych (~> 3.3, < 4) - rails (>= 5.2, < 7.1) + rails (>= 5.2, < 8.0) simple_form (>= 4.1.0, < 5.2) sprockets (>= 3.7) sprockets-es6 @@ -737,13 +731,13 @@ GEM hydra-access-controls (= 12.1.0) hydra-core (= 12.1.0) rails (>= 5.2, < 7.1) - hydra-pcdm (1.3.0) - active-fedora (>= 10, < 15) + hydra-pcdm (1.4.0) + active-fedora (>= 10) mime-types (>= 1) rdf-vocab - hydra-works (2.1.0) - activesupport (>= 5.2, < 7.1) - hydra-derivatives (~> 3.6) + hydra-works (2.2.0) + activesupport (>= 5.2, < 8.0) + hydra-derivatives (>= 3.6) hydra-file_characterization (~> 1.0) hydra-pcdm (>= 0.9) i18n (1.14.1) @@ -800,8 +794,9 @@ GEM json-ld-preloaded (3.2.2) json-ld (~> 3.2) rdf (~> 3.2) - json-schema (4.3.1) - addressable (>= 2.8) + json-schema (5.1.1) + addressable (~> 2.8) + bigdecimal (~> 3.1) jsonlint (0.3.0) oj (~> 3) optimist (~> 3) @@ -885,7 +880,7 @@ GEM listen (3.0.8) rb-fsevent (~> 0.9, >= 0.9.4) rb-inotify (~> 0.9, >= 0.9.7) - logger (1.6.0) + logger (1.6.4) lograge (0.14.0) actionpack (>= 4) activesupport (>= 4) @@ -934,14 +929,14 @@ GEM multi_json (1.15.0) multi_xml (0.6.0) multipart-post (2.3.0) - mutex_m (0.2.0) + mutex_m (0.3.0) namae (1.1.1) negative_captcha (0.5) actionpack activesupport nest (3.2.0) redic - net-http-persistent (4.0.2) + net-http-persistent (4.0.5) connection_pool (~> 2.2) net-imap (0.4.9) date @@ -954,8 +949,8 @@ GEM net-protocol nio4r (2.7.0) noid (0.9.0) - noid-rails (3.1.0) - actionpack (>= 5.0.0, < 7.1) + noid-rails (3.2.0) + actionpack (>= 5.0.0, < 8) noid (~> 0.9) nokogiri (1.13.10) mini_portile2 (~> 2.8.0) @@ -1011,7 +1006,7 @@ GEM validate_email validate_url webfinger (~> 2.0) - openseadragon (0.7.0) + openseadragon (1.0.11) rails (> 6.1.0) openssl (3.2.0) optimist (3.1.0) @@ -1042,14 +1037,14 @@ GEM public_suffix (4.0.7) puma (5.6.7) nio4r (~> 2.0) - qa (5.12.0) + qa (5.14.0) activerecord-import deprecation faraday (< 3.0, != 2.0.0) geocoder ldpath nokogiri (~> 1.6) - rails (>= 5.0, < 7.2) + rails (>= 5.0, < 8.1) rdf raabro (1.4.0) racc (1.7.3) @@ -1499,7 +1494,7 @@ DEPENDENCIES bolognese (>= 1.9.10) bootstrap (~> 4.6) bootstrap-datepicker-rails - bulkrax! + bulkrax (~> 9.0.0) byebug capybara capybara-screenshot (~> 1.0) From bc5e462f3b8ed63c7216b5408e679e79c7d9f46b Mon Sep 17 00:00:00 2001 From: Rob Kaufman Date: Fri, 20 Dec 2024 16:38:41 -0800 Subject: [PATCH 40/46] bump hyrax to fix build --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 27a2588fd..0948890c7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -120,7 +120,7 @@ GIT GIT remote: https://github.com/samvera/hyrax.git - revision: a64afcf0cb09ca68399025d4151010aca6f3e73d + revision: 260376bba8c1f78585250dfd4e0dfee409261b55 branch: flexible_double_combo specs: hyrax (5.0.1) From cd6a6c8ef88aa23a123a580f3765c75b1c63cb8d Mon Sep 17 00:00:00 2001 From: Rob Kaufman Date: Mon, 23 Dec 2024 10:29:58 -0800 Subject: [PATCH 41/46] call the cops --- app/models/collection_resource.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/app/models/collection_resource.rb b/app/models/collection_resource.rb index 924434e38..71f568430 100644 --- a/app/models/collection_resource.rb +++ b/app/models/collection_resource.rb @@ -3,7 +3,6 @@ # Generated via # `rails generate hyrax:collection_resource CollectionResource` class CollectionResource < Hyrax::PcdmCollection - include Hyrax::Schema(:basic_metadata) unless Hyrax.config.flexible? include Hyrax::Schema(:bulkrax_metadata) unless Hyrax.config.flexible? include Hyrax::Schema(:collection_resource) unless Hyrax.config.flexible? From 07703267813b4d13606b4f051b45dd6252ba09ec Mon Sep 17 00:00:00 2001 From: Rob Kaufman Date: Thu, 16 Jan 2025 21:46:22 -0800 Subject: [PATCH 42/46] move staging and demo deploys to friends --- ops/demo-deploy.tmpl.yaml | 12 ++++++------ ops/staging-deploy.tmpl.yaml | 14 +++++++------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/ops/demo-deploy.tmpl.yaml b/ops/demo-deploy.tmpl.yaml index 1b335b0db..901a27236 100644 --- a/ops/demo-deploy.tmpl.yaml +++ b/ops/demo-deploy.tmpl.yaml @@ -64,7 +64,7 @@ extraEnvVars: &envVars - name: DB_ADAPTER value: postgresql - name: DB_HOST - value: pg-postgresql.staging-postgres.svc.cluster.local + value: pg-postgresql.postgres.svc.cluster.local - name: DB_NAME value: hyku-demo - name: DB_USER @@ -72,7 +72,7 @@ extraEnvVars: &envVars - name: FCREPO_BASE_PATH value: /hykudemo - name: FCREPO_HOST - value: fcrepo.staging-fcrepo.svc.cluster.local + value: fcrepo.fcrepo.svc.cluster.local - name: FCREPO_PORT value: "8080" - name: FCREPO_REST_PATH @@ -172,11 +172,11 @@ extraEnvVars: &envVars - name: SOLR_CONFIGSET_NAME value: hyku-demo-2 - name: SOLR_HOST - value: solr.staging-solr + value: solr.solr - name: SOLR_PORT value: "8983" - name: SOLR_URL - value: http://admin:$SOLR_ADMIN_PASSWORD@solr.staging-solr:8983/solr/ + value: http://admin:$SOLR_ADMIN_PASSWORD@solr.solr:8983/solr/ - name: SECRET_KEY_BASE value: $SECRET_KEY_BASE - name: SENTRY_DSN @@ -219,10 +219,10 @@ redis: solr: enabled: false -externalFcrepoHost: fcrepo.staging-fcrepo.svc.cluster.local +externalFcrepoHost: fcrepo.fcrepo.svc.cluster.local externalPostgresql: - host: pg-postgresql.staging-postgres.svc.cluster.local + host: pg-postgresql.postgres.svc.cluster.local username: postgres password: $POSTGRES_PASSWORD diff --git a/ops/staging-deploy.tmpl.yaml b/ops/staging-deploy.tmpl.yaml index 41fdd5ffd..c54cc6c78 100644 --- a/ops/staging-deploy.tmpl.yaml +++ b/ops/staging-deploy.tmpl.yaml @@ -64,7 +64,7 @@ extraEnvVars: &envVars - name: DB_ADAPTER value: postgresql - name: DB_HOST - value: pg-postgresql.staging-postgres.svc.cluster.local + value: pg-postgresql.postgres.svc.cluster.local - name: DB_NAME value: hyku-staging - name: DB_USER @@ -72,7 +72,7 @@ extraEnvVars: &envVars - name: FCREPO_BASE_PATH value: /hykustaging - name: FCREPO_HOST - value: fcrepo.staging-fcrepo.svc.cluster.local + value: fcrepo.fcrepo.svc.cluster.local - name: FCREPO_PORT value: "8080" - name: FCREPO_REST_PATH @@ -174,11 +174,11 @@ extraEnvVars: &envVars - name: SOLR_CONFIGSET_NAME value: hyku-staging - name: SOLR_HOST - value: solr.staging-solr + value: solr.solr - name: SOLR_PORT value: "8983" - name: SOLR_URL - value: http://admin:$SOLR_ADMIN_PASSWORD@solr.staging-solr:8983/solr/ + value: http://admin:$SOLR_ADMIN_PASSWORD@solr.solr:8983/solr/ - name: SECRET_KEY_BASE value: $SECRET_KEY_BASE - name: SENTRY_DSN @@ -219,14 +219,14 @@ redis: solr: enabled: false -externalFcrepoHost: fcrepo.staging-fcrepo.svc.cluster.local +externalFcrepoHost: fcrepo.fcrepo.svc.cluster.local externalPostgresql: - host: pg-postgresql.staging-postgres.svc.cluster.local + host: pg-postgresql.postgres.svc.cluster.local username: postgres password: $POSTGRES_PASSWORD -externalSolrHost: solr.staging-solr.svc.cluster.local +externalSolrHost: solr.solr.svc.cluster.local externalSolrUser: admin externalSolrCollection: "hyku-staging" externalSolrPassword: $SOLR_ADMIN_PASSWORD From 7d0c6c8496c4141613c7c1b8e0a47f1745c55ef8 Mon Sep 17 00:00:00 2001 From: Rob Kaufman Date: Thu, 16 Jan 2025 21:49:01 -0800 Subject: [PATCH 43/46] bump bulkrax --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 0948890c7..0bde55033 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -396,7 +396,7 @@ GEM signet (~> 0.8) typhoeus builder (3.2.4) - bulkrax (9.0.0) + bulkrax (9.0.1) bagit (~> 0.6.0) coderay denormalize_fields From 0f41731a5de3aa8c5fef1ecf102308a269c646bc Mon Sep 17 00:00:00 2001 From: Rob Kaufman Date: Thu, 16 Jan 2025 22:01:34 -0800 Subject: [PATCH 44/46] update back to n8 --- .github/workflows/base.yaml | 2 +- .github/workflows/build-test-lint.yaml | 8 ++++---- .github/workflows/deploy.yaml | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/base.yaml b/.github/workflows/base.yaml index 1f6ea5052..182c30912 100644 --- a/.github/workflows/base.yaml +++ b/.github/workflows/base.yaml @@ -11,7 +11,7 @@ on: jobs: build: - uses: scientist-softserv/actions/.github/workflows/build.yaml@v0.0.12 + uses: notch8/actions/.github/workflows/build.yaml@v0.0.12 secrets: inherit with: platforms: "linux/amd64,linux/arm64" diff --git a/.github/workflows/build-test-lint.yaml b/.github/workflows/build-test-lint.yaml index 8c13861a7..50a2bb2e2 100644 --- a/.github/workflows/build-test-lint.yaml +++ b/.github/workflows/build-test-lint.yaml @@ -27,7 +27,7 @@ env: jobs: build: - uses: scientist-softserv/actions/.github/workflows/build.yaml@v0.0.23 + uses: notch8/actions/.github/workflows/build.yaml@v0.0.23 secrets: inherit with: platforms: "linux/amd64" # "linux/amd64,linux/arm64" @@ -37,7 +37,7 @@ jobs: lint: needs: build - uses: scientist-softserv/actions/.github/workflows/lint.yaml@v0.0.23 + uses: notch8/actions/.github/workflows/lint.yaml@v0.0.23 with: webTarget: hyku-web workerTarget: hyku-worker @@ -45,7 +45,7 @@ jobs: test: needs: build - uses: scientist-softserv/actions/.github/workflows/test.yaml@v0.0.23 + uses: notch8/actions/.github/workflows/test.yaml@v0.0.23 with: confdir: "/app/samvera/hyrax-webapp/solr/conf" rspec_cmd: "gem install semaphore_test_boosters && bundle && rspec_booster --job $CI_NODE_INDEX/$CI_NODE_TOTAL" @@ -53,4 +53,4 @@ jobs: reports: if: always() needs: [test, lint] - uses: scientist-softserv/actions/.github/workflows/report.yaml@v0.0.23 + uses: notch8/actions/.github/workflows/report.yaml@v0.0.23 diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index b4ba829e1..3b3634777 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -56,7 +56,7 @@ jobs: steps: - id: setup name: Setup - uses: scientist-softserv/actions/setup-env@v0.0.6 + uses: notch8/actions/setup-env@v0.0.6 with: tag: ${{ inputs.tag }} image_name: ${{ inputs.image_name }} From 31a8c2091f8c1b932d72b1f451b1174a02c3fe8d Mon Sep 17 00:00:00 2001 From: Rob Kaufman Date: Thu, 16 Jan 2025 22:02:57 -0800 Subject: [PATCH 45/46] update gemfile lock after merge --- Gemfile.lock | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 30d730869..f44b25eda 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -20,8 +20,8 @@ GIT GIT remote: https://github.com/notch8/iiif_print.git - revision: acef382ce710d6aad63e11cfa83b5803a9f30fa2 - branch: main + revision: 63ef540419fcb3aabc73d61c0010638b173c11aa + branch: i84-support-dynamic-metadata specs: iiif_print (3.0.1) blacklight_iiif_search (>= 1.0, < 3.0) @@ -174,6 +174,7 @@ GIT dry-logic (~> 1.5) dry-monads (~> 1.6) dry-validation (~> 1.10) + faraday (= 2.9.1) flipflop (~> 2.3) flot-rails (~> 0.0.6) font-awesome-rails (~> 4.2) @@ -192,7 +193,7 @@ GIT noid-rails (~> 3.0) oauth oauth2 (~> 1.2) - openseadragon (~> 0.9) + openseadragon posix-spawn qa (~> 5.5, >= 5.5.1) rails (~> 6.1) @@ -210,7 +211,7 @@ GIT signet sprockets (= 3.7.2) tinymce-rails (~> 5.10) - valkyrie (~> 3.5) + valkyrie (~> 3.3) view_component (~> 2.74.1) GIT @@ -335,7 +336,7 @@ GEM blacklight (> 6.0, < 8) cancancan (>= 1.8) deprecation (~> 1.0) - blacklight-gallery (4.6.4) + blacklight-gallery (4.8.3) blacklight (>= 7.17, < 9) rails (>= 6.1, < 9) blacklight_advanced_search (7.0.0) @@ -646,7 +647,7 @@ GEM google-analytics-data-v1beta (0.14.0) gapic-common (>= 0.21.1, < 2.a) google-cloud-errors (~> 1.0) - google-apis-core (0.15.1) + google-apis-core (0.16.0) addressable (~> 2.5, >= 2.5.1) googleauth (~> 1.9) httpclient (>= 2.8.3, < 3.a) @@ -879,7 +880,7 @@ GEM listen (3.0.8) rb-fsevent (~> 0.9, >= 0.9.4) rb-inotify (~> 0.9, >= 0.9.7) - logger (1.6.4) + logger (1.6.5) lograge (0.14.0) actionpack (>= 4) activesupport (>= 4) @@ -1005,7 +1006,7 @@ GEM validate_email validate_url webfinger (~> 2.0) - openseadragon (1.0.11) + openseadragon (1.0.16) rails (> 6.1.0) openssl (3.2.0) optimist (3.1.0) @@ -1475,7 +1476,6 @@ GEM PLATFORMS aarch64-linux-musl - x86_64-linux DEPENDENCIES active-fedora (~> 14.0) From 6112c10fc98c8d85574b930aa1a4f0ed38bf95d5 Mon Sep 17 00:00:00 2001 From: Rob Kaufman Date: Mon, 20 Jan 2025 12:05:11 -0800 Subject: [PATCH 46/46] fix postgres and solr deploy to friends --- ops/demo-deploy.tmpl.yaml | 6 +++--- ops/staging-deploy.tmpl.yaml | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ops/demo-deploy.tmpl.yaml b/ops/demo-deploy.tmpl.yaml index 901a27236..759e09fb7 100644 --- a/ops/demo-deploy.tmpl.yaml +++ b/ops/demo-deploy.tmpl.yaml @@ -64,7 +64,7 @@ extraEnvVars: &envVars - name: DB_ADAPTER value: postgresql - name: DB_HOST - value: pg-postgresql.postgres.svc.cluster.local + value: postgres-postgresql.postgres.svc.cluster.local - name: DB_NAME value: hyku-demo - name: DB_USER @@ -222,11 +222,11 @@ solr: externalFcrepoHost: fcrepo.fcrepo.svc.cluster.local externalPostgresql: - host: pg-postgresql.postgres.svc.cluster.local + host: postgres-postgresql.postgres.svc.cluster.local username: postgres password: $POSTGRES_PASSWORD -externalSolrHost: solr.staging-solr.svc.cluster.local +externalSolrHost: solr.solr.svc.cluster.local externalSolrUser: admin externalSolrCollection: "hyku-demo" externalSolrPassword: $SOLR_ADMIN_PASSWORD diff --git a/ops/staging-deploy.tmpl.yaml b/ops/staging-deploy.tmpl.yaml index c54cc6c78..0cd6f918d 100644 --- a/ops/staging-deploy.tmpl.yaml +++ b/ops/staging-deploy.tmpl.yaml @@ -64,7 +64,7 @@ extraEnvVars: &envVars - name: DB_ADAPTER value: postgresql - name: DB_HOST - value: pg-postgresql.postgres.svc.cluster.local + value: postgres-postgresql.postgres.svc.cluster.local - name: DB_NAME value: hyku-staging - name: DB_USER @@ -222,7 +222,7 @@ solr: externalFcrepoHost: fcrepo.fcrepo.svc.cluster.local externalPostgresql: - host: pg-postgresql.postgres.svc.cluster.local + host: postgres-postgresql.postgres.svc.cluster.local username: postgres password: $POSTGRES_PASSWORD