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

[release] Merge Develop into Master for 3.67.0 #2183

Draft
wants to merge 81 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
4be4812
Update Ruby to version 3.2.6
depfu[bot] Nov 1, 2024
401f5fe
adding a new plate purpose for multiplexed sequencing submissions, to…
sabrine33 Dec 10, 2024
7902931
run prettier
sabrine33 Dec 10, 2024
2dd13f5
Merge branch 'develop' of https://github.com/sanger/limber into Y24-3…
sabrine33 Dec 16, 2024
cb1230e
remove unecessary pipelines for the library plate stock plate purpose
sabrine33 Dec 16, 2024
b8a6778
Merge branch 'develop' of https://github.com/sanger/limber into Y24-3…
sabrine33 Dec 16, 2024
7a88ad6
Bumping release version
dasunpubudumal Dec 17, 2024
9bd1c5d
Merge remote-tracking branch 'origin/master' into 1352-dpl-865-limber…
dasunpubudumal Dec 17, 2024
84fac59
Fixing linting issues
dasunpubudumal Dec 17, 2024
329d73e
Fixing the tests and linting issues
dasunpubudumal Dec 17, 2024
99dccee
Removing the redundant return
dasunpubudumal Dec 17, 2024
43dc23f
Adding docs
dasunpubudumal Dec 17, 2024
7969a0c
Making prettier happy
dasunpubudumal Dec 17, 2024
1b93608
Adding more error handling branches
dasunpubudumal Dec 17, 2024
636feab
Adding more error handling branches
dasunpubudumal Dec 17, 2024
8f88668
[skip ci] Modifying error messages
dasunpubudumal Dec 17, 2024
c6e22af
Adding proper test coverage
dasunpubudumal Dec 17, 2024
c0657de
Adding proper test coverage
dasunpubudumal Dec 17, 2024
3b80962
[skip ci] Adding proper test coverage
dasunpubudumal Dec 17, 2024
ac39939
update pick function to accept unknown well state
sabrine33 Jan 9, 2025
dfa67c7
Merge branch 'develop' of https://github.com/sanger/limber into Y24-3…
sabrine33 Jan 9, 2025
d731c98
move the new purpose to a new separate "multiplexing" pipeline
sabrine33 Jan 13, 2025
e2b80c7
Merge branch 'develop' of https://github.com/sanger/limber into Y24-3…
sabrine33 Jan 13, 2025
a757efb
Update factory_bot to version 6.5.0
depfu[bot] Jan 14, 2025
acef82c
Update webmock to version 3.24.0
depfu[bot] Jan 14, 2025
2845d0d
Update vitest to version 2.1.8
depfu[bot] Jan 14, 2025
cf1240c
Merge remote-tracking branch 'origin/develop' into Y24-307-new-plate-…
sabrine33 Jan 16, 2025
93a3e50
Update eslint-plugin-vue to version 9.32.0
depfu[bot] Jan 16, 2025
ea0f216
Merge remote-tracking branch 'origin/develop' into 1352-dpl-865-limbe…
dasunpubudumal Jan 20, 2025
4ef41ac
Updating the http data to use to_json to be more readable.
dasunpubudumal Jan 20, 2025
4a26c2f
Fixing rubocop issues
dasunpubudumal Jan 20, 2025
24da3f5
Fixing issues with tests
dasunpubudumal Jan 20, 2025
6018158
Prettier fixes
dasunpubudumal Jan 20, 2025
1c13ada
Refactoring error messages
dasunpubudumal Jan 20, 2025
82d94dd
Refactoring error messages
dasunpubudumal Jan 20, 2025
d7f9b7a
Prettier fixes
dasunpubudumal Jan 20, 2025
3a550df
Refactoring pj variable
dasunpubudumal Jan 20, 2025
3c226fb
Changed "Custom Pool Norm" to "Custom Norm" in purposes
SHIV5T3R Jan 20, 2025
31b6bb7
Adding better error names
dasunpubudumal Jan 20, 2025
4c02075
Merge branch 'develop' into Y24-307-new-plate-purpose
yoldas Jan 20, 2025
e4bbf24
Merge branch 'develop' into Y24-307-new-plate-purpose
yoldas Jan 20, 2025
bfebf6a
refactor: make it clearer which node version is used
StephenHulme Jan 21, 2025
5b08666
fix: bump old node version
StephenHulme Jan 21, 2025
3d7f4eb
Adding better error names
dasunpubudumal Jan 21, 2025
e8002a9
Merge remote-tracking branch 'origin/develop' into 1352-dpl-865-limbe…
dasunpubudumal Jan 21, 2025
5b78de3
Modify handling error messages
dasunpubudumal Jan 21, 2025
9d010db
update(has_requests): Add methods to filter and check completion of n…
seenanair Jan 21, 2025
939531e
update(InProgressValidator): Refine validation to check for completed…
seenanair Jan 21, 2025
31f7437
update(viewing_a_plate_spec): Modify warning message for submission r…
seenanair Jan 21, 2025
499bcf4
Modify handling error messages
dasunpubudumal Jan 21, 2025
21f5f8d
Update viewing_a_minimal_plate_spec.rb
seenanair Jan 21, 2025
8030acd
Update vite to version 5.4.14
depfu[bot] Jan 21, 2025
f3eec49
Merge pull request #2043 from sanger/depfu/engine/ruby-3.2.6
andrewsparkes Jan 22, 2025
9e3c70a
Merge pull request #2158 from sanger/depfu/update/factory_bot-6.5.0
andrewsparkes Jan 22, 2025
5430f77
Merge pull request #2182 from sanger/depfu/update/yarn/vite-5.4.14
andrewsparkes Jan 22, 2025
5adfd97
review comment updates
seenanair Jan 22, 2025
050bc86
Merge pull request #2181 from sanger/y24-502-fix-incorrect-warning-ac…
seenanair Jan 22, 2025
3068e27
Merge pull request #2176 from sanger/y24-038-lcmb-print-name
SHIV5T3R Jan 22, 2025
3b551ab
Update Node.js to version 22.13.1
depfu[bot] Jan 23, 2025
10affa3
Merge branch 'develop' into Y24-307-new-plate-purpose
sabrine33 Jan 23, 2025
75685ff
Merge remote-tracking branch 'origin/develop' into 1352-dpl-865-limbe…
dasunpubudumal Jan 27, 2025
568f076
Merge pull request #2180 from sanger/sh51/docker-updates
StephenHulme Jan 28, 2025
a838885
Merge remote-tracking branch 'origin/develop' into 1352-dpl-865-limbe…
dasunpubudumal Jan 29, 2025
763bf39
Merge pull request #2130 from sanger/1352-dpl-865-limber-handle-sprin…
dasunpubudumal Jan 29, 2025
1f7a265
Tweak plate_384 (double sticker) Limber side
yoldas Jan 29, 2025
6a6714f
Tweak plate_96 Limber side
yoldas Jan 29, 2025
d6e6bcc
Merge pull request #2160 from sanger/depfu/update/yarn/vitest-2.1.8
andrewsparkes Jan 29, 2025
184a9b9
Merge pull request #2159 from sanger/depfu/update/webmock-3.24.0
andrewsparkes Jan 29, 2025
3545192
Merge pull request #2165 from sanger/depfu/update/yarn/eslint-plugin-…
andrewsparkes Jan 29, 2025
1ec0bf3
Merge pull request #2185 from sanger/depfu/engine/yarn/nodejs-22.13.1
andrewsparkes Jan 29, 2025
34c0ca4
Update prettier to version 3.4.2
depfu[bot] Jan 29, 2025
480c330
Merge pull request #2193 from sanger/depfu/update/yarn/prettier-3.4.2
andrewsparkes Jan 30, 2025
71a74c0
Move right_text 3mm to the right
yoldas Jan 31, 2025
d04830f
Merge pull request #2191 from sanger/synchronise-limber-and-deploymen…
yoldas Feb 3, 2025
a5301c4
Merge pull request #2120 from sanger/Y24-307-new-plate-purpose
sabrine33 Feb 3, 2025
9597835
add offset message
wendyyang Feb 3, 2025
4f620d5
turn offsetTagsByAsNumber string to int
wendyyang Feb 5, 2025
890a75e
Merge pull request #2201 from sanger/1889-y24-297---change-offset-tag…
wendyyang Feb 6, 2025
a78a11b
Add warning about where to store sprint templates for barcode label p…
yoldas Feb 7, 2025
731041b
Update the warning for Limber
yoldas Feb 7, 2025
0b6827a
Merge pull request #2208 from sanger/y25-067-update
yoldas Feb 10, 2025
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 .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v22.13.0
v22.13.1
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.2.5
3.2.6
7 changes: 5 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
FROM ruby:3.2.5-slim
FROM ruby:3.2.6-slim

