Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🎁 [i84] - Integrate Hyrax dynamic metadata feature into Hyku #2258

Draft
wants to merge 49 commits into
base: main
Choose a base branch
from

Conversation

kirkkwang
Copy link
Collaborator

@kirkkwang kirkkwang commented Jun 24, 2024

Summary

Issue:

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

Screenshots / Video

Property 'cat' has been added to m3 profile.

image

image

Expected Behavior

Hyku supposed flexible metadata

Notes

Update Hyrax branch

dabd419

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.

Update Hyrax

9b63fe1

Add HYRAX_FLEXIBLE env var and Hyrax.config.flexible? guards

77a0198

temp ref specific sha of iiif_print

cda1c39

We need to reference this sha until the commit gets merged in with main.

🚧 WIP: Update m3 profile

4689f5f

This update includes converting the schemas of: :bulkrax_metadata, :with_pdf_viewer), and :with_video_embed

Add Oer/Etd resources to m3_profile + convert iiif print yml

958426c

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:

🎁 Add metadata_profiles route

a3773d9

revert changes to m3 for Hyrax::FileSet

f2e2be8

🎁 update m3_profile with Oer and Etd specifications

601f5a9

Update m3_profile.yaml

e57f8e6

set VALKYRIE_TRANSITION env vars

7c2ce59

🐛 override hyrax to fix files bug - reason for missing pdf.js checkboxes

2704903

🧹 update indexers for non flexible metadata

a48da68

Update routes.rb

98be47c

Fix bug in configuration menu

9834baa

Updates iiif_print and hyrax gems

8d849e4

Merge branch 'update-hyrax-to-flexible_double_combo' of https://github.com/samvera/hyku into update-hyrax-to-flexible_double_combo

d3a8bd6

🧹 guard against order already if flexible_metadata? is true

7b3100d

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:

🚧 WIP - progress on making attribute_rows dynamic

d3a7346

add translation for profile version and version to works/collection index table

881f367

TODO: run translations

update hyrax

489d4f8

Update db/migrate/20240606205215_create_hyrax_flexible_schemas.rb

5638410

Merge branch 'update-hyrax-to-flexible_double_combo' of https://github.com/samvera/hyku into update-hyrax-to-flexible_double_combo

cbe6a35

correct guard clause on migration

e605d59

🎁 add Hyrax::Administrative set to m3_profile and update hyrax

4bce0e7

🧹 move seeds flexible metadata code inside Account iteration

361ddc2

🧹 removes reload config - caused very slow app

93bcb81

updates hyrax version

fa1134a

Update Hyrax to pull in validations for bad profiles

74d3bc3

bad profiles means the basic hyrax classes are missing.

Merge branch 'main' into update-hyrax-to-flexible_double_combo

4bf4bb3

Update Gemfile.lock

ac31e36

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.
@kirkkwang kirkkwang added minor-ver for release notes patch-ver for release notes and removed minor-ver for release notes labels Jun 24, 2024
Copy link

github-actions bot commented Jun 24, 2024

Test Results

    3 files  ±0      3 suites  ±0   19m 14s ⏱️ + 1m 32s
2 055 tests ±0  1 862 ✅  - 136  56 💤 ±0  137 ❌ +136 
2 082 runs  ±0  1 887 ✅  - 136  58 💤 ±0  137 ❌ +136 

For more details on these failures, see this check.

Results for commit a8cb017. ± Comparison against base commit 1efcc99.

This pull request removes 45 and adds 45 tests. Note that renamed tests count towards both.
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor Etd permissions is expected not to be able to destroy 75b9423e-49c5-4444-87e1-8753d9fcc50f
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor Etd permissions is expected not to be able to edit 0c55248b-31a8-4922-b614-5deb11361ba6
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor Etd permissions is expected not to be able to read e0a7d19c-6e91-4f75-87c2-5d8458703c7d
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor Etd permissions is expected not to be able to update ce830317-4d47-46d5-a86d-1f045931d6b7
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor FileSet permissions is expected not to be able to destroy 44ae4edb-9baf-4b55-9178-937e250200e2
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor FileSet permissions is expected not to be able to edit 6ac290ad-ea77-4b44-87bb-b2dcf4954869
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor FileSet permissions is expected not to be able to read b58bf648-932f-4050-b35f-dba6c217dc1e
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor FileSet permissions is expected not to be able to update 6b57bca0-fb04-492f-a5ac-918727c87440
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor GenericWork permissions is expected not to be able to destroy 2122d544-61bc-4c45-8032-03cb4214f32f
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor GenericWork permissions is expected not to be able to edit f445fa6c-b5c8-4bef-bcf0-1ec74a41e31e
…
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor Etd permissions is expected not to be able to destroy 67adfa87-e4e9-4a59-8dcb-b7521e0b9570
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor Etd permissions is expected not to be able to edit db8c0f66-c297-4da4-8657-eba1cc9dd71d
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor Etd permissions is expected not to be able to read f9235718-03d8-4143-bc74-0e5be886ba89
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor Etd permissions is expected not to be able to update 6aaa46dd-ed1a-43a5-920e-ee6517493ff3
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor FileSet permissions is expected not to be able to destroy 74d349c1-95c1-4aa2-9424-3361118eb8c5
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor FileSet permissions is expected not to be able to edit 884be2fc-6f2b-4eaf-b86f-b7d85107e2bf
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor FileSet permissions is expected not to be able to read 15045070-5007-4ad9-93d6-11addfa8917a
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor FileSet permissions is expected not to be able to update 96317017-9ab4-4979-a754-b261c2353565
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor GenericWork permissions is expected not to be able to destroy 9f100815-d3fa-4722-9ddf-7d3de2ae0456
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor GenericWork permissions is expected not to be able to edit 8323b332-3ae5-433b-9038-3d8062b37bbd
…

