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

[automated] Merge Develop into Master #1990

Draft
wants to merge 58 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
0441d49
Add model for new bait_library_layouts endpoint on Sequencescape
sdjmchattie Sep 5, 2024
d83859b
Use SS API v2 endpoint for BaitLibraryLayout preview and creation
sdjmchattie Sep 5, 2024
fc92a1e
Update the way the preview method is called
sdjmchattie Sep 5, 2024
044a8bd
Fix tests for BaitLibraryLayout operations
sdjmchattie Sep 5, 2024
3394649
Add pry short aliases for debugging
sdjmchattie Sep 6, 2024
e9baf7d
Use API v2 to create TagLayout during CustomTaggedPlate labware creator
sdjmchattie Sep 6, 2024
02abf32
Merge branch 'develop-Y24-190' into Y24-190-3-use-api-v2-tag-layout
sdjmchattie Sep 6, 2024
bc053a4
Update tests to match expectations from creating TagLayouts
sdjmchattie Sep 10, 2024
4bad88c
Update Javascript tests
sdjmchattie Sep 10, 2024
5ebd246
Switch SpecificTubeCreation requests to go through API v2
sdjmchattie Sep 13, 2024
1860cce
Fix tests for pooling multiple plates into one tube
sdjmchattie Sep 16, 2024
1d5fc5f
Fix test for pooled tubes from whole plates
sdjmchattie Sep 16, 2024
a4a3808
Fix tests for plate_split_to_tube_racks
sdjmchattie Sep 17, 2024
9ebf082
Remove unneeded fixtures for child tubes
sdjmchattie Sep 17, 2024
cd8c643
Remove accidental assignment to unused variable
sdjmchattie Sep 17, 2024
9f10f6a
Fix tests for pooled tubes by submission
sdjmchattie Sep 17, 2024
8ca6cc8
Fix tests for custom_pooled_tubes
sdjmchattie Sep 17, 2024
e73ea44
Merge branch 'develop-Y24-190' into Y24-190-3-use-specific-tube-creat…
sdjmchattie Sep 17, 2024
3d096e4
Change parents relationship to Labware instead of Asset
sdjmchattie Sep 17, 2024
457ecc0
Merge pull request #1897 from sanger/Y24-190-3-use-bait-library-layou…
sdjmchattie Sep 19, 2024
9d6a22f
Merge pull request #1901 from sanger/Y24-190-3-use-api-v2-tag-layout
sdjmchattie Sep 19, 2024
4a89925
Merge pull request #1916 from sanger/Y24-190-3-use-specific-tube-crea…
sdjmchattie Sep 19, 2024
902b97c
Merge branch 'develop' into develop-Y24-190
sdjmchattie Sep 19, 2024
5829cd1
Add Limber model for PooledPlateCreation API v2 endpoint
sdjmchattie Sep 19, 2024
f90e447
Migrate usage of PooledPlateCreation from API v1 to v2
sdjmchattie Sep 19, 2024
196a5a4
Fix unit tests for new endpoint usage
sdjmchattie Sep 20, 2024
27d76f1
Apply Prettier
sdjmchattie Sep 20, 2024
263d494
Use provided UUID for child plate purpose
sdjmchattie Sep 23, 2024
85f4a5c
Merge pull request #1944 from sanger/Y24-190-3-use-SS-v2-API-pooled-p…
sdjmchattie Sep 23, 2024
ced0d9c
Merge branch 'develop' into develop-Y24-190
sdjmchattie Sep 23, 2024
60a6e75
Use correct attributes on specific_tube_creations endpoint
sdjmchattie Sep 23, 2024
52db8e1
Remove unneeded API v1 stub for specific_tube_creations
sdjmchattie Sep 23, 2024
affdeba
Merge pull request #1952 from sanger/Y24-190-3-fix-specific-tube-crea…
sdjmchattie Sep 23, 2024
59a5963
Update vite_ruby to version 3.8.2
depfu[bot] Sep 23, 2024
53b8def
Adding Norm plate after LBB Lib PCR-XP
dasunpubudumal Oct 10, 2024
2f61348
Adding relationships for the norm plate
dasunpubudumal Oct 10, 2024
911ca56
Refactor bespoke.yml to remove unused presenter and creator classes
dasunpubudumal Oct 14, 2024
735078a
fix: correctly label Submission state
StephenHulme Oct 14, 2024
6bbccc5
Merge branch 'develop' into Y24-190-milestone-2
sdjmchattie Oct 14, 2024
6e7b211
Remove unwanted hash value references
sdjmchattie Oct 14, 2024
9157bfe
Apply Prettier
sdjmchattie Oct 14, 2024
81b25ef
Merge pull request #1956 from sanger/Y24-190-milestone-2
sdjmchattie Oct 14, 2024
e6b73ec
Update cytoscape to version 3.30.2
depfu[bot] Oct 16, 2024
1c5d060
Merge pull request #1842 from sanger/depfu/update/yarn/cytoscape-3.30.2
StephenHulme Oct 16, 2024
32ff150
fix: filter by pipeline or group when clicking on a line
StephenHulme Oct 16, 2024
c14be6c
build: upgrade vite dependencies
StephenHulme Oct 16, 2024
d5a09d3
Merge branch 'develop' into depfu/update/vite_ruby-3.8.2
StephenHulme Oct 16, 2024
2ab8a28
Merge pull request #1902 from sanger/depfu/update/vite_ruby-3.8.2
StephenHulme Oct 17, 2024
f1b6287
Merge pull request #1999 from sanger/sh51/fix-pipelines-graph-undefin…
StephenHulme Oct 17, 2024
d8b7b29
fix: allow pools to not be defined without breaking all javascript
StephenHulme Oct 17, 2024
d73e94b
Merge remote-tracking branch 'origin/develop' into 1958-y24-335-creat…
dasunpubudumal Oct 18, 2024
d988432
Merge pull request #1988 from sanger/1958-y24-335-create-a-new-barcod…
dasunpubudumal Oct 18, 2024
5642ec3
tests: add tests for state_badge
StephenHulme Oct 21, 2024
40ef006
Merge pull request #1989 from sanger/sh51/repair-incorrect-tooltip
StephenHulme Oct 21, 2024
60b4bba
Merge branch 'develop' into sh51/handle-js-missing-pools-index-bug
StephenHulme Oct 22, 2024
3f8c848
Merge pull request #2005 from sanger/sh51/handle-js-missing-pools-ind…
StephenHulme Oct 22, 2024
2b2062a
Revert "Adding Norm plate after LBB Lib PCR-XP for tracking Beckman n…
dasunpubudumal Oct 23, 2024
859dd00
Merge pull request #2014 from sanger/revert-1988-1958-y24-335-create-…
dasunpubudumal Oct 23, 2024
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
7 changes: 7 additions & 0 deletions .pryrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# frozen_string_literal: true
if defined?(PryByebug)
Pry.commands.alias_command 's', 'step'
Pry.commands.alias_command 'n', 'next'
Pry.commands.alias_command 'f', 'finish'
Pry.commands.alias_command 'c', 'continue'
end
17 changes: 9 additions & 8 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ GEM
diff-lcs (1.5.1)
docile (1.4.0)
drb (2.2.1)
dry-cli (1.1.0)
dry-cli (1.2.0)
erubi (1.13.0)
exception_notification (4.5.0)
actionmailer (>= 5.2, < 8)
Expand Down Expand Up @@ -192,10 +192,10 @@ GEM
tilt
hashdiff (1.1.0)
hashie (5.0.0)
i18n (1.14.5)
i18n (1.14.6)
concurrent-ruby (~> 1.0)
io-console (0.7.2)
irb (1.14.0)
irb (1.14.1)
rdoc (>= 4.0.0)
reline (>= 0.4.2)
json (2.7.2)
Expand Down Expand Up @@ -264,7 +264,7 @@ GEM
puma (6.4.3)
nio4r (~> 2.0)
racc (1.8.1)
rack (3.1.7)
rack (3.1.8)
rack-mini-profiler (3.3.1)
rack (>= 1.2.0)
rack-proxy (0.7.7)
Expand Down Expand Up @@ -319,7 +319,7 @@ GEM
rdoc (6.7.0)
psych (>= 4.0.0)
regexp_parser (2.9.2)
reline (0.5.9)
reline (0.5.10)
io-console (~> 0.5)
rexml (3.3.6)
strscan
Expand Down Expand Up @@ -404,7 +404,7 @@ GEM
rbs
syntax_tree (>= 2.0.1)
temple (0.10.3)
thor (1.3.1)
thor (1.3.2)
tilt (2.4.0)
timeout (0.4.1)
tzinfo (2.0.6)
Expand All @@ -413,8 +413,9 @@ GEM
vite_rails (3.0.17)
railties (>= 5.1, < 8)
vite_ruby (~> 3.0, >= 3.2.2)
vite_ruby (3.6.0)
vite_ruby (3.9.0)
dry-cli (>= 0.7, < 2)
logger (~> 1.6)
rack-proxy (~> 0.6, >= 0.6.1)
zeitwerk (~> 2.2)
web-console (4.2.1)
Expand All @@ -434,7 +435,7 @@ GEM
xpath (3.2.0)
nokogiri (~> 1.8)
yard (0.9.36)
zeitwerk (2.6.17)
zeitwerk (2.6.18)

