Project

krikri

0.02
Repository is archived
No commit activity in last 3 years
No release in over 3 years
Metadata aggregation and enrichment for cultural heritage institutions.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

= 4.0.0
~> 0.2
~> 5.8.0
~> 3.4.1
= 4.0.0.0.pre.13
~> 3.0
~> 0.5
~> 1.6.8
~> 0.4.0
~> 4.1.6
~> 0.4.0
~> 1.1.13
~> 0.0.6
~> 1.1.8
~> 1.26
~> 4.0.5
~> 1.3
 Project Readme

Kri-Kri

Build Status Code Climate Test Coverage

A Rails engine for metadata aggregation, enhancement, and quality control. Digital Public Library of America uses Kri-Kri as part of Heiðrún, its metadata ingestion system.

More information about Heidrun and Kri-kri can be found on DPLA's Technology Team site.

Installation

  1. Add the krikri gem to your Gemfile.

  2. Run bundle exec rails g krikri:install

    This will modify your Gemfile, so you should check it for redundancies.

  3. The install task will have added mount Krikri::Engine => '/krikri' to your routes.rb. You may customize the path.

  4. Run bundle exec rake db:migrate

  5. You may run bundle exec rake routes to inspect the new routes that will have been added, and bundle exec rails s to check that the new resources are served.

  6. See the Resque documentation on how to run queue workers. There will be a console for the Resque job queue available as '/resque' under the Krikri base path in your web application.

Development

Check out this repository and run:

bundle install
rake jetty:unzip
rake jetty:config

Run the tests with:

rake ci

Or you can start the dummy (test) application with:

rake engine_cart:generate
bundle update
rake jetty:start
rake engine_cart:server

The generated dummy application is located in .internal_test_app by default.

To update/restart dummy (test) application, from the root KriKri directory:

git pull
bundle update
rake engine_cart:clean
rake engine_cart:generate
rake engine_cart:server

To update/restart jetty, from the root KriKri directory:

git pull
bundle update
rake jetty:stop
rake jetty:config
rake jetty:start

Customization

Krikri uses Blacklight. Blacklight's installation process includes the creation of some routes that Krikri does not use. Blacklight also roots to one of these un-used routes. We suggested removing both the un-used routes and the root route by deleting the following line from config/routes.rb:

blacklight_for :catalog
root :to => "catalog#index"

You can then choose a different route to root to, for example:

root :to => "krikri_records#index"

Note that whether or not you delete the un-used Blacklight routes, Blacklight's controllers, models, and views still exists within your application. Be careful not to unintentionally open them by using identical names for your controllers, models, and views. For more information, see Blacklight's website.

Sample Data

To save a sample record to Solr and Marmotta, from /krikri/spec/internal:

rake krikri:samples:save_record

To save an invalid sample record to Solr and Marmotta:

rake krikri:samples:save_invalid_record

To delete all sample records:

rake krikri:samples:delete_record

To save a sample institution and harvest source, from /krikri/spec/internal:

rake krikri:samples:save_institution

To delete the sample institution and harvest source:

rake krikri:samples:delete_institution

Using Vagrant for development (experimental)

Prerequisites:

For installation:

vagrant up
vagrant reload  # Because of o/s packages having been upgraded
vagrant ssh
cd /vagrant
bundle exec rake jetty:start
cd spec/internal
bundle exec rake krikri:index_sample_data
bundle exec rails s

Then access the wrapper application at http://localhost:3000/

From then on, to start things up, do:

vagrant up
vagrant ssh
cd /vagrant
bundle exec rake jetty:start
cd /vagrant/spec/internal
bundle exec rails s

You may re-run the provisioning with vagrant provision. This will clean and re-create the Jetty installation. (So don't do it if you want to preserve your Marmotta or Solr.) A future update will include more specific configuration and update tasks.

Please see the notes in our automation project README regarding the use of this VM.

Using Guard for tests

Guard is configured with RSpec; you can run guard to enable specs to run as configured in the Guardfile.

Known Issues

Our krikri:install generator will install Blacklight. Blacklight is known not to work well with turbolinks, so you should uninstall that if it's installed already:

http://blog.steveklabnik.com/posts/2013-06-25-removing-turbolinks-from-rails-4

Contribution Guidelines

Please observe the following guidelines:

  • Write tests for your contributions.
  • Document methods you add using YARD annotations.
  • Follow the included style guidelines (i.e. run rubocop before committing).
  • Use well formed commit messages.

Copyright & License

  • Copyright Digital Public Library of America, 2014-2017
  • License: MIT