Skip to content

Add audits to assets in sequencescape

License

Notifications You must be signed in to change notification settings

sanger/asset_audits

Repository files navigation

Asset Audits

This application allows you to add audits to assets. It is intended to be used in the lab to track who did what, when they did it, what they did it to and what lab instrument they used. It requires Sequencescape.

Requirements

Running applications

Getting started

  1. If you are working on a Macintosh:
    1. Install Homebrew
    2. Install shared-mime-info with brew install shared-mime-info. This is needed by one of the required Gems in this project.
  2. Install the required version of ruby - look for the version in the .ruby-version file
  3. Install bundler: gem install bundler
  4. Install the required gems: bundle install
  5. Migrate/setup the database: bundle exec rake db:setup
  6. Configure the settings for the environment of interest in: config/settings
  7. Run the server: bundle exec rails server

Testing

To run the tests, execute the following commands:

RAILS_ENV=test bundle exec rake db:create db:schema:load
bundle exec rake db:test:prepare
export CUCUMBER_FORMAT=progress

bundle exec rake

To run a single test:

bundle exec rake test TEST=<test_file_path>

Linting and formatting

Rubocop is used for linting.

bundle exec rubocop

Prettier is used for formatting.

bundle exec rbprettier --check . --ignore-unknown