Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Master merge from develop #653

Merged
merged 18 commits into from
Jul 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.18.1
1.19.0
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.1.2
3.3.4
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ruby:3.1.2
FROM ruby:3.3.4

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please confirm that the version is available from Docker Hub?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it is available

RUN gem install bundler

Expand Down
4 changes: 3 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ gem 'bundler', '>= 1.3.0'
gem 'railties', '~> 7.0.4'
# # RAILS DEPENDENCIES

gem 'sanger_warren'
gem 'bunny', '>= 2.22.0'
gem 'rbtree', '~> 0.4.5'
gem 'sanger_warren', '~> 0.4.1'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a repo for sanger_warren ? Where does this come from ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sanger_warren is available in RubyGems 😄


gem 'bootsnap', '~> 1.7', '>= 1.7.3', require: false
gem 'hashie', '~> 5.0'
Expand Down
20 changes: 11 additions & 9 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ GEM
bootsnap (1.18.3)
msgpack (~> 1.2)
builder (3.3.0)
bunny (2.19.0)
bunny (2.23.0)
amq-protocol (~> 2.3, >= 2.3.1)
sorted_set (~> 1, >= 1.0.2)
coderay (1.1.3)
Expand Down Expand Up @@ -96,7 +96,7 @@ GEM
nenv (~> 0.1)
shellany (~> 0.0)
parallel (1.25.1)
parser (3.3.3.0)
parser (3.3.4.0)
ast (~> 2.4.1)
racc
pry (0.14.2)
Expand Down Expand Up @@ -125,9 +125,9 @@ GEM
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
rbtree (0.4.4)
rbtree (0.4.6)
regexp_parser (2.9.2)
rexml (3.3.1)
rexml (3.3.2)
strscan
rspec (3.13.0)
rspec-core (~> 3.13.0)
Expand All @@ -150,13 +150,13 @@ GEM
rspec-mocks (~> 3.13)
rspec-support (~> 3.13)
rspec-support (3.13.1)
rubocop (1.64.1)
rubocop (1.65.0)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
regexp_parser (>= 2.4, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.31.1, < 2.0)
ruby-progressbar (~> 1.7)
Expand All @@ -171,15 +171,15 @@ GEM
rack (>= 1.1)
rubocop (>= 1.33.0, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
rubocop-rspec (3.0.1)
rubocop-rspec (3.0.3)
rubocop (~> 1.61)
ruby-progressbar (1.13.0)
sanger_warren (0.4.1)
bunny (~> 2.17)
connection_pool (~> 2.2)
multi_json (~> 1.0)
thor (~> 1.1)
set (1.0.2)
set (1.1.0)
shellany (0.0.1)
simplecov (0.22.0)
docile (~> 1.1)
Expand All @@ -206,6 +206,7 @@ DEPENDENCIES
activesupport (~> 7.0.4)
bootsnap (~> 1.7, >= 1.7.3)
bundler (>= 1.3.0)
bunny (>= 2.22.0)
factory_bot_rails
guard
guard-bundler
Expand All @@ -214,12 +215,13 @@ DEPENDENCIES
mysql2 (~> 0.5.3)
pry
railties (~> 7.0.4)
rbtree (~> 0.4.5)
rspec-rails
rubocop
rubocop-performance
rubocop-rails
rubocop-rspec
sanger_warren
sanger_warren (~> 0.4.1)
simplecov
views_schema!

Expand Down
14 changes: 6 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,13 @@ A denormalised warehouse for multiple LIMS.
### Installation

1. Clone the git repository
2. Install the relevant ruby from `.ruby-version`
2. Install the relevant ruby from `.ruby-version`
Rbenv will read .ruby-version automatically
`rbenv install`

Rbenv will read .ruby-version automatically

rbenv install

3. Run the setup process:

bin/setup
3. Run the setup process:
3.1. Set up your MySQL root password inside the file config/database.yml
3.2. Run `bin/setup `

**NB**: If getting an error while installing the `mysql2` gem, try:

Expand Down
4 changes: 2 additions & 2 deletions app/models/aliquot.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ class Aliquot < ApplicationRecord
include SingularResourceTools

def self.base_resource_key
'lims_uuid'
'aliquot_uuid'
end

json do
translate(
uuid: :lims_uuid
uuid: :aliquot_uuid
)

ignore :created
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
class RenameLimsUuidColumToAliquotUuIdInAliquotTable < ActiveRecord::Migration[7.0]
def up
rename_column :aliquot, :lims_uuid, :aliquot_uuid
end

def down
rename_column :aliquot, :aliquot_uuid, :lims_uuid
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class AddContaminatedHumanDataToStudy < ActiveRecord::Migration[7.0]
def change
add_column :study, :contaminated_human_data_access_group, :string, default: nil
end
end
5 changes: 3 additions & 2 deletions db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema[7.0].define(version: 2024_07_08_081135) do
ActiveRecord::Schema[7.0].define(version: 2024_07_26_144332) do
create_table "aliquot", charset: "utf8mb3", collation: "utf8mb3_unicode_ci", force: :cascade do |t|
t.string "id_lims", null: false, comment: "The LIMS system that the aliquot was created in"
t.string "lims_uuid", null: false, comment: "The UUID of the aliquot in the LIMS system"
t.string "aliquot_uuid", null: false, comment: "The UUID of the aliquot in the LIMS system"
t.string "aliquot_type", null: false, comment: "The type of the aliquot"
t.string "source_type", null: false, comment: "The type of the source of the aliquot"
t.string "source_barcode", null: false, comment: "The barcode of the source of the aliquot"
Expand Down Expand Up @@ -459,6 +459,7 @@
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."
t.string "s3_email_list"
t.string "data_deletion_period"
t.string "contaminated_human_data_access_group"
t.index ["accession_number"], name: "study_accession_number_index"
t.index ["id_lims", "id_study_lims"], name: "study_id_lims_id_study_lims_index", unique: true
t.index ["name"], name: "study_name_index"
Expand Down
2 changes: 1 addition & 1 deletion spec/factories.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
factory :aliquot do
sequence(:id) { |n| n }
id_lims { 'example' }
lims_uuid { '000000-0000-0000-0000-0000000002' }
aliquot_uuid { '000000-0000-0000-0000-0000000002' }
aliquot_type { 'derivative' }
source_type { 'library' }
source_barcode { 'PR-rna-00000001_H12' }
Expand Down
2 changes: 1 addition & 1 deletion spec/models/aliquot_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
'volume' => 5.43,
'concentration' => 2.34,
'insert_size' => 100,
'lims_uuid' => '000000-0000-0000-0000-0000000002',
'aliquot_uuid' => '000000-0000-0000-0000-0000000002',
'source_type' => 'library',
'source_barcode' => 'PR-rna-00000001_H12',
'sample_name' => 'aliquot-sample',
Expand Down
3 changes: 2 additions & 1 deletion spec/models/study_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@
'hmdmc_number' => 'H12345; H67890; And then a comment',
'data_destination' => 'standard',
's3_email_list' => '[email protected];[email protected]',
'data_deletion_period' => '3 months'
'data_deletion_period' => '3 months',
'contaminated_human_data_access_group' => 'contaminated human data'
}
end

Expand Down
Loading