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.
- Sequencescape is required to authenticate against
- If you are working on a Macintosh:
- Install Homebrew
- Install
shared-mime-info
withbrew install shared-mime-info
. This is needed by one of the required Gems in this project.
- Install the required version of ruby - look for the version in the
.ruby-version
file - Install bundler:
gem install bundler
- Install the required gems:
bundle install
- Migrate/setup the database:
bundle exec rake db:setup
- Configure the settings for the environment of interest in:
config/settings
- Run the server:
bundle exec rails server
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>
Rubocop is used for linting.
bundle exec rubocop
Prettier is used for formatting.
bundle exec rbprettier --check . --ignore-unknown
You might get the following error when hitting 'Submit' on the process_plates/new
page:
Sequencescape::Api::ResourceNotFound Exception: ["UUID does not exist"]
Follow these steps:
- note what UUID is listed for
search_find_assets_by_barcode
indevelopment.yml
- look in your local Sequencescape database
- table
searches
should have a row calledFind assets by barcode
- table
uuids
should have a row pointing to the search record, with the UUID fromdevelopment.yml
, andresource_type = 'Search'
- In future, we should create this automatically in a rake task, like Limber does