scientist-softserv / adventist_knapsack

Apache License 2.0
2 stars 0 forks source link

:gift: Valkyrize Models: Convert Models into resources #687

Open ShanaLMoore opened 1 month ago

ShanaLMoore commented 1 month ago

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:

Acceptance Criteria

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 commented 1 month ago

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