# Major version of Node.js to install
ARG nodeVersion=22

ARG bundlerWithout="development test lint"
ARG yarnFlags="--production"
Expand All @@ -13,7 +16,7 @@ RUN apt-get install -y curl
RUN apt-get install -y git

RUN set -uex \
&& NODE_MAJOR=20 \
&& NODE_MAJOR=${nodeVersion} \
&& apt-get update \
&& apt-get install -y ca-certificates curl gnupg \
&& mkdir -p /etc/apt/keyrings \
Expand Down
12 changes: 6 additions & 6 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ GEM
exception_notification (4.5.0)
actionmailer (>= 5.2, < 8)
activesupport (>= 5.2, < 8)
factory_bot (6.4.6)
factory_bot (6.5.0)
activesupport (>= 5.0.0)
faraday (1.10.3)
faraday-em_http (~> 1.0)
Expand Down Expand Up @@ -194,7 +194,7 @@ GEM
temple (>= 0.8.2)
thor
tilt
hashdiff (1.1.0)
hashdiff (1.1.2)
hashie (5.0.0)
i18n (1.14.6)
concurrent-ruby (~> 1.0)
Expand All @@ -210,7 +210,7 @@ GEM
listen (3.9.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
logger (1.6.4)
logger (1.6.5)
loofah (2.24.0)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
Expand Down Expand Up @@ -265,7 +265,7 @@ GEM
psych (5.2.2)
date
stringio
public_suffix (6.0.0)
public_suffix (6.0.1)
puma (6.4.3)
nio4r (~> 2.0)
racc (1.8.1)
Expand Down Expand Up @@ -326,7 +326,7 @@ GEM
regexp_parser (2.9.2)
reline (0.6.0)
io-console (~> 0.5)
rexml (3.3.9)
rexml (3.4.0)
rspec (3.13.0)
rspec-core (~> 3.13.0)
rspec-expectations (~> 3.13.0)
Expand Down Expand Up @@ -428,7 +428,7 @@ GEM
activemodel (>= 6.0.0)
bindex (>= 0.4.0)
railties (>= 6.0.0)
webmock (3.23.1)
webmock (3.24.0)
addressable (>= 2.8.0)
crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0)
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -317,3 +317,9 @@ In addition you can also run `lefthook run fix` to run the auto-fixers on staged
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.

