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 37 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 51s ⏱️ + 2m 30s
2 032 tests ±0  1 843 ✅  - 139  50 💤 ±0  139 ❌ +139 
2 059 runs  ±0  1 868 ✅  - 139  52 💤 ±0  139 ❌ +139 

For more details on these failures, see this check.

Results for commit 53c040c. ± Comparison against base commit af9b198.

This pull request removes 46 and adds 46 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 1990d270-5121-4427-8390-5954c15a94ec
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor Etd permissions is expected not to be able to edit 974f6411-9734-4333-bf48-62d6bcbf4b4d
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor Etd permissions is expected not to be able to read 619b683e-90c9-4d66-a455-3a2eafd5b2f0
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor Etd permissions is expected not to be able to update 0985cd2b-671e-41b7-a479-a820346fcab4
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor FileSet permissions is expected not to be able to destroy 9b67207f-18bb-4edc-9707-3222059ad3db
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor FileSet permissions is expected not to be able to edit ebb79975-4155-4b6b-aae0-e71bc430c712
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor FileSet permissions is expected not to be able to read 17b883ea-1717-48b2-96e2-fe6372956353
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor FileSet permissions is expected not to be able to update 92001278-deae-41de-bac1-617a976a3043
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor GenericWork permissions is expected not to be able to destroy 3d843af2-67ee-4904-97e4-8b4d50eb5bb1
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor GenericWork permissions is expected not to be able to edit 0d5abbd3-c9dc-4f13-85bb-c3d59ad524aa
…
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor Etd permissions is expected not to be able to destroy 12267618-2394-4484-82d4-ff56b2f11808
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor Etd permissions is expected not to be able to edit 463630da-dbef-430a-a17b-c368ef225495
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor Etd permissions is expected not to be able to read bfd79315-f895-462a-8397-80df68990f94
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor Etd permissions is expected not to be able to update 7f2ce9e6-e5b3-47e2-9858-7dcb35cd0b7c
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor FileSet permissions is expected not to be able to destroy 9a2496dd-bd0c-4a7d-9a11-80aa8dced9e0
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor FileSet permissions is expected not to be able to edit 051df48a-d339-4cef-9939-052a586158a1
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor FileSet permissions is expected not to be able to read 5b3d173c-e109-42c1-90f8-36fa956ea2fd
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor FileSet permissions is expected not to be able to update f21fa469-b0be-4025-8850-7e673119b5a1
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor GenericWork permissions is expected not to be able to destroy 4221721b-971b-4c0b-a3a9-36b0cdcaf47c
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor GenericWork permissions is expected not to be able to edit 73609610-64e9-4f0c-a0d5-e24e9e4f496c
…

♻️ 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.
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