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

Record Inheritance resolve updates #2637

Merged
merged 3 commits into from
Feb 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 1 addition & 5 deletions backend/app/lib/oai/aspace_oai_repository.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,14 @@ def self.delete_lookups
DELETES_PER_PAGE = 100

RESOLVE = [
'ancestors',
'ancestors::linked_agents',
'ancestors::subjects',
'ancestors::instances::sub_container::top_container',
'digital_object',
'linked_agents',
'repository',
'resource',
'subjects',
'top_container',
'top_container::container_profile'
]
] + AppConfig[:record_inheritance_resolves]


def earliest
Expand Down
8 changes: 8 additions & 0 deletions common/config/config-defaults.rb
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,14 @@
}
}

# record types resolved for record inheritance
AppConfig[:record_inheritance_resolves] = [
'ancestors',
'ancestors::linked_agents',
'ancestors::subjects',
# 'ancestors::instances::sub_container::top_container',
]

# To enable composite identifiers - added to the merged record in a property _composite_identifier
# The values for :include_level and :identifier_delimiter shown here are the defaults
# If :include_level is set to true then level values (eg Series) will be included in _composite_identifier
Expand Down
14 changes: 14 additions & 0 deletions indexer/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,17 @@ gem 'nokogiri', '>= 1.10.8'
gem 'rack-test', '~> 1.1.0'
gem 'sinatra', '2.0.5', require: false
gem 'sinatra-contrib', '2.0.5', require: false

gem 'multi_json', '~> 1.15.0'
gem 'multipart-post', '1.2.0'
gem 'net-http-persistent', '2.8'
gem 'json-schema', '1.0.10'

group :test do
gem 'factory_bot', '~> 4.11', '>= 4.11.1'
gem 'ladle', '0.2.0'
gem 'rack-test', '~> 1.1.0'
gem 'rspec', '~> 3.6.0'
gem 'rspec-core'
gem 'simplecov', '0.7.1'
end
32 changes: 32 additions & 0 deletions indexer/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ GEM
backports (3.21.0)
builder (3.2.4)
concurrent-ruby (1.1.9)
diff-lcs (1.5.0)
excon (0.85.0)
factory_bot (4.11.1)
activesupport (>= 3.0.0)
fog-aws (2.0.0)
fog-core (~> 1.38)
fog-json (~> 1.0)
Expand All @@ -31,13 +34,17 @@ GEM
concurrent-ruby (~> 1.0)
ipaddress (0.8.3)
json (2.3.0-java)
json-schema (1.0.10)
ladle (0.2.0-java)
mime-types (3.3.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2021.0901)
minitest (5.14.4)
multi_json (1.15.0)
multipart-post (1.2.0)
mustermann (1.1.1)
ruby2_keywords (~> 0.0.1)
net-http-persistent (2.8)
nokogiri (1.12.5-java)
racc (~> 1.4)
racc (1.5.2-java)
Expand All @@ -46,7 +53,24 @@ GEM
rack
rack-test (1.1.0)
rack (>= 1.0, < 3)
rspec (3.6.0)
rspec-core (~> 3.6.0)
rspec-expectations (~> 3.6.0)
rspec-mocks (~> 3.6.0)
rspec-core (3.6.0)
rspec-support (~> 3.6.0)
rspec-expectations (3.6.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.6.0)
rspec-mocks (3.6.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.6.0)
rspec-support (3.6.0)
ruby2_keywords (0.0.5)
simplecov (0.7.1)
multi_json (~> 1.0)
simplecov-html (~> 0.7.1)
simplecov-html (0.7.1)
sinatra (2.0.5)
mustermann (~> 1.0)
rack (~> 2.0)
Expand All @@ -71,13 +95,21 @@ DEPENDENCIES
activesupport (= 5.2.5)
atomic (= 1.0.1)
excon (>= 0.76.0)
factory_bot (~> 4.11, >= 4.11.1)
fog-aws (= 2.0.0)
i18n (= 0.9.1)
json (= 2.3.0)
json-schema (= 1.0.10)
ladle (= 0.2.0)
mime-types
multi_json (~> 1.15.0)
multipart-post (= 1.2.0)
net-http-persistent (= 2.8)
nokogiri (>= 1.10.8)
rack-test (~> 1.1.0)
rspec (~> 3.6.0)
rspec-core
simplecov (= 0.7.1)
sinatra (= 2.0.5)
sinatra-contrib (= 2.0.5)

Expand Down
7 changes: 1 addition & 6 deletions indexer/app/lib/pui_indexer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,7 @@

class PUIIndexer < PeriodicIndexer

PUI_RESOLVES = [
'ancestors',
'ancestors::linked_agents',
'ancestors::subjects',
'ancestors::instances::sub_container::top_container'
]
PUI_RESOLVES = AppConfig[:record_inheritance_resolves]

def initialize(backend = nil, state = nil, name)
state_class = AppConfig[:index_state_class].constantize
Expand Down