## Miscellaneous

### Sprint Templates for Barcode Label Printing

In order to create new label templates or update the existing ones, use the deployment project. The templates must be defined in the sprint role, in the directory `sprint/files/label_templates` . The local directory `config/sprint/label_templates` is **not** supposed to be used for this purpose.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
:state="offsetTagsByState"
@input="offsetTagChanged"
/>
<b-form-text>
<strong> Tags will start from {{ offsetTagsByAsNumber + 1 }} </strong>
</b-form-text>
</b-form-group>
</template>

Expand Down
2 changes: 1 addition & 1 deletion app/models/labware_creators/pooled_tubes_by_submission.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def all_wells_in_pool_passed?(pool_info)
end

def pick?(location)
well_locations.fetch(location).passed?
!(well_locations.fetch(location).failed? || well_locations.fetch(location).empty?)
end
end
end
96 changes: 70 additions & 26 deletions app/models/print_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -103,32 +103,9 @@ def print_to_sprint

merge_fields_list = label_array * number_of_copies

# assumes all labels use the same label template
SPrintClient.send_print_request(printer_name, label_template, merge_fields_list)

# TODO: DPL-865 [Limber] Handle sprint client response
#
# This print_to_sprint call fails silently if there is an error. Instead
# of returning success, the result of the send_print_request call should
# be used to check the response status and response body. Examples:
#
# The following response body is returned in a 200 response.
# {"errors":[{"message":"Variable 'printRequest' has an invalid value: Expected
# type 'Int' but was
# 'Double'.","locations":[{"line":1,"column":16}],"extensions":{"classification":"
# ValidationError"}}]}
#
# The following response body is returned in a 500 response.
# {"timestamp": "2023-08-02T14:46:30.160+00:00","status": 500,"error": "Internal
# Server Error","path": "/graphql"}
#
# When sprint cannot log in to printer, the details are available in response body.
#
# A successful response has a job id in response body.
#
# Use errors.add to show proper feedback in the view.

