Skip to content

Commit

Permalink
Merge pull request #36 from sanger/next_release
Browse files Browse the repository at this point in the history
New column 'destination' and travis tests configuration
  • Loading branch information
James Glover committed Feb 25, 2016
2 parents 634cd99 + 18dead1 commit 675e6b0
Show file tree
Hide file tree
Showing 11 changed files with 37 additions and 6 deletions.
1 change: 1 addition & 0 deletions .ruby-gemset
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
unified-warehouse
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ruby-2.1.3
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
language: ruby
# We don't specify a list of ruby versions, as Travis will fall back to .ruby-version
# This is the behaviour we want, so no sense in overriding it
bundler_args: --without deployment
sudo: false
cache: bundler
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ group :development do
end

group :deployment do
gem "psd_logger", :git => "git+ssh://[email protected]/sanger/psd_logger.git"
gem "psd_logger", :github => "sanger/psd_logger"
end
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
GIT
remote: git+ssh://git@github.com/sanger/psd_logger.git
remote: git://github.com/sanger/psd_logger.git
revision: dd2d634114df75b1d8535715c169a7fc99521389
specs:
psd_logger (0.1.6)
Expand Down
9 changes: 9 additions & 0 deletions README
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
Unified Warehouse Builder
-------------------------
This application is a denormalised warehouse for multiple LIMS.

To Begin (Development)
----------------------
1. Clone the git repository
2. Ensure ruby-2.1.3 is installed
3. Install the relevant gems through bundler:
- bundle install
4. Ensure the test suite is running:
- rake
2 changes: 2 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@
require File.expand_path('../config/application', __FILE__)

UnifiedWarehouse::Application.load_tasks

task :spec => 'db:setup'
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
class AddDataDestinationToStudiesTable < ActiveRecord::Migration
def change
change_table :study do |t|
t.string 'data_destination', comment: 'The data destination type(s) for the study. It could be \'standard\', \'14mg\' or \'gseq\'. This may be extended, if Sanger gains more external customers. It can contain multiply destinations separated by a space.'
end
end
end
9 changes: 6 additions & 3 deletions db/structure.sql
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
-- MySQL dump 10.13 Distrib 5.6.20, for osx10.9 (x86_64)
-- MySQL dump 10.13 Distrib 5.5.21, for osx10.6 (i386)
--
-- Host: localhost Database: unified_warehouse_development
-- ------------------------------------------------------
-- Server version 5.6.20
-- Server version 5.5.21

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
Expand Down Expand Up @@ -247,6 +247,7 @@ CREATE TABLE `study` (
`data_access_group` varchar(255) DEFAULT NULL,
`prelim_id` varchar(20) DEFAULT NULL COMMENT 'The preliminary study id prior to entry into the LIMS',
`hmdmc_number` varchar(255) DEFAULT NULL COMMENT 'The Human Materials and Data Management Committee approval number(s) for the study.',
`data_destination` varchar(255) DEFAULT NULL COMMENT 'The data destination type(s) for the study. It could be ''standard'', ''14mg'' or ''gseq''. This may be extended, if Sanger gains more external customers. It can contain multiply destinations separated by a space.',
PRIMARY KEY (`id_study_tmp`),
UNIQUE KEY `study_id_lims_id_study_lims_index` (`id_lims`,`id_study_lims`),
UNIQUE KEY `study_uuid_study_lims_index` (`uuid_study_lims`),
Expand Down Expand Up @@ -285,7 +286,7 @@ CREATE TABLE `study_users` (
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2015-11-27 9:51:34
-- Dump completed on 2016-01-20 17:12:58
INSERT INTO schema_migrations (version) VALUES ('20141113110635');

INSERT INTO schema_migrations (version) VALUES ('20141113130813');
Expand Down Expand Up @@ -326,3 +327,5 @@ INSERT INTO schema_migrations (version) VALUES ('20151110102754');

INSERT INTO schema_migrations (version) VALUES ('20151127094701');

INSERT INTO schema_migrations (version) VALUES ('20160120155501');

3 changes: 2 additions & 1 deletion spec/models/study_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@
"alignments_in_bam" => true,
"prelim_id" => "A1234",
# The field may contain multiple numbers, and sometimes has comments.
"hmdmc_number" => "H12345; H67890; And then a comment"
"hmdmc_number" => "H12345; H67890; And then a comment",
"data_destination" => "standard"
}
end

Expand Down
1 change: 1 addition & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
config.include FactoryGirl::Syntax::Methods

config.before(:suite) do
ActiveRecord::Migration.maintain_test_schema!
FactoryGirl.lint
end

Expand Down

0 comments on commit 675e6b0

Please sign in to comment.