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

🎁 WIP Flexible metadata for Valkyrie Objects #6830

Draft
wants to merge 43 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 36 commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
c676801
initial dynamic loading work
orangewolf Jun 6, 2024
8ca106a
typo
orangewolf Jun 6, 2024
3d32fa7
do not load any metadata schemas if HYRAX_FLEXIBLE is true
orangewolf Jun 6, 2024
01b8ed1
dymanic loading of the model with m3 profiles
orangewolf Jun 6, 2024
7e06f18
refactor schema loader to reduce code duplication
orangewolf Jun 6, 2024
382c6d9
fix bugs, add db seed
orangewolf Jun 10, 2024
6f9935b
Add file_set_metadata properties to m3_profile
kirkkwang Jun 10, 2024
6209db7
:white_check_mark: test that Hyrax::Flexibility module is included
ShanaLMoore Jun 11, 2024
77ad3db
Merge branch 'double_combo' into flexible_metadata
ShanaLMoore Jun 11, 2024
c7ccccc
Update dassie's m3_profile.yaml
kirkkwang Jun 11, 2024
eb5382c
:white_check_mark: [i19] add specs for Hyrax::FlexibleSchema
ShanaLMoore Jun 11, 2024
797a48d
:lipstick: rubocop fixes
ShanaLMoore Jun 11, 2024
0ddbab7
Add basic_metadata properties to dassie m3_profile
kirkkwang Jun 11, 2024
42fca41
Add collection_resource properties to m3_profile
kirkkwang Jun 11, 2024
f186c18
Add monograph.yaml properties to m3_profile.yaml
kirkkwang Jun 12, 2024
bcaf5ab
Copy m3_profile to Koppie
kirkkwang Jun 12, 2024
6542b0d
dynamic indexers
orangewolf Jun 12, 2024
9115944
additional indexer calls
orangewolf Jun 13, 2024
629bb68
seperate m3 profiles from other metadata
orangewolf Jun 13, 2024
39dfc2d
Update Koppie m3_profile and add ENV guards
kirkkwang Jun 13, 2024
9f93a7f
Add migration and schema to Koppie
kirkkwang Jun 13, 2024
bf5bbc4
Introduce flexible? configuration
kirkkwang Jun 14, 2024
0980228
Introduce valkyrie_transition? config option
kirkkwang Jun 14, 2024
1a32864
Add Wings(Hyrax::Resource) to dassie m3
kirkkwang Jun 14, 2024
44b75f9
Update specs
kirkkwang Jun 17, 2024
6ceff73
Merge in double_combo
kirkkwang Jun 17, 2024
7d87100
Add back nil guard in SolrDocumentBehavior
kirkkwang Jun 17, 2024
282709e
Move sample_attribute.yaml to fixtures
kirkkwang Jun 18, 2024
4f06880
Add some tests for Hyrax::Flexibility
kirkkwang Jun 18, 2024
4275dbc
Revert resource_spec and remove sample_attribute
kirkkwang Jun 19, 2024
258a2e7
Fix m3_schema_loader_spec and format inline YAML
kirkkwang Jun 19, 2024
b06e6dd
Merge branch 'double_combo' into flexible_metadata
kirkkwang Jun 20, 2024
77c665c
make sure attributes defined in code are kept too
orangewolf Jun 24, 2024
2fb4906
smarter schema reservation and fix some new indexers
orangewolf Jun 25, 2024
12143a7
Merge branch 'main' into flexible_metadata
orangewolf Jun 25, 2024
6bd4cac
Update flexible_schema.rb
orangewolf Jun 25, 2024
35bf9a5
Merge branch 'main' of https://github.com/samvera/hyrax into flexible…
orangewolf Jun 25, 2024
94a08d7
Merge branch 'flexible_metadata' of https://github.com/samvera/hyrax …
orangewolf Jun 25, 2024
e455106
sigh
orangewolf Jun 25, 2024
e4c6ff0
Merge branch 'main' into flexible_metadata
kirkkwang Jun 25, 2024
c052bbb
Merge branch 'main' into flexible_metadata
orangewolf Jun 26, 2024
857f579
Load the indexer module for flexible metadata
laritakr Jun 27, 2024
7f8525d
Merge branch 'main' into flexible_metadata
kirkkwang Jun 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .dassie/.env
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ HYRAX_ANALYTICS=false
HYRAX_ANALYTICS_PROVIDER=google
HYRAX_DERIVATIVES_PATH=/app/samvera/hyrax-webapp/derivatives/
HYRAX_ENGINE_PATH=/app/samvera/hyrax-engine
HYRAX_FLEXIBLE=true
HYRAX_UPLOAD_PATH=/app/samvera/hyrax-webapp/uploads/
HYRAX_VALKYRIE=true
IN_DOCKER=true
Expand Down
4 changes: 2 additions & 2 deletions .dassie/app/indexers/generic_work_resource_indexer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# Generated via
# `rails generate hyrax:work_resource GenericWorkResource`
class GenericWorkResourceIndexer < Hyrax::ValkyrieWorkIndexer
include Hyrax::Indexer(:basic_metadata)
include Hyrax::Indexer(:generic_work_resource)
include Hyrax::Indexer(:basic_metadata) unless Hyrax.config.flexible?
include Hyrax::Indexer(:generic_work_resource) unless Hyrax.config.flexible?

# Uncomment this block if you want to add custom indexing behavior:
# def to_solr
Expand Down
4 changes: 2 additions & 2 deletions .dassie/app/models/collection_resource.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ class CollectionResource < Hyrax::PcdmCollection
# * add Valkyrie attributes to this class
# * update form and indexer to process the attributes
#
include Hyrax::Schema(:basic_metadata)
include Hyrax::Schema(:collection_resource)
include Hyrax::Schema(:basic_metadata) unless Hyrax.config.flexible?
include Hyrax::Schema(:collection_resource) unless Hyrax.config.flexible?

Hyrax::ValkyrieLazyMigration.migrating(self, from: ::Collection) if Hyrax.config.valkyrie_transition?
end
4 changes: 2 additions & 2 deletions .dassie/app/models/generic_work_resource.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# Generated via
# `rails generate hyrax:work_resource GenericWorkResource`
class GenericWorkResource < Hyrax::Work
include Hyrax::Schema(:basic_metadata)
include Hyrax::Schema(:generic_work_resource)
include Hyrax::Schema(:basic_metadata) unless Hyrax.config.flexible?
include Hyrax::Schema(:generic_work_resource) unless Hyrax.config.flexible?

Hyrax::ValkyrieLazyMigration.migrating(self, from: GenericWork) if Hyrax.config.valkyrie_transition?
end
4 changes: 2 additions & 2 deletions .dassie/app/models/monograph.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
# Generated via
# `rails generate hyrax:work_resource Monograph`
class Monograph < Hyrax::Work
include Hyrax::Schema(:basic_metadata)
include Hyrax::Schema(:monograph)
include Hyrax::Schema(:basic_metadata) unless Hyrax.config.flexible?
include Hyrax::Schema(:monograph) unless Hyrax.config.flexible?
end
Loading
Loading