true
response = SPrintClient.send_print_request(printer_name, label_template, merge_fields_list)

handle_sprint_response(response)
end

def number_of_copies=(number)
Expand All @@ -155,4 +132,71 @@ def get_label_template_by_service(print_service)
templates_by_service = JSON.parse(label_templates_by_service)
templates_by_service[print_service]
end

# Handles the response from the SPrintClient and checks for success.
# If the response is successful and contains a job ID, it returns true.
# Otherwise, it adds an error message to the errors object and returns false.
#
# The print_to_sprint call fails silently if there is an error. Instead
# of returning success, the result of the send_print_request call should
# be used to check the response status and response body. Examples:
#
# The following response body is returned in a 200 response.
# {"errors":[{"message":"Variable 'printRequest' has an invalid value: Expected
# type 'Int' but was
# 'Double'.","locations":[{"line":1,"column":16}],"extensions":{"classification":"
# ValidationError"}}]}
#
# The following response body is returned in a 500 response.
# {"timestamp": "2023-08-02T14:46:30.160+00:00","status": 500,"error": "Internal
# Server Error","path": "/graphql"}
#
# When sprint cannot log in to printer, the details are available in response body.
#
# A successful response has a job id in response body.
#
# Use errors.add to show proper feedback in the view.
#
# @param response [Net::HTTPResponse] The response object from the SPrintClient.
# @return [Boolean] True if the response is successful and contains a job ID, false otherwise.
def handle_sprint_response(response)
# Non-200 errors are treated as failures
# Ref: https://ruby-doc.org/stdlib-2.7.0/libdoc/net/http/rdoc/Net/HTTP.html#class-Net::HTTP-label-GET+with+Dynamic+Parameters
unless response.is_a?(Net::HTTPSuccess)
case response
when Net::HTTPUnprocessableEntity
errors.add(:sprint, 'Sprint could not understand the request. Please check the label data.')
when Net::HTTPInternalServerError
errors.add(:sprint, 'Internal server error at SPrint. Please try again later.')
else
errors.add(:sprint, 'Trouble connecting to SPrint. Please try again later.')
end
return false
end
if response.body.present? && response.body['jobId'].present?
true
else
errors.add(:sprint, extract_error_message(response))
false
end
end

def extract_error_message(response)
if response.body.present?
begin
response_body = JSON.parse(response.body)
if response_body['errors'].present?
messages =
response_body['errors'].map do |error|
extension = error['extensions'] ? " (#{error['extensions']['classification']})" : ''
"#{error['message']}#{extension}"
end
return messages.join(' - ')
end
rescue JSON::ParserError
return 'Failed to parse JSON response from SprintClient'
end
end
'Unknown error'
end
end
8 changes: 5 additions & 3 deletions app/models/validators/in_progress_validator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ module Validators
# Displays a warning if the requests on the plate have already been completed
class InProgressValidator < ActiveModel::Validator
def validate(presenter)
return true unless presenter.labware.any_complete_requests?
return true unless presenter.labware.any_non_create_asset_requests_completed?

first_request = presenter.labware.active_non_create_asset_requests.first

return true if first_request.nil?
presenter.errors.add(
:submission,
'(active) is not present for this labware. ' \
'Any further work conducted from this plate may run into issues at the end of the pipeline.'
"Requests of type #{first_request.request_type.name} have already been down the pipeline and were completed."
)
end
end
Expand Down
10 changes: 10 additions & 0 deletions app/sequencescape/sequencescape/api/v2/shared/has_requests.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@ def any_complete_requests?
active_requests.any?(&:passed?)
end

def any_non_create_asset_requests_completed?
# Filter out CreateAssetRequests which will be associated for an input plate and completed by the time we get here
# and not relevant to this check
active_non_create_asset_requests.filter_map(&:passed?).any?
end

def active_non_create_asset_requests
active_requests.reject { |r| r.request_type_key == 'create_asset' }
end