♻️ This comment has been updated with latest results.

@ShanaLMoore ShanaLMoore changed the title Update Hyrax branch [i84] - Integrate Hyrax dynamic metadata feature into Hyku Jul 1, 2024
@ShanaLMoore ShanaLMoore marked this pull request as draft July 1, 2024 20:15
We need to reference this sha until the commit gets merged in with main.
This update includes converting the schemas of: :bulkrax_metadata, :with_pdf_viewer), and :with_video_embed
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
@ShanaLMoore
Copy link
Collaborator

ShanaLMoore commented Jul 2, 2024

TODO: I'm able to run seeds and spin up the app

  • on edit, schema version doesn't change when there's a new schema
  • app crashes if i don't restart the server after uploading a new profile
  • new terms added to m3 profile are not displaying in the show page
  • oer resource - convert yamls and add to m3 profile
  • etd resource - convert yamls and add to m3 profile
  • order already creator error comes from any class that has prepend OrderAlready.for(:creator) (comment out as a workaround) [SHANA]
    • steps to reproduce: try creating any work type
    • TODO: create works with ten creators, edit/save. what happens to the order of the creator names? does it keep the sequence correctly? is this specific to fedora? if so, add guard clause for when flexible metadata

image

  • side bar is not rendering for m3 profile uploads because it conflicts with bulkrax override [LARITA]
    • Her suggestion is to move the m3 profile link to be within the config section, since we're configuring work type schemas.
image
  • properties are not displaying on the work show page, after creating a work. (because it's using the attribute_rows.rb from hyrax-doi for some reason 🤔 )
    • Per LaRita, Hyrax v3.0.0 Hyrax doi is no longer working. So the recommendation is to strip hyku of this gym and its relevant code for now.
    • Alternatively, per Kirk's suggestion we can just define an attributes_rows.rb in Hyku and that should take priority.
    • Oer/etd has their own attribute rows
Screenshot 2024-07-02 at 10 17 16 AM
  • is there a file set resource? should we remove Hyrax::FileSet and Pcdm colleciton from hyku's m3? [LARITA]
    • doing so caused errors
    • but so does keeping it and not commenting out this include in hyrax/indexers/file_set_indexers.rb include Hyrax::Indexer('Hyrax::FileSet') if Hyrax.config.flexible?
    • Suggestion - test out attaching files in hyrax to confirm if there's a bug there
      • if that works, track down what's wrong with HYKU
      • TODO: test larita's changes to confirm doneness

/app/samvera/hyrax-webapp/gems/hyrax/app/services/hyrax/m3_schema_loader.rb:29:in `rescue in definitions': Flexible schema not found in version 1 for Hyrax::FileSet (Hyrax::SchemaLoader::UndefinedSchemaError)

  raise UndefinedSchemaError, "Flexible schema not found in version #{version} for #{schema_name}"
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    from /app/samvera/hyrax-webapp/gems/hyrax/app/services/hyrax/m3_schema_loader.rb:24:in `definitions'
    from /app/samvera/hyrax-webapp/gems/hyrax/app/services/hyrax/schema_loader.rb:41:in `index_rules_for'
    from /app/samvera/hyrax-webapp/gems/hyrax/lib/hyrax/indexer.rb:23:in `Indexer'
    from /app/samvera/hyrax-webapp/gems/hyrax/app/indexers/hyrax/indexers/file_set_indexer.rb:13:in `<class:FileSetIndexer>'
    from /app/samvera/hyrax-webapp/gems/hyrax/app/indexers/hyrax/indexers/file_set_indexer.rb:7:in `<module:Indexers>'
  • OER form is missing required fields on form
**It should look like [pals](https://demo.commons-archive.org/concern/oers/new?locale=en):**

image

What is looks like locally:

image

  • test iiif print
  • test pdf.js options (check boxes in form aren't rendering)
  • PDF.js is not rendering despite checked boxes and flip flop switched to ON
  • verify that all indexers have (example: include Hyrax::Indexer('EtdResource') if Hyrax.config.flexible?)
  • test CRUD for all work types
  • test that everything still works without HYRAX_FLEXIBLE being set. or when it's false.

Troubleshooting

  • AdminSetResource error? - check Hyrax::FlexibleSchema.last. If it returns nil you must run seeds and specify the env variable. Even though your container has it, for some reason you still must specify it in the command, like: HYRAX_FLEXIBLE='true' bundle exec rails db:seed

@ShanaLMoore ShanaLMoore changed the title [i84] - Integrate Hyrax dynamic metadata feature into Hyku 🎁 [i84] - Integrate Hyrax dynamic metadata feature into Hyku Jul 2, 2024
update actions branch to pull in ability to ssh into a specific step.
@ShanaLMoore ShanaLMoore force-pushed the update-hyrax-to-flexible_double_combo branch from 07cd5a4 to f0da1a5 Compare August 23, 2024 18:06
@ShanaLMoore ShanaLMoore closed this Dec 6, 2024
@ShanaLMoore ShanaLMoore deleted the update-hyrax-to-flexible_double_combo branch December 6, 2024 18:51
@ShanaLMoore ShanaLMoore restored the update-hyrax-to-flexible_double_combo branch December 6, 2024 18:51
@orangewolf orangewolf reopened this Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch-ver for release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants