• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pulibrary / bibdata / f04bc944-f9b4-4a42-8b26-dcacd0e3e688

11 Mar 2025 10:27PM UTC coverage: 34.017% (-58.1%) from 92.162%
f04bc944-f9b4-4a42-8b26-dcacd0e3e688

Pull #2653

circleci

christinach
Add new lc_subject_facet field.
Helps with the vocabulary work https://github.com/pulibrary/orangelight/pull/3386
In this new field we index only the lc subject heading and the subdivisions
So that when the user searches using the Details section, they can query solr for
all the subject headings and their divisions.

This is needed for the Subject browse Vocabulary work.
example: "lc_subject_facet": [
             "Booksellers and bookselling—Italy—Directories",
             "Booksellers and bookselling-Italy",
             "Booksellers and bookselling"
              ]
Pull Request #2653: Add new lc_subject_facet field.

1 of 3 new or added lines in 1 file covered. (33.33%)

2215 existing lines in 93 files now uncovered.

1294 of 3804 relevant lines covered (34.02%)

0.99 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/app/jobs/import/partner/full_callbacks.rb
UNCOV
1
module Import
×
UNCOV
2
  module Partner
×
UNCOV
3
    class FullCallbacks
×
UNCOV
4
      def overall_success(_status, options)
×
UNCOV
5
        event = Event.find(options['event_id'])
×
UNCOV
6
        Dump.generated_date(event.dump.id)
×
UNCOV
7
        event.success = true
×
UNCOV
8
        event.finish = Time.now.utc
×
UNCOV
9
        event.save!
×
UNCOV
10
      end
×
11

UNCOV
12
      def validate_csv_success(status, options)
×
UNCOV
13
        institution = options['institution']
×
UNCOV
14
        dump_id = options['dump_id']
×
UNCOV
15
        prefix = options['prefix']
×
UNCOV
16
        dump = Dump.find(dump_id)
×
17

UNCOV
18
        overall = Sidekiq::Batch.new(status.parent_bid)
×
UNCOV
19
        overall.jobs do
×
UNCOV
20
          download_full_file_batch = Sidekiq::Batch.new
×
UNCOV
21
          download_full_file_batch.description = "Download full dump for institution #{institution}"
×
UNCOV
22
          download_full_file_batch.on(:success, 'Import::Partner::FullCallbacks#download_file_success', 'dump_id' => dump_id, 'institution' => institution, 'prefix' => prefix)
×
UNCOV
23
          download_full_file_batch.jobs do
×
UNCOV
24
            Import::Partner::DownloadFullFileJob.perform_async(dump_id, institution, prefix)
×
UNCOV
25
          end
×
UNCOV
26
        end
×
UNCOV
27
      end
×
28

29
      # Empty callbacks in preparation for future further breaking down of background jobs
UNCOV
30
      def download_file_success(status, options); end
×
31

UNCOV
32
      def process_xml_file_success(_status, options)
×
33
        # unlink big zip file here
UNCOV
34
        zip_file = options['zip_file']
×
UNCOV
35
        File.unlink(zip_file) if File.exist?(zip_file)
×
UNCOV
36
      end
×
UNCOV
37
    end
×
UNCOV
38
  end
×
UNCOV
39
end
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc