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

🎁 Valkyrize Models: Convert Models into resources #687

Open
8 of 18 tasks
Tracked by #681
ShanaLMoore opened this issue Jul 12, 2024 · 1 comment
Open
8 of 18 tasks
Tracked by #681

🎁 Valkyrize Models: Convert Models into resources #687

ShanaLMoore opened this issue Jul 12, 2024 · 1 comment
Assignees
Labels

Comments

@ShanaLMoore
Copy link

ShanaLMoore commented Jul 12, 2024

Summary

Review the following models files to determine what needs to get converted into valkyrie resources. When you pick up a model, please include its entirety.

rails generate hyrax:work_resource GenericWorkResource
edit: use the knapsack generator, so the files go in the right locations.

Steps for each work type:

  1. bundle exec rails generate hyku_knapsack:work_resource WorkTypeResource
  2. Update resource
    • Add additional schemas (bulkrax_metadata & with_video_embed)
    • include Hyrax::ArResource & Hyrax::NestedWorks
    • lazy migration
    • iiif_print configuration
  3. Update form
    • include Hyrax::FormFields(:with_video_embed)
    • change inheritance to < Hyrax::Forms::ResourceForm(
  4. Update indexer
    • include HykuIndexing
    • update inheritance < Hyrax::Forms::ResourceForm
  5. update controller
    • add include Hyku::WorksControllerBehavior
    • change curation_concern_type to xxxResource
    • add self.work_form_service = Hyrax::FormFactory.new
  6. Set up config/initializers/wings.rb and register each model.
    • ignore changes to register in hyrax.rb

IE: converting the model Journal Article should also include its valkyrized Indexers, Forms, etc.

Models to convert:

  • ConferenceItem
  • Dataset
  • ExamPaper
  • Generic Work
  • Image
  • JournalArticle
  • PublishedWork
  • Thesis

Acceptance Criteria

  • Devs have identified and converted models into valkyrie resources
  • valkyrized resources can be created for each work type
    • ConferenceItem
    • Dataset
    • ExamPaper
    • Generic Work
    • Image
    • JournalArticle
    • PublishedWork
    • Thesis

Screenshots or Video

TBD

Testing Instructions

TBD

Notes

A tenant created after the new work types will get all of the work types into its site configuration. In the admin settings to select work type it weeds out the duplicates but the modal includes all of them.

@ShanaLMoore ShanaLMoore changed the title Convert Models (drop dog biscuits) Valkyrize Models: Convert Models Jul 12, 2024
@ShanaLMoore ShanaLMoore changed the title Valkyrize Models: Convert Models 🎁 Valkyrize Models: Convert Models Jul 12, 2024
@ShanaLMoore ShanaLMoore changed the title 🎁 Valkyrize Models: Convert Models ☄️ Valkyrize Models: Convert Models Jul 12, 2024
@ShanaLMoore ShanaLMoore changed the title ☄️ Valkyrize Models: Convert Models 🎁 Valkyrize Models: Convert Models Jul 12, 2024
@ShanaLMoore ShanaLMoore changed the title 🎁 Valkyrize Models: Convert Models 🎁 Valkyrize Models: Convert Models into resources Jul 12, 2024
@ShanaLMoore
Copy link
Author

List of files:

  1. app/models/ability_decorator.rb
  2. app/models/adventist_metadata.rb
  3. app/models/bulkrax/csv_entry_decorator.rb
  4. app/models/bulkrax/oai_adventist_qdc_entry.rb
  5. app/models/bulkrax/oai_adventist_set_entry.rb
  6. app/models/collection_decorator.rb
  7. app/models/concerns/.keep
  8. app/models/concerns/slug_bug.rb
  9. app/models/concerns/slug_metadata.rb
  10. app/models/conference_item.rb
  11. app/models/content_block_decorator.rb
  12. app/models/dataset.rb
  13. app/models/dog_biscuits/remote_url.rb
  14. app/models/exam_paper.rb
  15. app/models/featured_work_decorator.rb
  16. app/models/file_set_decorator.rb
  17. app/models/generic_work_decorator.rb
  18. app/models/hyku_knapsack/application_record.rb
  19. app/models/image_decorator.rb
  20. app/models/journal_article.rb
  21. app/models/published_work.rb
  22. app/models/solr_document_decorator.rb
  23. app/models/thesis.rb
  24. app/models/video_embed_viewer.rb

laritakr added a commit that referenced this issue Jul 23, 2024
# Story

Creates remaining resources for existing models. (Conference item was
already created)

Refs

- #687
ShanaLMoore pushed a commit that referenced this issue Jul 23, 2024
# Story

A dev was unable to edit a resource without receiving an error from the
partial. This PR updates the partials to handle resources and dog
biscuit records.

Refs

- #687
# Expected Behavior Before Changes

![image](https://github.com/user-attachments/assets/86ee18b6-0f3e-4f07-af84-a771ababf81b)


# Expected Behavior After Changes


![image](https://github.com/user-attachments/assets/3bb6c57d-f295-4117-8f86-3178fbc796ef)
laritakr added a commit that referenced this issue Jul 23, 2024
# Story

Brings in a few missing includes from prior resource creation work.

Refs 
- #702
- #687

# Expected Behavior Before Changes

# Expected Behavior After Changes

# Screenshots / Video

<details>
<summary></summary>

</details>

# Notes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants