Giter VIP home page Giter VIP logo

krikri's Introduction

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

krikri's People

Contributors

anarchivist avatar markbreedlove avatar moltude avatar audreyaltman avatar marktriggs avatar mdellabitta avatar jambun avatar

Stargazers

Jen Young avatar Marcos Sader avatar  avatar Phil Cryer avatar Ryan Johnson avatar Gloria Gonzalez avatar Bo Ferri avatar Kate Lynch avatar Ruth avatar Ekrem Karaca avatar Mark Baggett avatar Ayla avatar Joseph Agreda avatar Skoog avatar Siddhant Saraf avatar Li Song avatar Conal Tuohy avatar dudley street neighborhood initiative avatar Thomas Guignard avatar  avatar Adam Wead avatar Salvatore Vassallo avatar WW Henderson avatar Bill Dueber avatar Chad Nelson avatar Tod Robbins avatar Mark Redar avatar Jesús García Crespo avatar MJ Suhonos avatar

Watchers

Mark Redar avatar  avatar  avatar Adrian Turner avatar James Cloos avatar  avatar tamsin woo avatar  avatar Kenny Whitebloom avatar  avatar Dominic Byrd-McDevitt avatar Amy Slagle avatar  avatar  avatar Gloria Gonzalez avatar  avatar Kiara Contreras avatar Katie Stevens avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.