Skip to content

Blacklight front-end for Californica

License

Notifications You must be signed in to change notification settings

UCLALibrary/ursus

Folders and files

NameName
Last commit message
Last commit date
Mar 1, 2023
May 4, 2023
Mar 26, 2019
May 4, 2023
Jan 15, 2020
Jan 23, 2019
Mar 2, 2023
Apr 28, 2023
Sep 18, 2018
Feb 4, 2021
Mar 3, 2020
May 4, 2023
Sep 18, 2018
Sep 18, 2018
Jun 3, 2020
Mar 1, 2021
Mar 30, 2021
Oct 2, 2018
Jun 22, 2022
May 27, 2021
Oct 23, 2018
Nov 12, 2020
May 20, 2020
Oct 9, 2020
Mar 26, 2019
Feb 25, 2023
Jan 14, 2021
May 13, 2022
May 13, 2022
Sep 1, 2022
Jun 22, 2022
Mar 10, 2021
Mar 26, 2019
Sep 2, 2020
Mar 30, 2023
Feb 25, 2023
May 5, 2023
Feb 25, 2023
Mar 1, 2023
Mar 1, 2023
Nov 2, 2021
Mar 1, 2023

Repository files navigation

UCLA Library Management - Ursus


Ursus is designed as the public interface for UCLA's digital library content.

Bruin Bear (statue) In 1984 to mark its 50th Anniversary, the UCLA Alumni Association commissioned "Mighty Bruins" and presented the Bruin Bear Statue to the university. The statue is now a campus landmark and a focal point in Westwood Plaza.


Build Status Apache 2.0 License Coverage Status This project is using Percy.io for visual regression testing.


Development

This section gives basic instructions to get Ursus running locally. More extensive developer documentation is maintained in the wiki.

Install and run locally

Ursus is a Blacklight application and only needs Solr and Fedora.

Ursus can run locally in two ways:

  1. Stand alone mode
  2. In conjunction with local instance of Californica

Standalone mode

The file docker-compose-standalone.yml includes a setup with a clone of the ursus-stage and sinai-stage solr indexes, so you do not need to run californica and manually ingest material (in fact, californica should #not# be running to avoid port conflicts.)

1. Clone the repo from GitHub

git clone git@github.com:UCLALibrary/ursus.git

2. Change directories into the repo

cd ursus

3. Set up the databases

docker-compose run web bundle exec rails db:setup

4. Bring up the development environment

** Do this after setting up the databases** - the startup scripts require the database to be ready so that they can set feature flags e.g. for the Sinai UI mode.

docker-compose up

Ursus should now be running


Running linters and unit tests

Connect to a shell inside the container with:

docker-compose run web bash

Then run the entire suite, except for the cypress integration test, with:

sh start-ci.sh

You can inspect the start-ci.sh script to see which linters and tests this invokes.

Or individually:

  1. root@ursus:/ursus# bundle exec erblint --lint-all
  2. root@ursus:/ursus# yarn run lint
  3. root@ursus:/ursus# rubocop

Running the integration tests

First, you will need to install node.js and npm locally.

Then cd into the e2e directory and install the javascript dependencies:

cd e2e
npm install

Next, you can either open the cypress test runner GUI with:

npx cypress open

or run the tests in the command line:

npx cypress run

Visual regression tests

Visual regression testing is done via percy.io. This runs only for pull requests on travis; it will not run locally.

Rebuilding the image

If you need to rebuild the docker image (for example, if packages were added to the Gemfile), run:

  1. docker-compose pull
  2. docker-compose up --build