PLATFORMS
ruby
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -833,8 +833,8 @@ describe('CustomTaggedPlate', () => {
purpose_uuid: 'purpose-uuid',
parent_uuid: 'parent-plate-uuid',
tag_layout: {
tag_group: 'tag-1-group-uuid',
tag2_group: 'tag-2-group-uuid',
tag_group_uuid: 'tag-1-group-uuid',
tag2_group_uuid: 'tag-2-group-uuid',
direction: 'column',
walking_by: 'manual by plate',
initial_tag: 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -619,8 +619,8 @@ export default {
purpose_uuid: this.purposeUuid,
parent_uuid: this.parentUuid,
tag_layout: {
tag_group: this.tag1GroupUuid,
tag2_group: this.tag2GroupUuid,
tag_group_uuid: this.tag1GroupUuid,
tag2_group_uuid: this.tag2GroupUuid,
direction: this.direction,
walking_by: this.walkingBy,
initial_tag: initialTag,
Expand Down
5 changes: 4 additions & 1 deletion app/frontend/javascript/legacy_scripts_a.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,12 @@ let limberPlateView = function (defaultTab) {
control.find('a[href="' + defaultTab + '"]').tab('show')

plateElement.on('click', '.aliquot', function (event) {
control.find('a[data-plate-view="pools-view"]').tab('show')

let pool = $(event.currentTarget).data('pool')

control.find('a[data-plate-view="pools-view"]').tab('show')
// Handle cases where pool is not defined to prevent errors
if (pool === undefined || pool === '') return

plateElement
.find('.aliquot[data-pool!=' + pool + ']')
Expand Down
4 changes: 3 additions & 1 deletion app/frontend/javascript/pipeline-graph/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,8 @@ const applyMouseEvents = function () {
// when an edge is clicked, filter the graph to show only that pipeline
core.on('click', 'edge', (event) => {
const pipeline = event.target.data('pipeline')
applyFilter(pipeline)
const group = event.target.data('group')
const pipelineOrGroup = pipeline || group
applyFilter(pipelineOrGroup)
})
}
4 changes: 2 additions & 2 deletions app/helpers/page_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ def jumbotron(jumbotron_id = nil, options = {}, &)

# eg. state_badge('pending')
# <span class="state-badge-pending">Pending</span>
def state_badge(state)
tag.span(state.titleize, class: "state-badge #{state}", title: 'Labware State', data: { toggle: 'tooltip' })
def state_badge(state, title: 'Labware State')
tag.span(state.titleize, class: "state-badge #{state}", title: title, data: { toggle: 'tooltip' })
end

# eg. count_badge(0)
Expand Down
5 changes: 3 additions & 2 deletions app/models/labware_creators/baited_plate.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,13 @@ def plate
end

def bait_library_layout_preview
@bait_library_layout_preview ||= api.bait_library_layout.preview!(plate: parent_uuid, user: user_uuid).layout
@bait_library_layout_preview ||=
Sequencescape::Api::V2::BaitLibraryLayout.preview(plate_uuid: parent_uuid, user_uuid: user_uuid).first.layout
end

def create_labware!
create_plate_with_standard_transfer! do |child|
api.bait_library_layout.create!(plate: child.uuid, user: user_uuid)
Sequencescape::Api::V2::BaitLibraryLayout.create!(plate_uuid: child.uuid, user_uuid: user_uuid)
end
end

Expand Down
23 changes: 10 additions & 13 deletions app/models/labware_creators/custom_tagged_plate.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ class CustomTaggedPlate < Base
{
tag_plate: %i[asset_uuid template_uuid state],
tag_layout: [
:user,
:plate,
:tag_group,
:tag2_group,
:user_uuid,
:plate_uuid,
:tag_group_uuid,
:tag2_group_uuid,
:direction,
:walking_by,
:initial_tag,
Expand All @@ -47,14 +47,11 @@ def initialize(*args, &)

def create_plate! # rubocop:todo Metrics/AbcSize
@child =
api
.pooled_plate_creation
.create!(
child_purpose: purpose_uuid,
user: user_uuid,
parents: [parent_uuid, tag_plate.asset_uuid].compact_blank
)
.child
Sequencescape::Api::V2::PooledPlateCreation.create!(
child_purpose_uuid: purpose_uuid,
parent_uuids: [parent_uuid, tag_plate.asset_uuid].compact_blank,
user_uuid: user_uuid
).child

transfer_material_from_parent!(@child.uuid)

Expand Down Expand Up @@ -107,7 +104,7 @@ def tag_layout_attributes

def create_labware!
create_plate! do |plate_uuid|
api.tag_layout.create!(tag_layout_attributes.merge(plate: plate_uuid, user: user_uuid))
Sequencescape::Api::V2::TagLayout.create!(tag_layout_attributes.merge(plate_uuid:, user_uuid:))
end
end
end
Expand Down
8 changes: 4 additions & 4 deletions app/models/labware_creators/merged_plate.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ def barcodes=(barcodes)
private

def create_plate_from_parent!
api.pooled_plate_creation.create!(
child_purpose: purpose_uuid,
user: user_uuid,
parents: source_plates.map(&:uuid)
Sequencescape::Api::V2::PooledPlateCreation.create!(
child_purpose_uuid: purpose_uuid,
parent_uuids: source_plates.map(&:uuid),
user_uuid: user_uuid
)
end

Expand Down
10 changes: 6 additions & 4 deletions app/models/labware_creators/multi_plate_pool.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@ class MultiPlatePool < Base
private

def create_labware!
plate_creation =
api.pooled_plate_creation.create!(parents: transfers.keys, child_purpose: purpose_uuid, user: user_uuid)

@child = plate_creation.child
@child =
Sequencescape::Api::V2::PooledPlateCreation.create!(
child_purpose_uuid: purpose_uuid,
parent_uuids: transfers.keys,
user_uuid: user_uuid
).child

api.bulk_transfer.create!(user: user_uuid, well_transfers: well_transfers)

Expand Down
10 changes: 6 additions & 4 deletions app/models/labware_creators/multi_stamp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,12 @@ class MultiStamp < Base # rubocop:todo Style/Documentation
private

def create_labware!
plate_creation =
api.pooled_plate_creation.create!(parents: parent_uuids, child_purpose: purpose_uuid, user: user_uuid)

@child = plate_creation.child
@child =
Sequencescape::Api::V2::PooledPlateCreation.create!(
child_purpose_uuid: purpose_uuid,
parent_uuids: parent_uuids,
user_uuid: user_uuid
).child

transfer_material_from_parent!(@child.uuid)

Expand Down
28 changes: 13 additions & 15 deletions app/models/labware_creators/multi_stamp_tubes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,14 @@ def create_labware!
create_and_build_submission
return if errors.size.positive?

plate_creation =
api.pooled_plate_creation.create!(parents: parent_uuids, child_purpose: purpose_uuid, user: user_uuid)
@child =
Sequencescape::Api::V2::PooledPlateCreation.create!(
child_purpose_uuid: purpose_uuid,
parent_uuids: parent_uuids,
user_uuid: user_uuid
).child

@child = plate_creation.child
child_v2 = Sequencescape::Api::V2.plate_with_wells(@child.uuid)

transfer_material_from_parent!(child_v2)
transfer_material_from_parent!

yield(@child) if block_given?
true
Expand Down Expand Up @@ -87,15 +88,12 @@ def parent_tubes
Sequencescape::Api::V2::Tube.find_all(uuid: parent_uuids, includes: 'receptacle,aliquots,aliquots.study')
end

def transfer_material_from_parent!(child_plate)
api.transfer_request_collection.create!(
user: user_uuid,
transfer_requests: transfer_request_attributes(child_plate)
)
def transfer_material_from_parent!
api.transfer_request_collection.create!(user: user_uuid, transfer_requests: transfer_request_attributes)
end

def transfer_request_attributes(child_plate)
transfers.map { |transfer| request_hash(transfer, child_plate) }
def transfer_request_attributes
transfers.map { |transfer| request_hash(transfer) }
end

def source_tube_outer_request_uuid(tube)
Expand All @@ -108,13 +106,13 @@ def source_tube_outer_request_uuid(tube)
pending_reqs.first.uuid || nil
end

def request_hash(transfer, child_plate)
def request_hash(transfer)
tube = Sequencescape::Api::V2::Tube.find_by(uuid: transfer[:source_tube])

{
'source_asset' => transfer[:source_asset],
'target_asset' =>
child_plate.wells.detect { |child_well| child_well.location == transfer.dig(:new_target, :location) }&.uuid,
@child.wells.detect { |child_well| child_well.location == transfer.dig(:new_target, :location) }&.uuid,
'outer_request' => source_tube_outer_request_uuid(tube)
}
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,14 @@ def save
#
# @return [Boolean] true if the child plate was created successfully.
def create_labware!
plate_creation =
api.pooled_plate_creation.create!(parents: parent_tube_uuids, child_purpose: purpose_uuid, user: user_uuid)
@child =
Sequencescape::Api::V2::PooledPlateCreation.create!(
child_purpose_uuid: purpose_uuid,
parent_uuids: parent_tube_uuids,
user_uuid: user_uuid
).child

@child = plate_creation.child
child_v2 = Sequencescape::Api::V2.plate_with_wells(@child.uuid)

transfer_material_from_parent!(child_v2)
transfer_material_from_parent!

yield(@child) if block_given?
true
Expand Down Expand Up @@ -232,23 +233,18 @@ def tube_has_expected_active_request?(tube_in_db)
end

# Transfers material from the parent tubes to the given child plate.
# @param child_plate [Sequencescape::Api::V2::Plate] The plate to transfer material to.
def transfer_material_from_parent!(child_plate)
api.transfer_request_collection.create!(
user: user_uuid,
transfer_requests: transfer_request_attributes(child_plate)
)
def transfer_material_from_parent!
api.transfer_request_collection.create!(user: user_uuid, transfer_requests: transfer_request_attributes)
end

# Returns an array of hashes representing the transfer requests for the given child plate.
# Each hash includes the UUIDs of the parent tube and child well, and the UUID of the outer request.
# @param child_plate [Sequencescape::Api::V2::Plate] The plate to get the transfer requests for.
# @return [Array<Hash>] An array of hashes representing the transfer requests.
def transfer_request_attributes(child_plate)
def transfer_request_attributes
parent_tubes.each_with_object([]) do |(foreign_barcode, parent_tube), tube_transfers|
tube_transfers << request_hash(
parent_tube.uuid,
child_plate
@child
.wells
.detect { |child_well| child_well.location == csv_file.location_by_barcode_details[foreign_barcode] }
&.uuid,
Expand Down
11 changes: 5 additions & 6 deletions app/models/labware_creators/plate_split_to_tube_racks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -408,13 +408,12 @@ def parent_wells_for_contingency
# @param tube_attributes [Hash] A hash of attributes to use for the created tubes.
# @return [Hash<String, Tube>] A hash of the created tubes indexed by name.
def create_tubes(tube_purpose_uuid, number_of_tubes, tube_attributes)
api
.specific_tube_creation
Sequencescape::Api::V2::SpecificTubeCreation
.create!(
user: user_uuid,
parent: parent_uuid,
child_purposes: [tube_purpose_uuid] * number_of_tubes,
tube_attributes: tube_attributes
child_purpose_uuids: [tube_purpose_uuid] * number_of_tubes,
parent_uuids: [parent_uuid],
tube_attributes: tube_attributes,
user_uuid: user_uuid
)
.children
.index_by(&:name)
Expand Down
11 changes: 5 additions & 6 deletions app/models/labware_creators/pooled_tubes_base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,12 @@ def create_labware!
end

def create_child_stock_tubes
api
.specific_tube_creation
Sequencescape::Api::V2::SpecificTubeCreation
.create!(
user: user_uuid,
parent: parent_uuid,
child_purposes: [purpose_uuid] * pool_uuids.length,
tube_attributes: tube_attributes
child_purpose_uuids: [purpose_uuid] * pool_uuids.length,
parent_uuids: [parent_uuid],
tube_attributes: tube_attributes,
user_uuid: user_uuid
)
.children
.index_by(&:name)
Expand Down
Loading
Loading