Skip to content
This repository has been archived by the owner on Dec 22, 2022. It is now read-only.
/ discovery Public archive

Discovery is the University of Alberta Libraries' catalogue interface, built using Blacklight

Notifications You must be signed in to change notification settings

ualbertalib/discovery

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

d3a2530 · Sep 19, 2019
Sep 20, 2018
Sep 19, 2019
Feb 7, 2019
Sep 19, 2019
Sep 19, 2019
Oct 4, 2018
Feb 7, 2019
Jul 22, 2014
Jan 21, 2019
Sep 19, 2019
Jul 11, 2019
Feb 26, 2019
Oct 18, 2018
Mar 28, 2019
Feb 5, 2019
Sep 6, 2018
Mar 31, 2015
Apr 9, 2019
Mar 7, 2019
Sep 19, 2019
Sep 19, 2019
Apr 30, 2019
Mar 8, 2019
Sep 3, 2019
Sep 19, 2019
Sep 19, 2019
Oct 30, 2018
Oct 30, 2018
Mar 12, 2019
Nov 7, 2018

Repository files navigation

Discovery Interface for University of Alberta Libraries

Build Status

This is the code base for the University of Alberta Libraries's discovery platform. Based on Project Blacklight.

Architecture

Discovery Architecture Diagram

To get the application up and running for development:

  1. clone this repository (git clone https://github.com/ualbertalib/discovery)
  2. run docker-compose -f docker-compose.lightweight.yml up -d
  3. run bundle install
  4. run bundle exec rake db:setup
  5. bundle exec rake ingest[database_test_set] && bundle exec rake ingest[sfx_test_set] && bundle exec rake ingest[symphony_test_set] (need Java Installed to run this) If you're looking to use a production like dataset or avoid the hassle of running docker and performing these ingest tasks, export SOLR_URL=http://solrcloud-test.library.ualberta.ca:8080/solr/discovery-test
  6. bundle exec rails s
  7. Point your browser to http://localhost:3000/catalog

To run the tests:

Unit and Acceptance Tests

  1. bundle install --without development production
  2. RAILS_ENV=test bundle exec rake db:create
  3. RAILS_ENV=test bundle exec rake db:migrate
  4. bundle exec rake spec

Integration tests (run against http://search-test.library.ualberta.ca/)

  1. cpan WWW::Mechanize && cpan JSON && cpan HTML::TreeBuilder::XPath to install perl dependencies
  2. wget -O /var/tmp/mobyDick.txt http://www.gutenberg.org/ebooks/2701.txt.utf-8 your first visit to gutenberg might give you non utf-8 characters when it says, "hello stranger."
  3. cd test/grabBag
  4. ./allTests.pl

Additional Tasks for uat, staging and production

  1. bundle exec rake assets:precompile this can take several minutes
  2. create cron jobs to ingest bundle exec rake ingest[sfx], bundle exec rake ingest[databases] and clean session table bundle exec rake sessions:cleanup

UAT

Go here for information about accessing Discovery UAT instance.

Ingest

The standard library cataloguing data format is MARC. MARC uses numeric fields to contain bibliographic information in the form of text strings that use a content standard to format the text and, perhaps more importantly, the punctuation. Each MARC field can be subdivided into alphabetical subfields which generally either a) containing repeated elements or b) subdivide the text string. MARC fields and subfields are often written out as e.g. 245$a which means field number 245 (= title), subfield a.

In SolrMarc, the library currently being used to index Blacklight data, the mapping of MARC fields occurs here with more sophisticated data manipulation using BeanShell happening in these scripts. Once the fields have been mapped, they can be designated for search and/or display in the appropriate Solr config file (either schema.xml or solrconfig.xml).

bundle exec rake ingest[collection] where collection is mainly 'symphony', 'sfx', 'kule' or 'databases'. See config/ingest.yml for other collections. Most collections are expected to be represented by a file in a ./data directory.

By default the solr target (:url) is set from '#{Rails.env}' stanza in config/blacklight.yml. Alternately you can set the SOLR_INGEST_URL directly.

export SOLR_INGEST_URL=http://localhost:8983/solr/your-new-solr-collection
bundle exec rake ingest[collection]
unset SOLR_INGEST_URL # if desired