Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/sanger/sequencescape int…
Browse files Browse the repository at this point in the history
…o depfu/update/group/rails-7.0.8.1
  • Loading branch information
BenTopping committed Nov 21, 2024
2 parents cc16f72 + 168de56 commit 8f7054f
Show file tree
Hide file tree
Showing 23 changed files with 76 additions and 40 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/append_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
build-and-append-to-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Set up Ruby
uses: ruby/setup-ruby@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/automated_docker_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
name: Automated release fo Docker image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: nelonoel/[email protected]

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/automated_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
build-and-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: nelonoel/[email protected]

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check_docker_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
name: Check docker image building process
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Build image
run: >-
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/generate_pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Ruby
uses: ruby/setup-ruby@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/js_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint_yard_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
env:
BUNDLE_WITHOUT: "cucumber deployment profile development default test"
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ruby_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
MYSQL_ROOT_PASSWORD: "" # Set root PW to nothing
MYSQL_ALLOW_EMPTY_PASSWORD: yes
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
Expand Down Expand Up @@ -90,7 +90,7 @@ jobs:
ci_node_total: [3]
ci_node_index: [0, 1, 2]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
Expand Down Expand Up @@ -168,7 +168,7 @@ jobs:
ci_node_total: [2]
ci_node_index: [0, 1]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion .release-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14.48.0
14.49.0
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ a organisation of 900 people.
- [Adjusting config](#adjusting-config)
- [Default setup](#default-setup)
- [Starting rails](#starting-rails)
- [Vite](#vite)
- [Delayed job](#delayed-job)
- [Message broker](#message-broker)
- [Testing](#testing)
Expand All @@ -57,6 +58,7 @@ a organisation of 900 people.
- [NPG - Illumina tracking software](#npg---illumina-tracking-software)
- [Troubleshooting](#troubleshooting)
- [MySQL errors when installing](#mysql-errors-when-installing)
- [MySQL errors after system updates](#mysql-errors-after-system-updates)
- [Installing on Apple Silicon (M1)](#installing-on-apple-silicon-m1)
- [API V2 Authentication](#api-v2-authentication)
- [Publishing AMQP Messages](#publishing-amqp-messages)
Expand Down Expand Up @@ -420,6 +422,14 @@ gem install mysql2 -v '0.5.6' -- \
--with-mysql-include=/opt/homebrew/Cellar/mysql/9.0.1_1/include
```

#### MySQL errors after system updates

If you encounter a LoadError at dlopen call to mysql2 bundle because of a missing dynamic library, try the following command to update the cached gem.

```
gem pristine mysql2
```

#### Installing on Apple Silicon (M1)

If installation issues are encountered with Docker on M1 processors, try the fixes below:
Expand Down
12 changes: 12 additions & 0 deletions app/controllers/api/v2/submission_pools_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# frozen_string_literal: true

module Api
module V2
# Provides a JSON API controller for submission templates.
# See: http://jsonapi-resources.com/ for JSONAPI::Resource documentation.
class SubmissionPoolsController < JSONAPI::ResourceController
# By default JSONAPI::ResourceController provides most of the standard
# behaviour, and in many cases this file may be left empty.
end
end
end
1 change: 1 addition & 0 deletions app/resources/api/v2/plate_resource.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class PlateResource < BaseResource

# Associations:
has_many :wells, readonly: true
has_many :submission_pools, readonly: true

# Attributes
attribute :number_of_rows, readonly: true, delegate: :height
Expand Down
11 changes: 11 additions & 0 deletions app/resources/api/v2/submission_pool_resource.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# frozen_string_literal: true

module Api
module V2
class SubmissionPoolResource < BaseResource
attribute :plates_in_submission, readonly: true
attribute :used_tag2_layout_templates, readonly: true
attribute :used_tag_layout_templates, readonly: true
end
end
end
10 changes: 5 additions & 5 deletions app/views/workflows/_cherrypicking_volume_parameters.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<strong>Either</strong>
<table cellspacing='0' cellpadding='0'>
<tr>
<td><label for="cherrypick_action_nano_grams_per_micro_litre">Pick by ng/&micro;l</label>:</td>
<td><label for="cherrypick_action_nano_grams_per_micro_litre">Pick by concentration (ng/&micro;l)</label>:</td>
<td><%= radio_button("cherrypick", "action", "nano_grams_per_micro_litre", checked: true) %></td>
</tr>
<%= fields_for :nano_grams_per_micro_litre do |ff|%>
Expand All @@ -18,7 +18,7 @@
</tr>
<tr>
<td><%= ff.label 'robot_minimum_picking_volume', 'Robot Minimum Picking Volume' %> (&micro;l):</td>
<td><%= ff.text_field 'robot_minimum_picking_volume', value: 1.0, size: 5, type: 'number', step: 0.1, min: 1, max: 9 %></td>
<td><%= ff.text_field 'robot_minimum_picking_volume', value: 5.0, size: 5, type: 'number', step: 0.1, min: 1, max: 9 %></td>
</tr>
<% end %>
</table>
Expand All @@ -30,7 +30,7 @@
<strong>Or</strong>
<table cellspacing='0' cellpadding='0'>
<tr>
<td><label for="cherrypick_action_nano_grams">Pick by ng</label>:</td>
<td><label for="cherrypick_action_nano_grams">Pick by amount (ng)</label></td>
<td><%= radio_button("cherrypick", "action", "nano_grams") %></td>
</tr>
<%= fields_for :nano_grams do |ff|%>
Expand All @@ -48,7 +48,7 @@
</tr>
<tr>
<td><%= ff.label 'robot_minimum_picking_volume', 'Robot Minimum Picking Volume' %> (&micro;l):</td>
<td><%= ff.text_field 'robot_minimum_picking_volume', value: 1.0, size: 5, type: 'number', step: 0.1, min: 1, max: 9 %></td>
<td><%= ff.text_field 'robot_minimum_picking_volume', value: 5.0, size: 5, type: 'number', step: 0.1, min: 1, max: 9 %></td>
</tr>
<% end %>
</table>
Expand All @@ -60,7 +60,7 @@
<strong>Or</strong>
<table cellspacing='0' cellpadding='0'>
<tr>
<td><label for="cherrypick_action_micro_litre">Pick by &micro;l</label>:</td>
<td><label for="cherrypick_action_micro_litre">Pick by volume (&micro;l)</label>:</td>
<td><%= radio_button("cherrypick", "action", "micro_litre") %></td>
</tr>
<%= fields_for :micro_litre do |ff|%>
Expand Down
7 changes: 3 additions & 4 deletions app/views/workflows/_plate_template_batches.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,9 @@
<%= select_tag "robot_id", options_for_select(@robots.collect {|p| [ p.name, p.id ] }), class: 'select2' %>
</fieldset>
<% end %>
<%= panel(:info,title:"Step 3: Set volumes and concentrations") do %>
<%= render partial: 'cherrypicking_volume_parameters' %>
<% end %>
<%= panel(:info, title: "Step 3: Set volumes and concentrations <a href='https://ssg-confluence.internal.sanger.ac.uk/x/NoHdDQ'><small>Information about cherrypicking options</small></a>".html_safe) do %>
<%= render partial: 'cherrypicking_volume_parameters' %>
<% end %>
<%= render partial: "next_stage_submit" %>
<% end %>
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
# Most are defined in the Limber config, but the below also need to be defined in Sequencescape.
# They are in a separate file so it can be 'feature flagged off' until needed.
---
# The 'LRC PBMC Pools Input' purpose is included here so that it's available for
# The 'LRC GEM-X 5p GEMs Input' purpose is included here so that it's available for
# sample manifests, and also because it is an acceptable purpose for the scRNA Core cDNA Prep Input
# submission template.
LRC PBMC Pools Input:
LRC GEM-X 5p GEMs Input:
input_plate: true
stock_plate: true
cherrypickable_target: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ limber_scrna_core_cdna_prep_gem_x_5p:
- LRC Bank Seq
- LRC Bank Spare
- LRC Bank Input
limber_scrna_core_cdna_prep_gem_x_5p_pbmc_pools_input:
name: scRNA Core cDNA Prep GEM-X 5p PBMC Pools Input
limber_scrna_core_cdna_prep_gem_x_5p_gems_input:
name: scRNA Core cDNA Prep GEM-X 5p GEMs Input
asset_type: Well
order: 1
request_class_name: CustomerRequest
for_multiplexing: false
billable: true
product_line_name: Short Read
acceptable_purposes:
- LRC PBMC Pools Input
- LRC GEM-X 5p GEMs Input
limber_scrna_core_aggregation:
name: scRNA Core Aggregation
asset_type: Well
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ Limber-Htp - scRNA Core cDNA Prep GEM-X 5p:
request_type_keys: ["limber_scrna_core_cdna_prep_gem_x_5p"]
product_line_name: Short Read
product_catalogue_name: scRNA Core
Limber-Htp - scRNA Core cDNA Prep GEM-X 5p PBMC Pools Input:
Limber-Htp - scRNA Core cDNA Prep GEM-X 5p GEMs Input:
submission_class_name: "LinearSubmission"
related_records:
request_type_keys: ["limber_scrna_core_cdna_prep_gem_x_5p_pbmc_pools_input"]
request_type_keys: ["limber_scrna_core_cdna_prep_gem_x_5p_gems_input"]
product_line_name: Short Read
product_catalogue_name: scRNA Core
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Submission templates for LCM Triomics WGS and EMSeq
---
# LCM Triomics EMSeq submission template
Limber-Htp - LCM Triomics EMSeq:
Limber-Htp - LCM Triomics:
submission_class_name: "LinearSubmission"
related_records:
request_type_keys: ["limber_lcm_triomics_emseq"]
Expand Down
7 changes: 5 additions & 2 deletions config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,12 @@
# In the development environment your application's code is reloaded on
# every request. This slows down response time but is perfect for development
# since you don't have to restart the web server when you make code changes.
config.cache_classes = ENV.fetch('CACHE_CLASSES', 'true') == 'true'
config.cache_classes = ENV.fetch('CACHE_CLASSES', 'false') == 'true'

# Do not eager load code on boot.
# Eager load code on boot. This eager loads most of Rails and
# your application in memory, allowing both threaded web servers
# and those relying on copy on write to perform better.
# Rake tasks automatically ignore this option for performance.
config.eager_load = true

# Show full error reports.
Expand Down
14 changes: 7 additions & 7 deletions spec/features/pipelines/cherrypick/cherrypick_pipeline_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def initialize_plates(plates)

describe 'where picking by ng/µl for a tecan robot' do
let(:concentrations_required) { true }
let(:layout_volume_option) { 'Pick by ng/µl' }
let(:layout_volume_option) { 'Pick by concentration (ng/µl)' }
let(:custom_destination_type) { create(:plate_type, name: 'Custom Type') }
let(:expected_plates_by_destination_plate) do
{ destination_plate_human_barcode => { 1 => { sources: [plates[0], plates[1], plates[2]] } } }
Expand Down Expand Up @@ -276,7 +276,7 @@ def initialize_plates(plates)

describe 'where picking by ng for a tecan robot' do
let(:concentrations_required) { true }
let(:layout_volume_option) { 'Pick by ng' }
let(:layout_volume_option) { 'Pick by amount (ng)' }
let(:plate_type) { create(:plate_type, name: 'ABgene_0800', maximum_volume: 800) }
let(:expected_plates_by_destination_plate) do
{ destination_plate_human_barcode => { 1 => { sources: [plates[0], plates[1], plates[2]] } } }
Expand Down Expand Up @@ -321,7 +321,7 @@ def initialize_plates(plates)
end

describe 'where the number of plates does not exceed the max beds for the robot' do
let(:layout_volume_option) { 'Pick by µl' }
let(:layout_volume_option) { 'Pick by volume (µl)' }
let(:expected_plates_by_destination_plate) do
{ destination_plate_human_barcode => { 1 => { sources: [plates[0], plates[1], plates[2]] } } }
end
Expand All @@ -330,7 +330,7 @@ def initialize_plates(plates)
end

describe 'where the number of plates exceeds the max beds for the robot' do
let(:layout_volume_option) { 'Pick by µl' }
let(:layout_volume_option) { 'Pick by volume (µl)' }
let(:max_plates) { 2 }
let(:expected_plates_by_destination_plate) do
{ destination_plate_human_barcode => { 1 => { sources: [plates[0], plates[1]] }, 2 => { sources: [plates[2]] } } }
Expand All @@ -340,7 +340,7 @@ def initialize_plates(plates)
end

describe 'where there are multiple destination plates and the number of plates exceeds the max beds for the robot' do
let(:layout_volume_option) { 'Pick by µl' }
let(:layout_volume_option) { 'Pick by volume (µl)' }
let(:max_plates) { 2 }
let(:full_plate) { create(:plate_with_untagged_wells_and_custom_name, sample_count: 96) }
let(:additional_plates) { create_list(:plate_with_untagged_wells_and_custom_name, 3, sample_count: 2) }
Expand Down Expand Up @@ -375,7 +375,7 @@ def initialize_plates(plates)
let(:max_plates) { 25 }
let(:robot) { create(:hamilton, barcode: '444', max_plates_value: max_plates) }
let(:concentrations_required) { true }
let(:layout_volume_option) { 'Pick by ng/µl' }
let(:layout_volume_option) { 'Pick by concentration (ng/µl)' }
let(:custom_destination_type) { create(:plate_type, name: 'Custom Type') }
let(:expected_plates_by_destination_plate) do
{ destination_plate_human_barcode => { 1 => { sources: [plates[0], plates[1]], control: control_plate } } }
Expand Down Expand Up @@ -413,7 +413,7 @@ def initialize_plates(plates)
let(:max_plates) { 25 }
let(:robot) { create(:hamilton, barcode: '444', max_plates_value: max_plates) }
let(:concentrations_required) { true }
let(:layout_volume_option) { 'Pick by ng/µl' }
let(:layout_volume_option) { 'Pick by concentration (ng/µl)' }
let(:custom_destination_type) { create(:plate_type, name: 'Custom Type') }
let(:expected_plates_by_destination_plate) do
{
Expand Down
6 changes: 3 additions & 3 deletions spec/features/shared_examples/cherrypicking.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@
choose(layout_volume_option)

case layout_volume_option
when 'Pick by µl'
when 'Pick by volume (µl)'
fill_in('micro_litre_volume_required', with: '13')
when 'Pick by ng/µl'
when 'Pick by concentration (ng/µl)'
fill_in('Volume Required', with: '65')
within('#pick_by_nano_grams_per_micro_litre') { fill_in('Robot Minimum Picking Volume', with: '1.0') }
when 'Pick by ng'
when 'Pick by amount (ng)'
within('#pick_by_nano_grams') do
fill_in('Robot Minimum Picking Volume', with: '2.0')
fill_in('Quantity to pick', with: 10_000)
Expand Down

0 comments on commit 8f7054f

Please sign in to comment.