def pcr_cycles
active_requests.map(&:pcr_cycles).uniq
end
Expand Down
2 changes: 1 addition & 1 deletion config/pipelines/high_throughput_lcmb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ LCMB: # Top of the pipeline (Library Prep)
LCMB End Prep: LCMB Lib PCR
LCMB Lib PCR: LCMB Lib PCR-XP
LCMB Lib PCR-XP: LCMB Custom Pool
LCMB Custom Pool: LCMB Custom Pool Norm
LCMB Custom Pool: LCMB Custom Norm
8 changes: 8 additions & 0 deletions config/pipelines/multiplexing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Multiplexing:
pipeline_group: Multiplexing
filters:
request_type_key:
- limber_multiplexing
relationships:
Library Stock Plate: LB Lib Pool #These are supplied as ready-made libraries and enter the pipeline at this point.
LB Lib Pool: LB Lib Pool Norm
2 changes: 1 addition & 1 deletion config/purposes/lcmb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ LCMB Custom Pool:
:creator_class: LabwareCreators::CustomPooledTubes
:presenter_class: Presenters::SimpleTubePresenter
:default_printer_type: :tube
LCMB Custom Pool Norm:
LCMB Custom Norm:
:asset_type: tube
:target: MultiplexedLibraryTube
:type: IlluminaHtp::InitialStockTubePurpose
Expand Down
8 changes: 8 additions & 0 deletions config/purposes/library_stock_plate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# A plate provided as ready-made libraries.
# These used to be imported as Stock Plates and then 'fake cherrypicked' onto 'LB Lib PCR XP', which were allowed down the multiplexing pipelines.
# Now, they can be imported and submitted as this more accurate plate purpose.
Library Stock Plate:
:asset_type: plate
:stock_plate: true
:input_plate: true
:presenter_class: Presenters::StockPlatePresenter
10 changes: 5 additions & 5 deletions config/sprint/label_templates/plate_384.yml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
{
"barcodeFields": [
{
"x": 21,
"y": 0,
"x": 17,
"y": 1,
"cellWidth": 0.2,
"barcodeType": "code39",
"value": "<%= merge_fields[:barcode] %>",
Expand All @@ -19,7 +19,7 @@
"fontSize": 1.7
},
{
"x": 50,
"x": 55,
"y": 4,
"value": "<%= merge_fields[:right_text] %>",
"font": 'proportional',
Expand All @@ -37,12 +37,12 @@
"fontSize": 1.7
},
{
"x": 20,
"x": 17,
"y": 3,
"value": "<%= merge_fields[:extra_right_text] %>",
"font": 'proportional',
"fontSize": 1.7
}
]
}
]
]
20 changes: 10 additions & 10 deletions config/sprint/label_templates/plate_96.yml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{
"barcodeFields": [
{
"x": 16,
"x": 17,
"y": 1,
"cellWidth": 0.2,
"barcodeType": "code39",
Expand All @@ -12,33 +12,33 @@
],
"textFields": [
{
"x": 3,
"x": 2,
"y": 3,
"value": "<%= merge_fields[:top_left] %>",
"font": 'proportional',
"fontSize": 1.7
"fontSize": 2
},
{
"x": 3,
"x": 2,
"y": 6,
"value": "<%= merge_fields[:bottom_left] %>",
"font": 'proportional',
"fontSize": 1.7
"fontSize": 2
},
{
"x": 57,
"x": 58,
"y": 3,
"value": "<%= merge_fields[:top_right] %>",
"font": 'proportional',
"fontSize": 1.7
"fontSize": 2
},
{
"x": 57,
"x": 58,
"y": 6,
"value": "<%= merge_fields[:bottom_right] %>",
"font": 'proportional',
"fontSize": 1.7
"fontSize": 2
}
]
}
]
]
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,19 @@
"eslint": "^8.0.0",
"eslint-config-prettier": "^8.10.0",
"eslint-plugin-vitest": "^0.5.4",
"eslint-plugin-vue": "^9.30.0",
"eslint-plugin-vue": "^9.32.0",
"jsdom": "^24.1.2",
"postcss": "^8.4.49",
"postcss-flexbugs-fixes": "^5.0.2",
"postcss-import": "16.1.0",
"postcss-nested": "^6.0.1",
"postcss-preset-env": "^9.6.0",
"prettier": "^3.0.0",
"prettier": "^3.4.2",
"sass": "^1.77.8",
"typescript": "^4.6.3",
"vite": "^5.4.11",
"vite": "^5.4.14",
"vite-plugin-ruby": "^5.1.1",
"vitest": "^2.1.4",
"vitest": "^2.1.8",
"vue-template-compiler": "^2.7.0"
},
"_comment": "Required to address https://github.com/npm/cli/issues/4828",
Expand Down
Loading
Loading