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 59 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 35s ⏱️ + 1m 52s
2 055 tests ±0  1 863 ✅  - 136  56 💤 ±0  136 ❌ +136 
2 082 runs  ±0  1 888 ✅  - 136  58 💤 ±0  136 ❌ +136 

For more details on these failures, see this check.

Results for commit 5997c74. ± Comparison against base commit 9297162.

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 b575ca18-6286-4d07-a48d-2ad0108db9b2
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor Etd permissions is expected not to be able to edit d831c947-733e-44c3-94bf-9a15066b1625
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor Etd permissions is expected not to be able to read 978f64e1-0a0a-4302-ab61-642282a0d5b5
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor Etd permissions is expected not to be able to update b549b05d-9aa8-4016-a956-cdb7d244962d
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor FileSet permissions is expected not to be able to destroy cb73e0f2-329b-4e88-be1d-d4b8ac424848
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor FileSet permissions is expected not to be able to edit 49418c7f-3c66-4b69-9b92-f19d03fd8fd6
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor FileSet permissions is expected not to be able to read 2db58287-9e25-478b-b74e-5db96c5975e8
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor FileSet permissions is expected not to be able to update ff820cca-36d3-461a-b607-7d827efc36ff
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor GenericWork permissions is expected not to be able to destroy 42a6f019-9d2e-4d9d-ac03-dd785b26d7be
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor GenericWork permissions is expected not to be able to edit 424238fe-dadc-4f70-afc1-db66f9295ebc
…
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor Etd permissions is expected not to be able to destroy f22b1a9d-bcfc-4a6f-9c94-9725128301d1
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor Etd permissions is expected not to be able to edit bdbdcc7b-c5e2-4ee4-814d-5e567e6cc771
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor Etd permissions is expected not to be able to read 35c0304f-452d-4f10-b4f7-f963e857d4e2
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor Etd permissions is expected not to be able to update a47ee08a-80a7-4bc9-9eb8-7857c9a9e681
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor FileSet permissions is expected not to be able to destroy ad1e321a-c3a0-4ad1-b5f3-1b8f1b0dfcc5
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor FileSet permissions is expected not to be able to edit 2eac437c-56ce-4580-babe-3f5b428ca75a
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor FileSet permissions is expected not to be able to read 9b9d70b9-e054-4de5-8c4a-19c610028899
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor FileSet permissions is expected not to be able to update dbb13a4e-cef0-43be-b356-73548bb96761
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor GenericWork permissions is expected not to be able to destroy aeb1c5d2-0f51-4560-86e8-22a8c04d23e8
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor GenericWork permissions is expected not to be able to edit e33eb968-7212-4c32-a6be-1fa760bbad66
…

♻️ 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
Shana Moore added 3 commits July 1, 2024 15:29
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
@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