Limber Pipeline Application
A flexible front end to plate bases pipelines in Sequencescape
In Limber, connect to Sequencescape to configure required data:
bundle exec rake config:generate
In Sequencescape, configure all Limber required data:
bundle exec rake limber:setup
Start Sequencescape (will start in 3000):
bundle exec rails s
Start the delayed job processor
bundle exec rake jobs:work
In Limber, start Limber (will start in 3001):
bundle exec rails s
In addition to the externally hosted YARD docs, you can also run a local server:
yard server -r --gems -m limber
Ruby unit and feature tests:
bundle exec rspec
yarn karma start --single-run
If you get '[Webpacker] Compilation Failed' when trying to run specs, you might need to get yarn to install its dependencies properly. One way of doing this is by precompiling the assets:
yarn rake assets:precompile
This has the added benefit that it reduces the risk of timeouts when the tests are running, as assets will not get compiled on the fly.
There are a few tools available to assist with writing specs:
Strategies: You can use json
:factory_nameto generate the json that the API is expected to receive. This is very useful for mocking web responses. The association strategy is used for building nested json, it will usually only be used as part of other factories.
api_object: Ensures that lots of the shared behaviour, like actions and uuids are generated automatically barcoded: Automatically ensures that barcode is populated with the correct hash, and calculates human and machine barcodes
build: Returns an actual object, as though already found via the api. Useful for unit tests
with_belongs_to_associationscan be used in factories to set up the relevant json. They won't actually mock up the relevant requests, but ensure that things like actions are defined so that the api knows where to find them.
Request stubs are provided by webmock. Two helper methods will assist with the majority of mocking requests to the api,
spec/support/api_url_helper.rb for details.
Note: Due to the way the api functions, the factories don't yet support nested associations.
Lefthook is a git-hook manager that will ensure staged files are linted before committing.
You can install it either via homebrew
brew install Arkweid/lefthook/lefthook or rubygems
gem install lefthook
You'll then need to initialize it for each repository you wish to track
Hooks will run automatically on commit, but you can test them with:
lefthook run pre-commit
In addition you can also run
lefthook run fix to run the auto-fixers on staged files only.
Note that after doing this you will still need to stage the fixes before committing. I'd love to be
able to automate this, but haven't discovered a solution that maintains the ability to partially
stage a file, and doesn't involve running the linters directly on files in the .git folder.