Conversation
❌ 26 blocking issues (33 total)
|
Coverage Report for CI Build 30853819033Coverage decreased (-0.06%) to 98.265%Details
Uncovered Changes
Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
| format.json { render json: { results: @results, pagination: @pagination, errors: @errors } } | ||
| format.turbo_stream { render :results } | ||
| format.html { render :results } | ||
| end |
There was a problem hiding this comment.
| @results = NormalizeTimdexResults.new(raw_results, @enhanced_query[:q]).normalize | ||
| @filters = extract_filters(response) | ||
| @append_results = @results | ||
| @load_more = load_more_from_pagination(@pagination) |
| @errors = data[:errors] | ||
| @pagination = data[:pagination] | ||
| @show_primo_continuation = data[:show_primo_continuation] | ||
| @load_more = data[:load_more] |
| def combine_errors(*error_arrays) | ||
| all_errors = error_arrays.compact.flatten | ||
| all_errors.any? ? all_errors : nil | ||
| end |
| has_more: has_more?(state, display_count), | ||
| total_hits: total_hits | ||
| } | ||
| } |
| ].slice(offset, per_page) || [] | ||
| { results: results, hits: 4, errors: nil, show_continuation: false } | ||
| end | ||
| timdex_fetcher = lambda do |offset:, per_page:, query: nil| |
| assert_equal 2, timdex_calls.length | ||
| test 'fetch stops when duplicate source chunks do not grow the ordered result set' do | ||
| calls = [] | ||
| fetcher = lambda do |offset:, per_page:, query: nil| |
There was a problem hiding this comment.
Found 2 issues:
1. Unused block argument - per_page. If it's necessary, use _ or _per_page as an argument name to indicate that it won't be used. [rubocop:Lint/UnusedBlockArgument]
2. Unused block argument - query. If it's necessary, use _ or _query as an argument name to indicate that it won't be used. [rubocop:Lint/UnusedBlockArgument]
| called << [:timdex, offset, per_page] | ||
| test 'fetch defaults to 50 results per source when env var is not set' do | ||
| per_page_seen = [] | ||
| fetcher = lambda do |offset:, per_page:, query: nil| |
There was a problem hiding this comment.
Found 2 issues:
1. Unused block argument - offset. If it's necessary, use _ or _offset as an argument name to indicate that it won't be used. [rubocop:Lint/UnusedBlockArgument]
2. Unused block argument - query. If it's necessary, use _ or _query as an argument name to indicate that it won't be used. [rubocop:Lint/UnusedBlockArgument]
| primo_all = (1..3).map { |i| { title: "P#{i}", score: 1.0 - (i * 0.01), api: 'primo', identifier: "p#{i}" } } | ||
| timdex_all = (1..5).map { |i| { title: "T#{i}", score: 1.0 - (i * 0.01), api: 'timdex', identifier: "t#{i}" } } | ||
|
|
||
| primo_fetcher = lambda do |offset:, per_page:, query: nil| |
| { results: primo_all.slice(offset, per_page) || [], hits: primo_all.length, errors: nil, | ||
| show_continuation: false } | ||
| end | ||
| timdex_fetcher = lambda do |offset:, per_page:, query: nil| |
Developer
Accessibility
New ENV
Approval beyond code review
Additional context needed to review
E.g., if the PR includes updated dependencies and/or data
migration, or how to confirm the feature is working.
Code Reviewer
Code
added technical debt.
Documentation
(not just this pull request message).
Testing