qa_server 6.0.0 → 6.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/app/controllers/concerns/qa_server/authority_validation_behavior.rb +2 -3
- data/app/controllers/qa_server/monitor_status_controller.rb +1 -3
- data/app/jobs/qa_server/monitor_tests_job.rb +17 -9
- data/app/models/qa_server/scenario_run_history.rb +33 -9
- data/app/presenters/qa_server/monitor_status/history_presenter.rb +7 -7
- data/app/services/qa_server/performance_datatable_service.rb +1 -1
- data/app/services/qa_server/performance_graph_data_service.rb +1 -4
- data/app/services/qa_server/time_period_service.rb +8 -8
- data/lib/generators/qa_server/templates/config/authorities/linked_data/agrovoc_ld4l_cache.json +6 -10
- data/lib/generators/qa_server/templates/config/authorities/linked_data/cerl_ld4l_cache.json +168 -0
- data/lib/generators/qa_server/templates/config/authorities/linked_data/dbpedia_ld4l_cache.json +6 -2
- data/lib/generators/qa_server/templates/config/authorities/linked_data/geonames_ld4l_cache.json +6 -2
- data/lib/generators/qa_server/templates/config/authorities/linked_data/getty_aat_ld4l_cache.json +6 -2
- data/lib/generators/qa_server/templates/config/authorities/linked_data/getty_tgn_ld4l_cache.json +6 -2
- data/lib/generators/qa_server/templates/config/authorities/linked_data/getty_ulan_ld4l_cache.json +6 -2
- data/lib/generators/qa_server/templates/config/authorities/linked_data/locdemographics_ld4l_cache.json +6 -2
- data/lib/generators/qa_server/templates/config/authorities/linked_data/locgenres_ld4l_cache.json +6 -2
- data/lib/generators/qa_server/templates/config/authorities/linked_data/locnames_ld4l_cache.json +6 -2
- data/lib/generators/qa_server/templates/config/authorities/linked_data/locnames_rwo_ld4l_cache.json +13 -2
- data/lib/generators/qa_server/templates/config/authorities/linked_data/locperformance_ld4l_cache.json +6 -2
- data/lib/generators/qa_server/templates/config/authorities/linked_data/locsubjects_ld4l_cache.json +6 -2
- data/lib/generators/qa_server/templates/config/authorities/linked_data/mesh_nlm_ld4l_cache.json +6 -2
- data/lib/generators/qa_server/templates/config/authorities/linked_data/nalt_ld4l_cache.json +6 -2
- data/lib/generators/qa_server/templates/config/authorities/linked_data/oclcfast_ld4l_cache.json +6 -2
- data/lib/generators/qa_server/templates/config/authorities/linked_data/rda_registry_ld4l_cache.json +6 -2
- data/lib/generators/qa_server/templates/config/authorities/linked_data/scenarios/cerl_ld4l_cache_validation.yml +61 -0
- data/lib/generators/qa_server/templates/config/authorities/linked_data/scenarios/geonames_direct_validation.yml +1 -1
- data/lib/generators/qa_server/templates/db/migrate/20200213160549_add_date_column_to_scenario_run_history.rb.erb +14 -0
- data/lib/qa_server/version.rb +1 -1
- metadata +5 -3
- data/lib/generators/qa_server/templates/config/authorities/linked_data/scenarios/cerl_ld4_cache_validation.yml +0 -51
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3f5c0789b598b78ba1ac24e8070d989c92147bad
|
4
|
+
data.tar.gz: a3d686757d3cb4f9279c505416c6c3a54edbc00c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fc7340db3cc8a3aaf1d20449608427b57c7aa03a0d096b67b093330c92e97b4af7035acd20833bcf74e440056eebd7a6b37bf5224c95686d14294812612ad447
|
7
|
+
data.tar.gz: d7e0ae7f314ec9c7fb9d16783947a2a9cb5d7dea10388b6ad777c0da8a2e9c5ca035511bd519ed3b4bcb3314e6c782a6901983459a5872cdea0980c0333a6d56
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
### 6.1.0 (2020-02-17)
|
2
|
+
|
3
|
+
* change historical summary to show number of days instead of number of tests (original intent)
|
4
|
+
* default tests to connection tests
|
5
|
+
* update authorities to v2.2 configs
|
6
|
+
* add authority cerl_ld4l_cache
|
7
|
+
|
1
8
|
### 6.0.0 (2020-02-13)
|
2
9
|
|
3
10
|
* refactor generation of performance graphs to minimize db access and calculations
|
@@ -7,7 +7,6 @@ module QaServer
|
|
7
7
|
VALIDATE_CONNECTIONS = 'connections'
|
8
8
|
VALIDATE_ACCURACY = 'accuracy'
|
9
9
|
ALL_VALIDATIONS = 'all_checks'
|
10
|
-
DEFAULT_VALIDATION_TYPE = QaServer::AuthorityValidatorService
|
11
10
|
|
12
11
|
included do
|
13
12
|
class_attribute :validator_class,
|
@@ -33,7 +32,7 @@ module QaServer
|
|
33
32
|
@authorities_list ||= lister_class.authorities_list
|
34
33
|
end
|
35
34
|
|
36
|
-
def validate(authorities_list, validation_type = DEFAULT_VALIDATION_TYPE)
|
35
|
+
def validate(authorities_list, validation_type = validator_class::DEFAULT_VALIDATION_TYPE)
|
37
36
|
return if authorities_list.blank?
|
38
37
|
authorities_list.each { |auth_name| validate_authority(auth_name, validation_type) }
|
39
38
|
end
|
@@ -71,7 +70,7 @@ module QaServer
|
|
71
70
|
when VALIDATE_ACCURACY
|
72
71
|
validator_class::VALIDATE_ACCURACY
|
73
72
|
else
|
74
|
-
DEFAULT_VALIDATION_TYPE
|
73
|
+
validator_class::DEFAULT_VALIDATION_TYPE
|
75
74
|
end
|
76
75
|
end
|
77
76
|
end
|
@@ -104,9 +104,7 @@ module QaServer
|
|
104
104
|
end
|
105
105
|
|
106
106
|
def log_header
|
107
|
-
QaServer.config.monitor_logger.debug("
|
108
|
-
QaServer.config.monitor_logger.debug(" loading monitor status page")
|
109
|
-
QaServer.config.monitor_logger.debug("----------------------------------------------------------------------")
|
107
|
+
QaServer.config.monitor_logger.debug("------------------------------------- monitor status ---------------------------------")
|
110
108
|
QaServer.config.monitor_logger.info("(#{self.class}##{__method__}) monitor status page request (refresh_tests? # #{refresh_tests?}, " \
|
111
109
|
"refresh_history? # #{refresh_history?}, refresh_performance? # #{refresh_performance?})")
|
112
110
|
end
|
@@ -11,22 +11,25 @@ module QaServer
|
|
11
11
|
|
12
12
|
# def perform(job_id:)
|
13
13
|
def perform
|
14
|
-
Rails.cache.fetch("QaServer::MonitorTestsController/
|
14
|
+
Rails.cache.fetch("QaServer::MonitorTestsController/latest_test_run_from_cache", expires_in: QaServer::MonitorCacheService.cache_expiry, race_condition_ttl: 5.minutes, force: true) do
|
15
15
|
job_id = SecureRandom.uuid
|
16
16
|
monitor_tests_job_id = job_id unless monitor_tests_job_id
|
17
|
-
if monitor_tests_job_id == job_id # avoid race conditions
|
18
|
-
QaServer.config.monitor_logger.info("(#{self.class}##{__method__}-#{job_id}) RUNNING monitoring tests")
|
19
|
-
validate(authorities_list)
|
20
|
-
scenario_run_registry_class.save_run(scenarios_results: status_log.to_a)
|
21
|
-
QaServer.config.monitor_logger.info("(#{self.class}##{__method__}-#{job_id}) COMPLETED monitoring tests")
|
22
|
-
reset_monitor_tests_job_id
|
23
|
-
end
|
17
|
+
run_tests if monitor_tests_job_id == job_id # avoid race conditions
|
24
18
|
scenario_run_registry_class.latest_run
|
25
19
|
end
|
26
20
|
end
|
27
21
|
|
28
22
|
private
|
29
23
|
|
24
|
+
def run_tests
|
25
|
+
QaServer.config.monitor_logger.info("(#{self.class}##{__method__}-#{job_id}) RUNNING monitoring tests")
|
26
|
+
validate(authorities_list)
|
27
|
+
log_results(authorities_list, status_log.to_a)
|
28
|
+
scenario_run_registry_class.save_run(scenarios_results: status_log.to_a)
|
29
|
+
QaServer.config.monitor_logger.info("(#{self.class}##{__method__}-#{job_id}) COMPLETED monitoring tests")
|
30
|
+
reset_monitor_tests_job_id
|
31
|
+
end
|
32
|
+
|
30
33
|
# @return [String, Boolean] Returns job id of the job currently running tests; otherwise, false if tests are not running
|
31
34
|
def monitor_tests_job_id
|
32
35
|
Rails.cache.fetch("QaServer:monitor_tests-job_id", expires_in: 2.hours, race_condition_ttl: 5.minutes) { false }
|
@@ -36,7 +39,7 @@ module QaServer
|
|
36
39
|
# @param job_id [String] UUID for job running the tests
|
37
40
|
def monitor_tests_job_id=(job_id)
|
38
41
|
# check to see if there is a current job already running tests
|
39
|
-
current_job_id = Rails.cache.fetch("QaServer:monitor_tests-job_id", expires_in: 2.hours, race_condition_ttl:
|
42
|
+
current_job_id = Rails.cache.fetch("QaServer:monitor_tests-job_id", expires_in: 2.hours, race_condition_ttl: 5.seconds) { job_id }
|
40
43
|
|
41
44
|
# current_job_id may be false meaning tests are not currently running; in which case, it is ok to force set job_id
|
42
45
|
Rails.cache.fetch("QaServer:monitor_tests-job_id", expires_in: 2.hours, race_condition_ttl: 30.seconds, force: true) { job_id } unless current_job_id
|
@@ -46,5 +49,10 @@ module QaServer
|
|
46
49
|
def reset_monitor_tests_job_id
|
47
50
|
Rails.cache.fetch("QaServer:monitor_tests-job_id", expires_in: 2.hours, race_condition_ttl: 30.seconds, force: true) { false }
|
48
51
|
end
|
52
|
+
|
53
|
+
def log_results(authorities_list, results)
|
54
|
+
QaServer.config.monitor_logger.warn("(#{self.class}##{__method__}-#{job_id}) authorities_list is empty") if authorities_list&.empty?
|
55
|
+
QaServer.config.monitor_logger.warn("(#{self.class}##{__method__}-#{job_id}) test results are empty") if results&.empty?
|
56
|
+
end
|
49
57
|
end
|
50
58
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
# Provide access to the scenario_run_history database table which tracks scenario runs over time.
|
3
3
|
module QaServer
|
4
|
-
class ScenarioRunHistory < ActiveRecord::Base
|
4
|
+
class ScenarioRunHistory < ActiveRecord::Base # rubocop:disable Metrics/ClassLength
|
5
5
|
self.table_name = 'scenario_run_history'
|
6
6
|
belongs_to :scenario_run_registry
|
7
7
|
enum scenario_type: [:connection, :accuracy, :performance], _suffix: :type
|
@@ -20,6 +20,7 @@ module QaServer
|
|
20
20
|
# @param run_id [Integer] the run on which to gather statistics
|
21
21
|
# @param result [Hash] the scenario result to be saved
|
22
22
|
def save_result(run_id:, scenario_result:)
|
23
|
+
registry = QaServer::ScenarioRunRegistry.find(run_id)
|
23
24
|
QaServer::ScenarioRunHistory.create(scenario_run_registry_id: run_id,
|
24
25
|
status: scenario_result[:status],
|
25
26
|
authority_name: scenario_result[:authority_name],
|
@@ -28,7 +29,8 @@ module QaServer
|
|
28
29
|
action: scenario_result[:action],
|
29
30
|
url: scenario_result[:url],
|
30
31
|
err_message: scenario_result[:err_message],
|
31
|
-
run_time: scenario_result[:run_time]
|
32
|
+
run_time: scenario_result[:run_time],
|
33
|
+
date: registry.dt_stamp.to_date)
|
32
34
|
end
|
33
35
|
|
34
36
|
# Get a summary of passing/failing tests for a run.
|
@@ -45,7 +47,7 @@ module QaServer
|
|
45
47
|
# * total_scenario_count: 159,
|
46
48
|
def run_summary(scenario_run:, force: false)
|
47
49
|
Rails.cache.fetch("QaServer::ScenarioRunHistory/#{__method__}", expires_in: QaServer::MonitorCacheService.cache_expiry, race_condition_ttl: 1.minute, force: force) do
|
48
|
-
QaServer.config.monitor_logger.info("(QaServer::ScenarioRunHistory##{__method__}) -
|
50
|
+
QaServer.config.monitor_logger.info("(QaServer::ScenarioRunHistory##{__method__}) - CALCULATING summary of latest run - cache expired or refresh requested (force: #{force})")
|
49
51
|
status = status_counts_in_run(run_id: scenario_run.id)
|
50
52
|
summary_class.new(run_id: scenario_run.id,
|
51
53
|
run_dt_stamp: scenario_run.dt_stamp,
|
@@ -136,16 +138,38 @@ module QaServer
|
|
136
138
|
# Get a summary level of historical data
|
137
139
|
# @returns [Array<Array>] summary of passing/failing tests for each authority
|
138
140
|
# @example [auth_name, failing, passing]
|
139
|
-
# { 'agrovoc' => {
|
140
|
-
# 'geonames_ld4l_cache' => {
|
141
|
+
# { 'agrovoc' => { good: 31, bad: 2 },
|
142
|
+
# 'geonames_ld4l_cache' => { good: 32, bad: 1 } }
|
141
143
|
def historical_summary(force: false)
|
142
144
|
Rails.cache.fetch("QaServer::ScenarioRunHistory/#{__method__}", expires_in: QaServer::MonitorCacheService.cache_expiry, race_condition_ttl: 1.minute, force: force) do
|
143
|
-
|
145
|
+
QaServer.config.monitor_logger.info("(QaServer::ScenarioRunHistory##{__method__}) - CALCULATING authority connection history - cache expired or refresh requested (force: #{force})")
|
146
|
+
days_good = count_days(:good)
|
147
|
+
days_bad = count_days(:bad)
|
148
|
+
days_unknown = count_days(:unknown)
|
149
|
+
keys = (days_good.keys + days_bad.keys + days_unknown.keys).uniq.sort
|
150
|
+
keys.each_with_object({}) do |auth, hash|
|
151
|
+
hash[auth] = { good: day_count(auth, days_good), bad: day_count(auth, days_bad) + day_count(auth, days_unknown) }
|
152
|
+
end
|
144
153
|
end
|
145
154
|
end
|
146
155
|
|
147
156
|
private
|
148
157
|
|
158
|
+
def day_count(auth, days)
|
159
|
+
days&.key?(auth) ? days[auth] : 0
|
160
|
+
end
|
161
|
+
|
162
|
+
def count_days(status)
|
163
|
+
where = time_period_where
|
164
|
+
where[:status] = status
|
165
|
+
auths = QaServer::ScenarioRunHistory.where(where).select("authority_name").group("date, authority_name")
|
166
|
+
.order("authority_name").pluck(:authority_name)
|
167
|
+
auths.each_with_object({}) do |auth, hash|
|
168
|
+
hash[auth] = 0 unless hash.key? auth
|
169
|
+
hash[auth] += 1
|
170
|
+
end
|
171
|
+
end
|
172
|
+
|
149
173
|
def authorities_in_run(run_id:)
|
150
174
|
QaServer::ScenarioRunHistory.where(scenario_run_registry_id: run_id).pluck(:authority_name).uniq
|
151
175
|
end
|
@@ -180,11 +204,11 @@ module QaServer
|
|
180
204
|
def time_period_where
|
181
205
|
case expected_time_period
|
182
206
|
when :day
|
183
|
-
QaServer::TimePeriodService.where_clause_for_last_24_hours(dt_table: :
|
207
|
+
QaServer::TimePeriodService.where_clause_for_last_24_hours(dt_table: :scenario_run_history, dt_column: :date)
|
184
208
|
when :month
|
185
|
-
QaServer::TimePeriodService.where_clause_for_last_30_days(dt_table: :
|
209
|
+
QaServer::TimePeriodService.where_clause_for_last_30_days(dt_table: :scenario_run_history, dt_column: :date)
|
186
210
|
when :year
|
187
|
-
QaServer::TimePeriodService.where_clause_for_last_12_months(dt_table: :
|
211
|
+
QaServer::TimePeriodService.where_clause_for_last_12_months(dt_table: :scenario_run_history, dt_column: :date)
|
188
212
|
else
|
189
213
|
all_records
|
190
214
|
end
|
@@ -67,7 +67,7 @@ module QaServer::MonitorStatus
|
|
67
67
|
"status-#{status[:status]}"
|
68
68
|
end
|
69
69
|
|
70
|
-
# @return [String] the
|
70
|
+
# @return [String] the marker to use for the status cell based on the status of the scenario test
|
71
71
|
def status_label(status)
|
72
72
|
case status[:status]
|
73
73
|
when :good
|
@@ -84,11 +84,11 @@ module QaServer::MonitorStatus
|
|
84
84
|
end
|
85
85
|
|
86
86
|
def days_authority_passing(historical_entry)
|
87
|
-
historical_entry[1][
|
87
|
+
historical_entry[1][:good]
|
88
88
|
end
|
89
89
|
|
90
90
|
def days_authority_failing(historical_entry)
|
91
|
-
historical_entry[1][
|
91
|
+
historical_entry[1][:bad]
|
92
92
|
end
|
93
93
|
|
94
94
|
def days_authority_tested(historical_entry)
|
@@ -100,12 +100,12 @@ module QaServer::MonitorStatus
|
|
100
100
|
end
|
101
101
|
|
102
102
|
def percent_authority_failing_str(historical_entry)
|
103
|
-
|
103
|
+
ActiveSupport::NumberHelper.number_to_percentage(percent_authority_failing(historical_entry) * 100, precision: 1)
|
104
104
|
end
|
105
105
|
|
106
106
|
def failure_style_class(historical_entry)
|
107
107
|
return "status-neutral" if days_authority_failing(historical_entry) <= 0
|
108
|
-
percent_authority_failing(historical_entry) < 0.
|
108
|
+
percent_authority_failing(historical_entry) < 0.10 ? "status-unknown" : "status-bad"
|
109
109
|
end
|
110
110
|
|
111
111
|
def passing_style_class(historical_entry)
|
@@ -149,8 +149,8 @@ module QaServer::MonitorStatus
|
|
149
149
|
historical_summary.each do |auth, data|
|
150
150
|
labels[i] = auth
|
151
151
|
i += 1
|
152
|
-
fail_data << data[
|
153
|
-
pass_data << data[
|
152
|
+
fail_data << data[:bad]
|
153
|
+
pass_data << data[:good]
|
154
154
|
end
|
155
155
|
[labels, fail_data, pass_data]
|
156
156
|
end
|
@@ -26,7 +26,7 @@ module QaServer
|
|
26
26
|
# }
|
27
27
|
def calculate_datatable_data(force:)
|
28
28
|
Rails.cache.fetch("QaServer::PerformanceDatatableService/#{__method__}", expires_in: QaServer::MonitorCacheService.cache_expiry, race_condition_ttl: 5.minutes, force: force) do
|
29
|
-
QaServer.config.monitor_logger.info("(QaServer::PerformanceDatatableService##{__method__}) -
|
29
|
+
QaServer.config.monitor_logger.info("(QaServer::PerformanceDatatableService##{__method__}) - CALCULATING performance datatable stats - cache expired or refresh requested (force: #{force})")
|
30
30
|
data = {}
|
31
31
|
auths = authority_list_class.authorities_list
|
32
32
|
data[ALL_AUTH] = datatable_data_for_authority
|
@@ -45,11 +45,11 @@ module QaServer
|
|
45
45
|
# AGROVOC_LD4L_CACHE: { ... # same data for each authority }
|
46
46
|
# }
|
47
47
|
def calculate_graph_data(force:)
|
48
|
-
QaServer.config.monitor_logger.info("(QaServer::PerformanceGraphDataService##{__method__}) - calculating performance graph data")
|
49
48
|
QaServer.config.performance_cache.write_all
|
50
49
|
data = {}
|
51
50
|
auths = authority_list_class.authorities_list
|
52
51
|
calculate_all = force || cache_expired?
|
52
|
+
QaServer.config.monitor_logger.info("(QaServer::PerformanceGraphDataService##{__method__}) - CALCULATING performance graph data (calculate_all: #{calculate_all})")
|
53
53
|
data[ALL_AUTH] = graph_data_for_authority(force: force, calculate_all: calculate_all)
|
54
54
|
auths.each { |auth_name| data[auth_name] = graph_data_for_authority(authority_name: auth_name, force: force, calculate_all: calculate_all) }
|
55
55
|
data
|
@@ -83,7 +83,6 @@ module QaServer
|
|
83
83
|
avgs = Rails.cache.fetch("QaServer::PerformanceGraphDataService/#{__method__}/#{authority_name || ALL_AUTH}/#{action}/#{FOR_DAY}",
|
84
84
|
expires_in: QaServer::TimeService.current_time.end_of_hour - QaServer::TimeService.current_time,
|
85
85
|
race_condition_ttl: 1.hour, force: force) do
|
86
|
-
QaServer.config.monitor_logger.info("(QaServer::PerformanceGraphDataService##{__method__}) - calculating performance stats - cache expired or refresh requested (force: #{force})")
|
87
86
|
calculate_last_24_hours(authority_name, action)
|
88
87
|
end
|
89
88
|
calculate_last_hour(authority_name, action, avgs)
|
@@ -104,7 +103,6 @@ module QaServer
|
|
104
103
|
def average_last_30_days(authority_name: nil, action: nil, force: false)
|
105
104
|
Rails.cache.fetch("QaServer::PerformanceGraphDataService/#{__method__}/#{authority_name || ALL_AUTH}/#{action}/#{FOR_MONTH}",
|
106
105
|
expires_in: QaServer::MonitorCacheService.cache_expiry, race_condition_ttl: 1.hour, force: force) do
|
107
|
-
QaServer.config.monitor_logger.info("(QaServer::PerformanceGraphDataService##{__method__}) - calculating performance stats - cache expired or refresh requested (force: #{force})")
|
108
106
|
calculate_last_30_days(authority_name, action)
|
109
107
|
end
|
110
108
|
end
|
@@ -124,7 +122,6 @@ module QaServer
|
|
124
122
|
def average_last_12_months(authority_name: nil, action: nil, force: false)
|
125
123
|
Rails.cache.fetch("QaServer::PerformanceGraphDataService/#{__method__}/#{authority_name || ALL_AUTH}/#{action}/#{FOR_YEAR}",
|
126
124
|
expires_in: QaServer::MonitorCacheService.cache_expiry, race_condition_ttl: 1.hour, force: force) do
|
127
|
-
QaServer.config.monitor_logger.info("(QaServer::PerformanceGraphDataService##{__method__}) - calculating performance stats - cache expired or refresh requested (force: #{force})")
|
128
125
|
calculate_last_12_months(authority_name, action)
|
129
126
|
end
|
130
127
|
end
|
@@ -17,9 +17,9 @@ module QaServer
|
|
17
17
|
# { dt_stamp: start_hour..end_hour, authority: 'LOC_DIRECT' }
|
18
18
|
# @example returned where when no authority
|
19
19
|
# { dt_stamp: start_hour..end_hour }
|
20
|
-
def where_clause_for_last_24_hours(auth_name: nil, auth_table: nil, dt_table: nil)
|
20
|
+
def where_clause_for_last_24_hours(auth_name: nil, auth_table: nil, dt_table: nil, dt_column: :dt_stamp)
|
21
21
|
validate_params(auth_name, auth_table, dt_table)
|
22
|
-
where_clause = where_for_dt_stamp(dt_table, 1.day)
|
22
|
+
where_clause = where_for_dt_stamp(dt_table, dt_column, 1.day)
|
23
23
|
where_with_authority(where_clause, auth_name, auth_table)
|
24
24
|
end
|
25
25
|
|
@@ -37,9 +37,9 @@ module QaServer
|
|
37
37
|
# { dt_stamp: start_day..end_day, authority: 'LOC_DIRECT' }
|
38
38
|
# @example returned where when no authority
|
39
39
|
# { dt_stamp: start_day..end_day }
|
40
|
-
def where_clause_for_last_30_days(auth_name: nil, auth_table: nil, dt_table: nil)
|
40
|
+
def where_clause_for_last_30_days(auth_name: nil, auth_table: nil, dt_table: nil, dt_column: :dt_stamp)
|
41
41
|
validate_params(auth_name, auth_table, dt_table)
|
42
|
-
where_clause = where_for_dt_stamp(dt_table, 1.month)
|
42
|
+
where_clause = where_for_dt_stamp(dt_table, dt_column, 1.month)
|
43
43
|
where_with_authority(where_clause, auth_name, auth_table)
|
44
44
|
end
|
45
45
|
|
@@ -57,18 +57,18 @@ module QaServer
|
|
57
57
|
# { dt_stamp: start_month..end_month, authority: 'LOC_DIRECT' }
|
58
58
|
# @example returned where when no authority
|
59
59
|
# { dt_stamp: start_month..end_month }
|
60
|
-
def where_clause_for_last_12_months(auth_name: nil, auth_table: nil, dt_table: nil)
|
60
|
+
def where_clause_for_last_12_months(auth_name: nil, auth_table: nil, dt_table: nil, dt_column: :dt_stamp)
|
61
61
|
validate_params(auth_name, auth_table, dt_table)
|
62
|
-
where_clause = where_for_dt_stamp(dt_table, 1.year)
|
62
|
+
where_clause = where_for_dt_stamp(dt_table, dt_column, 1.year)
|
63
63
|
where_with_authority(where_clause, auth_name, auth_table)
|
64
64
|
end
|
65
65
|
|
66
66
|
private
|
67
67
|
|
68
|
-
def where_for_dt_stamp(dt_table, time_period)
|
68
|
+
def where_for_dt_stamp(dt_table, dt_column, time_period)
|
69
69
|
end_range = QaServer::TimeService.current_time
|
70
70
|
start_range = end_range - time_period
|
71
|
-
where_clause = {
|
71
|
+
where_clause = { dt_column => start_range..end_range }
|
72
72
|
where_clause = { dt_table => where_clause } unless dt_table.nil?
|
73
73
|
where_clause
|
74
74
|
end
|
data/lib/generators/qa_server/templates/config/authorities/linked_data/agrovoc_ld4l_cache.json
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
{
|
2
|
-
"QA_CONFIG_VERSION": "2.
|
2
|
+
"QA_CONFIG_VERSION": "2.2",
|
3
|
+
"service_uri": "http://ld4l.org/ld4l_services/cache",
|
3
4
|
"prefixes": {
|
4
5
|
"vivo": "http://vivoweb.org/ontology/core#"
|
5
6
|
},
|
@@ -77,8 +78,11 @@
|
|
77
78
|
},
|
78
79
|
"qa_replacement_patterns": {
|
79
80
|
"query": "query",
|
80
|
-
"subauth": "entity"
|
81
|
+
"subauth": "entity",
|
82
|
+
"start_record": "startRecord",
|
83
|
+
"requested_records": "maxRecords"
|
81
84
|
},
|
85
|
+
"total_count_ldpath": "vivo:count",
|
82
86
|
"results": {
|
83
87
|
"label_ldpath": "skos:prefLabel ::xsd:string",
|
84
88
|
"sort_ldpath": "vivo:rank ::xsd:string"
|
@@ -117,14 +121,6 @@
|
|
117
121
|
"expansion_label_ldpath": "skos:prefLabel ::xsd:string"
|
118
122
|
}
|
119
123
|
]
|
120
|
-
},
|
121
|
-
"subauthorities": {
|
122
|
-
"person": "Person",
|
123
|
-
"organization": "Organization",
|
124
|
-
"place": "Place",
|
125
|
-
"intangible": "Intangible",
|
126
|
-
"geocoordinates": "GeoCoordinates",
|
127
|
-
"work": "Work"
|
128
124
|
}
|
129
125
|
}
|
130
126
|
}
|
@@ -0,0 +1,168 @@
|
|
1
|
+
{
|
2
|
+
"QA_CONFIG_VERSION": "2.2",
|
3
|
+
"service_uri": "http://ld4l.org/ld4l_services/cache",
|
4
|
+
"prefixes": {
|
5
|
+
"rdaGr2": "http://rdvocab.info/ElementsGr2/",
|
6
|
+
"rdaGr3": "http://rdvocab.info/ElementsGr3/",
|
7
|
+
"ct": "http://www.cerl.org/namespaces/thesaurus",
|
8
|
+
"rdaRelGr2": "http://metadataregistry.org/uri/schema/RDARelationshipsGR2",
|
9
|
+
"vivo": "http://vivoweb.org/ontology/core#"
|
10
|
+
},
|
11
|
+
"term": {
|
12
|
+
"url": {
|
13
|
+
"@context": "http://www.w3.org/ns/hydra/context.jsonld",
|
14
|
+
"@type": "IriTemplate",
|
15
|
+
"template": "http://services.ld4l.org/ld4l_services/cerl_lookup.jsp?uri={term_uri}",
|
16
|
+
"variableRepresentation": "BasicRepresentation",
|
17
|
+
"mapping": [
|
18
|
+
{
|
19
|
+
"@type": "IriTemplateMapping",
|
20
|
+
"variable": "term_uri",
|
21
|
+
"property": "hydra:freetextQuery",
|
22
|
+
"required": true,
|
23
|
+
"encode": true
|
24
|
+
}
|
25
|
+
]
|
26
|
+
},
|
27
|
+
"qa_replacement_patterns": {
|
28
|
+
"term_id": "term_uri"
|
29
|
+
},
|
30
|
+
"term_id": "URI",
|
31
|
+
"results": {
|
32
|
+
"label_ldpath": "skos:prefLabel ::xsd:string",
|
33
|
+
"altlabel_ldpath": "skos:altLabel ::xsd:string",
|
34
|
+
"broader_ldpath": "skos:broader ::xsd:anyURI",
|
35
|
+
"narrower_ldpath": "skos:narrower ::xsd:anyURI",
|
36
|
+
"sameas_ldpath": "skos:exactMatch ::xsd:anyURI"
|
37
|
+
}
|
38
|
+
},
|
39
|
+
"search": {
|
40
|
+
"url": {
|
41
|
+
"@context": "http://www.w3.org/ns/hydra/context.jsonld",
|
42
|
+
"@type": "IriTemplate",
|
43
|
+
"template": "http://services.ld4l.org/ld4l_services/cerl_batch.jsp?{?query}&{?maxRecords}&{?startRecord}&{?entity}&{?lang}",
|
44
|
+
"variableRepresentation": "BasicRepresentation",
|
45
|
+
"mapping": [
|
46
|
+
{
|
47
|
+
"@type": "IriTemplateMapping",
|
48
|
+
"variable": "query",
|
49
|
+
"property": "hydra:freetextQuery",
|
50
|
+
"required": true,
|
51
|
+
"encode": true
|
52
|
+
},
|
53
|
+
{
|
54
|
+
"@type": "IriTemplateMapping",
|
55
|
+
"variable": "entity",
|
56
|
+
"property": "hydra:freetextQuery",
|
57
|
+
"required": false,
|
58
|
+
"default": ""
|
59
|
+
},
|
60
|
+
{
|
61
|
+
"@type": "IriTemplateMapping",
|
62
|
+
"variable": "maxRecords",
|
63
|
+
"property": "hydra:freetextQuery",
|
64
|
+
"required": false,
|
65
|
+
"default": "20"
|
66
|
+
},
|
67
|
+
{
|
68
|
+
"@type": "IriTemplateMapping",
|
69
|
+
"variable": "startRecord",
|
70
|
+
"property": "hydra:freetextQuery",
|
71
|
+
"required": false,
|
72
|
+
"default": "1"
|
73
|
+
},
|
74
|
+
{
|
75
|
+
"@type": "IriTemplateMapping",
|
76
|
+
"variable": "lang",
|
77
|
+
"property": "hydra:freetextQuery",
|
78
|
+
"required": false,
|
79
|
+
"default": "en"
|
80
|
+
}
|
81
|
+
]
|
82
|
+
},
|
83
|
+
"qa_replacement_patterns": {
|
84
|
+
"query": "query",
|
85
|
+
"subauth": "entity",
|
86
|
+
"start_record": "startRecord",
|
87
|
+
"requested_records": "maxRecords"
|
88
|
+
},
|
89
|
+
"total_count_ldpath": "vivo:count",
|
90
|
+
"results": {
|
91
|
+
"label_ldpath": "rdaGr2:nameOfThePerson | rdaGr2:nameOfTheCorporateBody | ct:imprintName ::xsd:string",
|
92
|
+
"sort_ldpath": "vivo:rank ::xsd:string"
|
93
|
+
},
|
94
|
+
"context": {
|
95
|
+
"properties": [
|
96
|
+
{
|
97
|
+
"property_label_i18n": "qa.linked_data.authority.cerl_ld4l_cache.name",
|
98
|
+
"property_label_default": "Name",
|
99
|
+
"ldpath": "rdaGr2:nameOfThePerson | rdaGr2:nameOfTheCorporateBody | ct:imprintName :: xsd:string",
|
100
|
+
"selectable": true,
|
101
|
+
"drillable": false
|
102
|
+
},
|
103
|
+
{
|
104
|
+
"property_label_i18n": "qa.linked_data.authority.cerl_ld4l_cache.biographical_information",
|
105
|
+
"property_label_default": "Biographical information",
|
106
|
+
"ldpath": "rdaGr2:biographicalInformation :: xsd:string",
|
107
|
+
"selectable": false,
|
108
|
+
"drillable": false
|
109
|
+
},
|
110
|
+
{
|
111
|
+
"property_label_i18n": "qa.linked_data.authority.cerl_ld4l_cache.dates_of_activity",
|
112
|
+
"property_label_default": "Dates of activity",
|
113
|
+
"ldpath": "ct:datesOfActivity",
|
114
|
+
"selectable": false,
|
115
|
+
"drillable": false
|
116
|
+
},
|
117
|
+
{
|
118
|
+
"property_label_i18n": "qa.linked_data.authority.cerl_ld4l_cache.activity",
|
119
|
+
"property_label_default": "Activity",
|
120
|
+
"ldpath": "rdaGr2:fieldOfActivityOfThePerson | ct:activityNote :: xsd:string",
|
121
|
+
"selectable": false,
|
122
|
+
"drillable": false
|
123
|
+
},
|
124
|
+
{
|
125
|
+
"property_label_i18n": "qa.linked_data.authority.cerl_ld4l_cache.device",
|
126
|
+
"property_label_default": "Device",
|
127
|
+
"ldpath": "ct:signOrDevice/ct:hasDescription :: xsd:string",
|
128
|
+
"selectable": false,
|
129
|
+
"drillable": false
|
130
|
+
},
|
131
|
+
{
|
132
|
+
"property_label_i18n": "qa.linked_data.authority.cerl_ld4l_cache.variant_name",
|
133
|
+
"property_label_default": "Variant name",
|
134
|
+
"ldpath": "rdaGr2:variantNameForThePerson | rdaGr2:variantNameForTheCorporateBody | ct:variantImprintName :: xsd:string",
|
135
|
+
"selectable": false,
|
136
|
+
"drillable": false
|
137
|
+
},
|
138
|
+
{
|
139
|
+
"property_label_i18n": "qa.linked_data.authority.cerl_ld4l_cache.affiliation",
|
140
|
+
"property_label_default": "Affiliation",
|
141
|
+
"ldpath": "rdaRelGr2:relatedCorporateBody :: xsd:string",
|
142
|
+
"selectable": false,
|
143
|
+
"drillable": false
|
144
|
+
},
|
145
|
+
{
|
146
|
+
"property_label_i18n": "qa.linked_data.authority.cerl_ld4l_cache.address",
|
147
|
+
"property_label_default": "Address",
|
148
|
+
"ldpath": "ct:locationOfActivity/ct:hasAddress :: xsd:string",
|
149
|
+
"selectable": false,
|
150
|
+
"drillable": false
|
151
|
+
},
|
152
|
+
{
|
153
|
+
"property_label_i18n": "qa.linked_data.authority.cerl_ld4l_cache.location",
|
154
|
+
"property_label_default": "Location",
|
155
|
+
"ldpath": "(rdaGr2:placeAssociatedWithTheCorporateBody/rdaGr3:nameOfThePlace) | (ct:locationOfActivity/ct:hasPlace/rdaGr3:nameOfThePlace) :: xsd:string",
|
156
|
+
"selectable": false,
|
157
|
+
"drillable": false
|
158
|
+
}
|
159
|
+
]
|
160
|
+
},
|
161
|
+
"subauthorities": {
|
162
|
+
"person": "Person",
|
163
|
+
"corporate": "Corporate",
|
164
|
+
"imprint": "Imprint"
|
165
|
+
}
|
166
|
+
}
|
167
|
+
}
|
168
|
+
|
data/lib/generators/qa_server/templates/config/authorities/linked_data/dbpedia_ld4l_cache.json
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
{
|
2
|
-
"QA_CONFIG_VERSION": "2.
|
2
|
+
"QA_CONFIG_VERSION": "2.2",
|
3
|
+
"service_uri": "http://ld4l.org/ld4l_services/cache",
|
3
4
|
"prefixes": {
|
4
5
|
"dbpedia": "http://dbpedia.org/property/",
|
5
6
|
"vivo": "http://vivoweb.org/ontology/core#"
|
@@ -76,8 +77,11 @@
|
|
76
77
|
},
|
77
78
|
"qa_replacement_patterns": {
|
78
79
|
"query": "query",
|
79
|
-
"subauth": "entity"
|
80
|
+
"subauth": "entity",
|
81
|
+
"start_record": "startRecord",
|
82
|
+
"requested_records": "maxRecords"
|
80
83
|
},
|
84
|
+
"total_count_ldpath": "vivo:count",
|
81
85
|
"language": ["en"],
|
82
86
|
"results": {
|
83
87
|
"id_ldpath": "dbpedia:id ::xsd:string",
|
data/lib/generators/qa_server/templates/config/authorities/linked_data/geonames_ld4l_cache.json
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
{
|
2
|
-
"QA_CONFIG_VERSION": "2.
|
2
|
+
"QA_CONFIG_VERSION": "2.2",
|
3
|
+
"service_uri": "http://ld4l.org/ld4l_services/cache",
|
3
4
|
"prefixes": {
|
4
5
|
"geo": "http://www.w3.org/2003/01/geo/wgs84_pos#",
|
5
6
|
"geonames": "http://www.geonames.org/ontology#",
|
@@ -78,8 +79,11 @@
|
|
78
79
|
},
|
79
80
|
"qa_replacement_patterns": {
|
80
81
|
"query": "query",
|
81
|
-
"subauth": "entity"
|
82
|
+
"subauth": "entity",
|
83
|
+
"start_record": "startRecord",
|
84
|
+
"requested_records": "maxRecords"
|
82
85
|
},
|
86
|
+
"total_count_ldpath": "vivo:count",
|
83
87
|
"language": ["en"],
|
84
88
|
"results": {
|
85
89
|
"label_ldpath": "geonames:name ::xsd:string",
|
data/lib/generators/qa_server/templates/config/authorities/linked_data/getty_aat_ld4l_cache.json
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
{
|
2
|
-
"QA_CONFIG_VERSION": "2.
|
2
|
+
"QA_CONFIG_VERSION": "2.2",
|
3
|
+
"service_uri": "http://ld4l.org/ld4l_services/cache",
|
3
4
|
"prefixes": {
|
4
5
|
"vivo": "http://vivoweb.org/ontology/core#"
|
5
6
|
},
|
@@ -78,8 +79,11 @@
|
|
78
79
|
},
|
79
80
|
"qa_replacement_patterns": {
|
80
81
|
"query": "query",
|
81
|
-
"subauth": "subauth"
|
82
|
+
"subauth": "subauth",
|
83
|
+
"start_record": "startRecord",
|
84
|
+
"requested_records": "maxRecords"
|
82
85
|
},
|
86
|
+
"total_count_ldpath": "vivo:count",
|
83
87
|
"results": {
|
84
88
|
"id_ldpath": "dc:identifier ::xsd:string",
|
85
89
|
"label_ldpath": "skos:prefLabel ::xsd:string",
|
data/lib/generators/qa_server/templates/config/authorities/linked_data/getty_tgn_ld4l_cache.json
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
{
|
2
|
-
"QA_CONFIG_VERSION": "2.
|
2
|
+
"QA_CONFIG_VERSION": "2.2",
|
3
|
+
"service_uri": "http://ld4l.org/ld4l_services/cache",
|
3
4
|
"prefixes": {
|
4
5
|
"getty": "http://vocab.getty.edu/ontology#",
|
5
6
|
"vivo": "http://vivoweb.org/ontology/core#"
|
@@ -71,8 +72,11 @@
|
|
71
72
|
]
|
72
73
|
},
|
73
74
|
"qa_replacement_patterns": {
|
74
|
-
"query": "query"
|
75
|
+
"query": "query",
|
76
|
+
"start_record": "startRecord",
|
77
|
+
"requested_records": "maxRecords"
|
75
78
|
},
|
79
|
+
"total_count_ldpath": "vivo:count",
|
76
80
|
"results": {
|
77
81
|
"id_ldpath": "dc:identifier ::xsd:string",
|
78
82
|
"label_ldpath": "skos:prefLabel ::xsd:string",
|
data/lib/generators/qa_server/templates/config/authorities/linked_data/getty_ulan_ld4l_cache.json
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
{
|
2
|
-
"QA_CONFIG_VERSION": "2.
|
2
|
+
"QA_CONFIG_VERSION": "2.2",
|
3
|
+
"service_uri": "http://ld4l.org/ld4l_services/cache",
|
3
4
|
"prefixes": {
|
4
5
|
"vivo": "http://vivoweb.org/ontology/core#"
|
5
6
|
},
|
@@ -78,8 +79,11 @@
|
|
78
79
|
},
|
79
80
|
"qa_replacement_patterns": {
|
80
81
|
"query": "query",
|
81
|
-
"subauth": "entity"
|
82
|
+
"subauth": "entity",
|
83
|
+
"start_record": "startRecord",
|
84
|
+
"requested_records": "maxRecords"
|
82
85
|
},
|
86
|
+
"total_count_ldpath": "vivo:count",
|
83
87
|
"results": {
|
84
88
|
"id_ldpath": "dc:identifier ::xsd:string",
|
85
89
|
"label_ldpath": "skos:prefLabel ::xsd:string",
|
@@ -1,5 +1,6 @@
|
|
1
1
|
{
|
2
|
-
"QA_CONFIG_VERSION": "2.
|
2
|
+
"QA_CONFIG_VERSION": "2.2",
|
3
|
+
"service_uri": "http://ld4l.org/ld4l_services/cache",
|
3
4
|
"prefixes": {
|
4
5
|
"loc": "http://id.loc.gov/vocabulary/identifiers/",
|
5
6
|
"madsrdf": "http://www.loc.gov/mads/rdf/v1#",
|
@@ -70,8 +71,11 @@
|
|
70
71
|
]
|
71
72
|
},
|
72
73
|
"qa_replacement_patterns": {
|
73
|
-
"query": "query"
|
74
|
+
"query": "query",
|
75
|
+
"start_record": "startRecord",
|
76
|
+
"requested_records": "maxRecords"
|
74
77
|
},
|
78
|
+
"total_count_ldpath": "vivo:count",
|
75
79
|
"results": {
|
76
80
|
"label_ldpath": "skos:prefLabel ::xsd:string",
|
77
81
|
"sort_ldpath": "vivo:rank ::xsd:string"
|
data/lib/generators/qa_server/templates/config/authorities/linked_data/locgenres_ld4l_cache.json
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
{
|
2
|
-
"QA_CONFIG_VERSION": "2.
|
2
|
+
"QA_CONFIG_VERSION": "2.2",
|
3
|
+
"service_uri": "http://ld4l.org/ld4l_services/cache",
|
3
4
|
"prefixes": {
|
4
5
|
"loc": "http://id.loc.gov/vocabulary/identifiers/",
|
5
6
|
"madsrdf": "http://www.loc.gov/mads/rdf/v1#",
|
@@ -87,8 +88,11 @@
|
|
87
88
|
},
|
88
89
|
"qa_replacement_patterns": {
|
89
90
|
"query": "query",
|
90
|
-
"subauth": "entity"
|
91
|
+
"subauth": "entity",
|
92
|
+
"start_record": "startRecord",
|
93
|
+
"requested_records": "maxRecords"
|
91
94
|
},
|
95
|
+
"total_count_ldpath": "vivo:count",
|
92
96
|
"results": {
|
93
97
|
"id_ldpath": "loc:lccn ::xsd:string",
|
94
98
|
"label_ldpath": "skos:prefLabel | madsrdf:variantLabel ::xsd:string",
|
data/lib/generators/qa_server/templates/config/authorities/linked_data/locnames_ld4l_cache.json
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
{
|
2
|
-
"QA_CONFIG_VERSION": "2.
|
2
|
+
"QA_CONFIG_VERSION": "2.2",
|
3
|
+
"service_uri": "http://ld4l.org/ld4l_services/cache",
|
3
4
|
"prefixes": {
|
4
5
|
"loc": "http://id.loc.gov/vocabulary/identifiers/",
|
5
6
|
"madsrdf": "http://www.loc.gov/mads/rdf/v1#",
|
@@ -78,8 +79,11 @@
|
|
78
79
|
},
|
79
80
|
"qa_replacement_patterns": {
|
80
81
|
"query": "query",
|
81
|
-
"subauth": "entity"
|
82
|
+
"subauth": "entity",
|
83
|
+
"start_record": "startRecord",
|
84
|
+
"requested_records": "maxRecords"
|
82
85
|
},
|
86
|
+
"total_count_ldpath": "vivo:count",
|
83
87
|
"results": {
|
84
88
|
"id_ldpath": "loc:lccn ::xsd:string",
|
85
89
|
"label_ldpath": "madsrdf:authoritativeLabel ::xsd:string",
|
data/lib/generators/qa_server/templates/config/authorities/linked_data/locnames_rwo_ld4l_cache.json
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
{
|
2
|
-
"QA_CONFIG_VERSION": "2.
|
2
|
+
"QA_CONFIG_VERSION": "2.2",
|
3
|
+
"service_uri": "http://ld4l.org/ld4l_services/cache",
|
3
4
|
"prefixes": {
|
4
5
|
"loc": "http://id.loc.gov/vocabulary/identifiers/",
|
5
6
|
"madsrdf": "http://www.loc.gov/mads/rdf/v1#",
|
@@ -78,8 +79,11 @@
|
|
78
79
|
},
|
79
80
|
"qa_replacement_patterns": {
|
80
81
|
"query": "query",
|
81
|
-
"subauth": "entity"
|
82
|
+
"subauth": "entity",
|
83
|
+
"start_record": "startRecord",
|
84
|
+
"requested_records": "maxRecords"
|
82
85
|
},
|
86
|
+
"total_count_ldpath": "vivo:count",
|
83
87
|
"results": {
|
84
88
|
"id_ldpath": "^madsrdf:identifiesRWO/loc:lccn ::xsd:string",
|
85
89
|
"label_ldpath": "rdfs:label ::xsd:string",
|
@@ -225,6 +229,13 @@
|
|
225
229
|
"ldpath": "^madsrdf:identifiesRWO/madsrdf:editorialNote :: xsd:string",
|
226
230
|
"selectable": false,
|
227
231
|
"drillable": false
|
232
|
+
},
|
233
|
+
{
|
234
|
+
"property_label_default": "Authority URI",
|
235
|
+
"property_label_i18n": "qa.linked_data.authority.locnames_ld4l_cache.authority_uri",
|
236
|
+
"ldpath": "^madsrdf:identifiesRWO :: xsd:string",
|
237
|
+
"selectable": false,
|
238
|
+
"drillable": false
|
228
239
|
}
|
229
240
|
]
|
230
241
|
},
|
@@ -1,5 +1,6 @@
|
|
1
1
|
{
|
2
|
-
"QA_CONFIG_VERSION": "2.
|
2
|
+
"QA_CONFIG_VERSION": "2.2",
|
3
|
+
"service_uri": "http://ld4l.org/ld4l_services/cache",
|
3
4
|
"prefixes": {
|
4
5
|
"loc": "http://id.loc.gov/vocabulary/identifiers/",
|
5
6
|
"madsrdf": "http://www.loc.gov/mads/rdf/v1#",
|
@@ -70,8 +71,11 @@
|
|
70
71
|
]
|
71
72
|
},
|
72
73
|
"qa_replacement_patterns": {
|
73
|
-
"query": "query"
|
74
|
+
"query": "query",
|
75
|
+
"start_record": "startRecord",
|
76
|
+
"requested_records": "maxRecords"
|
74
77
|
},
|
78
|
+
"total_count_ldpath": "vivo:count",
|
75
79
|
"results": {
|
76
80
|
"label_ldpath": "skos:prefLabel ::xsd:string",
|
77
81
|
"sort_ldpath": "vivo:rank ::xsd:string"
|
data/lib/generators/qa_server/templates/config/authorities/linked_data/locsubjects_ld4l_cache.json
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
{
|
2
|
-
"QA_CONFIG_VERSION": "2.
|
2
|
+
"QA_CONFIG_VERSION": "2.2",
|
3
|
+
"service_uri": "http://ld4l.org/ld4l_services/cache",
|
3
4
|
"prefixes": {
|
4
5
|
"loc": "http://id.loc.gov/vocabulary/identifiers/",
|
5
6
|
"madsrdf": "http://www.loc.gov/mads/rdf/v1#",
|
@@ -71,8 +72,11 @@
|
|
71
72
|
},
|
72
73
|
"qa_replacement_patterns": {
|
73
74
|
"query": "query",
|
74
|
-
"subauth": "entity"
|
75
|
+
"subauth": "entity",
|
76
|
+
"start_record": "startRecord",
|
77
|
+
"requested_records": "maxRecords"
|
75
78
|
},
|
79
|
+
"total_count_ldpath": "vivo:count",
|
76
80
|
"results": {
|
77
81
|
"label_ldpath": "madsrdf:authoritativeLabel ::xsd:string",
|
78
82
|
"sort_ldpath": "vivo:rank ::xsd:string"
|
data/lib/generators/qa_server/templates/config/authorities/linked_data/mesh_nlm_ld4l_cache.json
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
{
|
2
|
-
"QA_CONFIG_VERSION": "2.
|
2
|
+
"QA_CONFIG_VERSION": "2.2",
|
3
|
+
"service_uri": "http://ld4l.org/ld4l_services/cache",
|
3
4
|
"prefixes": {
|
4
5
|
"nlmmesh": "http://id.nlm.nih.gov/mesh/vocab#",
|
5
6
|
"vivo": "http://vivoweb.org/ontology/core#"
|
@@ -66,8 +67,11 @@
|
|
66
67
|
]
|
67
68
|
},
|
68
69
|
"qa_replacement_patterns": {
|
69
|
-
"query": "query"
|
70
|
+
"query": "query",
|
71
|
+
"start_record": "startRecord",
|
72
|
+
"requested_records": "maxRecords"
|
70
73
|
},
|
74
|
+
"total_count_ldpath": "vivo:count",
|
71
75
|
"results": {
|
72
76
|
"id_ldpath": "nlmmesh:identifier ::xsd:string",
|
73
77
|
"label_ldpath": "nlmmesh:prefLabel ::xsd:string",
|
@@ -1,5 +1,6 @@
|
|
1
1
|
{
|
2
|
-
"QA_CONFIG_VERSION": "2.
|
2
|
+
"QA_CONFIG_VERSION": "2.2",
|
3
|
+
"service_uri": "http://ld4l.org/ld4l_services/cache",
|
3
4
|
"prefixes": {
|
4
5
|
"vivo": "http://vivoweb.org/ontology/core#"
|
5
6
|
},
|
@@ -77,8 +78,11 @@
|
|
77
78
|
},
|
78
79
|
"qa_replacement_patterns": {
|
79
80
|
"query": "query",
|
80
|
-
"subauth": "entity"
|
81
|
+
"subauth": "entity",
|
82
|
+
"start_record": "startRecord",
|
83
|
+
"requested_records": "maxRecords"
|
81
84
|
},
|
85
|
+
"total_count_ldpath": "vivo:count",
|
82
86
|
"results": {
|
83
87
|
"label_ldpath": "skos:prefLabel ::xsd:string",
|
84
88
|
"sort_ldpath": "vivo:rank ::xsd:string"
|
data/lib/generators/qa_server/templates/config/authorities/linked_data/oclcfast_ld4l_cache.json
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
{
|
2
|
-
"QA_CONFIG_VERSION": "2.
|
2
|
+
"QA_CONFIG_VERSION": "2.2",
|
3
|
+
"service_uri": "http://ld4l.org/ld4l_services/cache",
|
3
4
|
"prefixes": {
|
4
5
|
"dcterms": "http://purl.org/dc/terms/",
|
5
6
|
"vivo": "http://vivoweb.org/ontology/core#"
|
@@ -77,8 +78,11 @@
|
|
77
78
|
},
|
78
79
|
"qa_replacement_patterns": {
|
79
80
|
"query": "query",
|
80
|
-
"subauth": "entity"
|
81
|
+
"subauth": "entity",
|
82
|
+
"start_record": "startRecord",
|
83
|
+
"requested_records": "maxRecords"
|
81
84
|
},
|
85
|
+
"total_count_ldpath": "vivo:count",
|
82
86
|
"results": {
|
83
87
|
"id_ldpath": "dcterms:identifier ::xsd:string",
|
84
88
|
"label_ldpath": "skos:prefLabel ::xsd:string",
|
data/lib/generators/qa_server/templates/config/authorities/linked_data/rda_registry_ld4l_cache.json
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
{
|
2
|
-
"QA_CONFIG_VERSION": "2.
|
2
|
+
"QA_CONFIG_VERSION": "2.2",
|
3
|
+
"service_uri": "http://ld4l.org/ld4l_services/cache",
|
3
4
|
"prefixes": {
|
4
5
|
"vivo": "http://vivoweb.org/ontology/core#"
|
5
6
|
},
|
@@ -49,8 +50,11 @@
|
|
49
50
|
},
|
50
51
|
"qa_replacement_patterns": {
|
51
52
|
"query": "query",
|
52
|
-
"subauth": "entity"
|
53
|
+
"subauth": "entity",
|
54
|
+
"start_record": "startRecord",
|
55
|
+
"requested_records": "maxRecords"
|
53
56
|
},
|
57
|
+
"total_count_ldpath": "vivo:count",
|
54
58
|
"results": {
|
55
59
|
"label_ldpath": "skos:prefLabel ::xsd:string",
|
56
60
|
"sort_ldpath": "vivo:rank ::xsd:string"
|
@@ -0,0 +1,61 @@
|
|
1
|
+
---
|
2
|
+
authority:
|
3
|
+
service: ld4l_cache
|
4
|
+
context: true
|
5
|
+
search:
|
6
|
+
-
|
7
|
+
query: John Winters
|
8
|
+
-
|
9
|
+
query: John Winters
|
10
|
+
subauth: person
|
11
|
+
-
|
12
|
+
query: Jacob Winter
|
13
|
+
subauth: imprint
|
14
|
+
-
|
15
|
+
query: Typographia Plantiniana
|
16
|
+
subauth: corporate
|
17
|
+
-
|
18
|
+
query: Joannes Philippus de Lignamine
|
19
|
+
subauth: person
|
20
|
+
position: 1
|
21
|
+
subject_uri: "http://thesaurus.cerl.org/record/cnp00372755"
|
22
|
+
replacements:
|
23
|
+
maxRecords: '8'
|
24
|
+
-
|
25
|
+
query: Joannes Philippus de Lignamine
|
26
|
+
subauth: person
|
27
|
+
position: 2
|
28
|
+
subject_uri: "http://thesaurus.cerl.org/record/cnp00895966"
|
29
|
+
replacements:
|
30
|
+
maxRecords: '8'
|
31
|
+
-
|
32
|
+
query: Jacob Winter
|
33
|
+
subauth: person
|
34
|
+
position: 2
|
35
|
+
subject_uri: "http://thesaurus.cerl.org/record/cnp02081773"
|
36
|
+
replacements:
|
37
|
+
maxRecords: '8'
|
38
|
+
-
|
39
|
+
query: Jacob Winter
|
40
|
+
subauth: imprint
|
41
|
+
position: 4
|
42
|
+
subject_uri: "http://thesaurus.cerl.org/record/cni00081233"
|
43
|
+
replacements:
|
44
|
+
maxRecords: '8'
|
45
|
+
-
|
46
|
+
query: Plantin
|
47
|
+
subauth: imprint
|
48
|
+
position: 1
|
49
|
+
subject_uri: "http://thesaurus.cerl.org/record/cni00007649"
|
50
|
+
replacements:
|
51
|
+
maxRecords: '8'
|
52
|
+
-
|
53
|
+
query: Typographia Plantiniana
|
54
|
+
subauth: corporate
|
55
|
+
position: 1
|
56
|
+
subject_uri: "http://thesaurus.cerl.org/record/cnc00011608"
|
57
|
+
replacements:
|
58
|
+
maxRecords: '8'
|
59
|
+
term:
|
60
|
+
-
|
61
|
+
identifier: "http://thesaurus.cerl.org/record/cnp00895966"
|
@@ -0,0 +1,14 @@
|
|
1
|
+
class AddDateColumnToScenarioRunHistory < ActiveRecord::Migration<%= migration_version %>
|
2
|
+
def change
|
3
|
+
add_column :scenario_run_history, :date, :date
|
4
|
+
add_index :scenario_run_history, :date
|
5
|
+
|
6
|
+
begin
|
7
|
+
QaServer::ScenarioRunHistory.all.each do |entry|
|
8
|
+
registry = QaServer::ScenarioRunRegistry.find(entry.scenario_run_registry_id)
|
9
|
+
entry.date = registry.dt_stamp.to_date
|
10
|
+
entry.save
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
data/lib/qa_server/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: qa_server
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.
|
4
|
+
version: 6.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- E. Lynette Rayle
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-02-
|
11
|
+
date: 2020-02-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -410,6 +410,7 @@ files:
|
|
410
410
|
- lib/generators/qa_server/templates/config/authorities/linked_data/DISABLED/scenarios/mesh_bioportal_ld4l_cache_validation.yml
|
411
411
|
- lib/generators/qa_server/templates/config/authorities/linked_data/agrovoc_direct.json
|
412
412
|
- lib/generators/qa_server/templates/config/authorities/linked_data/agrovoc_ld4l_cache.json
|
413
|
+
- lib/generators/qa_server/templates/config/authorities/linked_data/cerl_ld4l_cache.json
|
413
414
|
- lib/generators/qa_server/templates/config/authorities/linked_data/dbpedia_direct.json
|
414
415
|
- lib/generators/qa_server/templates/config/authorities/linked_data/dbpedia_ld4l_cache.json
|
415
416
|
- lib/generators/qa_server/templates/config/authorities/linked_data/geonames_direct.json
|
@@ -432,7 +433,7 @@ files:
|
|
432
433
|
- lib/generators/qa_server/templates/config/authorities/linked_data/rda_registry_ld4l_cache.json
|
433
434
|
- lib/generators/qa_server/templates/config/authorities/linked_data/scenarios/agrovoc_direct_validation.yml
|
434
435
|
- lib/generators/qa_server/templates/config/authorities/linked_data/scenarios/agrovoc_ld4l_cache_validation.yml
|
435
|
-
- lib/generators/qa_server/templates/config/authorities/linked_data/scenarios/
|
436
|
+
- lib/generators/qa_server/templates/config/authorities/linked_data/scenarios/cerl_ld4l_cache_validation.yml
|
436
437
|
- lib/generators/qa_server/templates/config/authorities/linked_data/scenarios/dbpedia_direct_validation.yml
|
437
438
|
- lib/generators/qa_server/templates/config/authorities/linked_data/scenarios/dbpedia_ld4l_cache_validation.yml
|
438
439
|
- lib/generators/qa_server/templates/config/authorities/linked_data/scenarios/geonames_direct_validation.yml
|
@@ -468,6 +469,7 @@ files:
|
|
468
469
|
- lib/generators/qa_server/templates/db/migrate/20180809045552_add_indices_to_scenario_run_history.rb.erb
|
469
470
|
- lib/generators/qa_server/templates/db/migrate/20190813045549_create_performance_history.rb.erb
|
470
471
|
- lib/generators/qa_server/templates/db/migrate/20191007134527_update_performance_history_table.rb.erb
|
472
|
+
- lib/generators/qa_server/templates/db/migrate/20200213160549_add_date_column_to_scenario_run_history.rb.erb
|
471
473
|
- lib/generators/qa_server/templates/qa_server.scss
|
472
474
|
- lib/qa_server.rb
|
473
475
|
- lib/qa_server/configuration.rb
|
@@ -1,51 +0,0 @@
|
|
1
|
-
authority:
|
2
|
-
service: ld4_cache
|
3
|
-
context: true
|
4
|
-
|
5
|
-
-
|
6
|
-
query: Joannes Philippus de Lignamine
|
7
|
-
subauth: person
|
8
|
-
position: 1
|
9
|
-
subject_uri: “http://thesaurus.cerl.org/record/cnp00372755”
|
10
|
-
replacements:
|
11
|
-
maxRecords: '8'
|
12
|
-
|
13
|
-
-
|
14
|
-
query: Joannes Philippus de Lignamine
|
15
|
-
subauth: person
|
16
|
-
position: 2
|
17
|
-
subject_uri: “http://thesaurus.cerl.org/record/cnp00895966”
|
18
|
-
replacements:
|
19
|
-
maxRecords: '8'
|
20
|
-
-
|
21
|
-
query: Jacob Winter
|
22
|
-
subauth: person
|
23
|
-
position: 2
|
24
|
-
subject_uri: “http://thesaurus.cerl.org/record/cnp02081773”
|
25
|
-
replacements:
|
26
|
-
maxRecords: '8'
|
27
|
-
|
28
|
-
-
|
29
|
-
query: Jacob Winter
|
30
|
-
subauth: imprint
|
31
|
-
position: 4
|
32
|
-
subject_uri: “http://thesaurus.cerl.org/record/cni00081233”
|
33
|
-
replacements:
|
34
|
-
maxRecords: '8'
|
35
|
-
-
|
36
|
-
query: Plantin
|
37
|
-
subauth: imprint
|
38
|
-
position: 1
|
39
|
-
subject_uri: “http://thesaurus.cerl.org/record/cni00007649”
|
40
|
-
replacements:
|
41
|
-
maxRecords: '8'
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
-
|
46
|
-
query: Typographia Plantiniana
|
47
|
-
subauth: corporate_body
|
48
|
-
position: 1
|
49
|
-
subject_uri: “http://thesaurus.cerl.org/record/cnc00011608”
|
50
|
-
replacements:
|
51
|
-
maxRecords: '8'
|