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 14.53.0 #4644

Draft
wants to merge 84 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
1035686
Update sample_public_name for RVI Program - Bait Capture study
sabrine33 Jan 8, 2025
a989cd1
formatting
sabrine33 Jan 8, 2025
190186e
run rubocop
sabrine33 Jan 8, 2025
4ef4d6b
adding the requested new plate purpose
sabrine33 Jan 13, 2025
205f668
adding the requested new plate purpose
sabrine33 Jan 13, 2025
6f565df
Update sample_public_name for RVI Program - Bait Capture study
sabrine33 Jan 8, 2025
899fa6f
formatting
sabrine33 Jan 8, 2025
9549c99
run rubocop
sabrine33 Jan 8, 2025
4f2c7b7
Convert to a migration to use ORM functionalities and trigger MLHW ev…
sabrine33 Jan 13, 2025
6f91035
Merge remote-tracking branch 'origin/Y24-300-rake-task' into Y24-300-…
sabrine33 Jan 13, 2025
a06bb3a
remove task as it is moved to migration
sabrine33 Jan 13, 2025
74cfd6d
run format
sabrine33 Jan 13, 2025
34a6a77
Update sample_public_name for RVI Program - Bait Capture study
sabrine33 Jan 8, 2025
3c3cd09
formatting
sabrine33 Jan 8, 2025
0cab318
run rubocop
sabrine33 Jan 8, 2025
cf5be4e
remove task as it is moved to migration
sabrine33 Jan 13, 2025
62a8de8
run format
sabrine33 Jan 13, 2025
6548087
Merge remote-tracking branch 'origin/Y24-300-rake-task' into Y24-300-…
sabrine33 Jan 13, 2025
29d8442
adding the requested new plate purpose
sabrine33 Jan 13, 2025
2554a12
adding the requested new plate purpose
sabrine33 Jan 13, 2025
3dbff3d
Merge remote-tracking branch 'origin/Y24-307' into Y24-307
sabrine33 Jan 16, 2025
4b74594
Merge branch 'develop' into Y24-307
yoldas Jan 20, 2025
0704487
Merge branch 'develop' into Y24-307
yoldas Jan 20, 2025
4fed980
fix: use variables to silence warnings and keep versions consistent
StephenHulme Jan 21, 2025
b6f34ee
Update vite to version 5.4.14
depfu[bot] Jan 21, 2025
ce46005
Removed underlying code for default_includes
SHIV5T3R Jan 22, 2025
72a36b4
Removed references to default_includes
SHIV5T3R Jan 22, 2025
da63b79
resolve conflicts with schema.rb
sabrine33 Jan 23, 2025
2ceb2a6
add rollback migration and remove autocommit
sabrine33 Jan 23, 2025
9931260
run format
sabrine33 Jan 23, 2025
10b3d51
wip: attempt to move to chrome headless new flag
BenTopping Jan 23, 2025
d707d62
Reapply "4409 y24 379 study setup fields to align to the ena databas…
wendyyang Jan 23, 2025
3b50531
test: add example test cases
StephenHulme Jan 27, 2025
583820e
wip: remove downloaded files after each test
BenTopping Jan 28, 2025
c0db7f4
Merge pull request #4628 from sanger/sh51/docker-updates
StephenHulme Jan 28, 2025
d4640b8
wip: print out buffer volume calculation variables
BenTopping Jan 28, 2025
9a80668
wip: clear existing value before entering new value for cherrypicking…
BenTopping Jan 28, 2025
1ca3ce4
misc: removes debugging puts and lints
BenTopping Jan 28, 2025
ba20bbf
Merge pull request #4639 from sanger/ci-failure-fix
BenTopping Jan 28, 2025
873a717
data(sample-metadata): adds migration to update invalid country_of_or…
BenTopping Jan 23, 2025
75cf1c5
Merge pull request #4601 from sanger/Y24-373-sample-metadata-correcti…
BenTopping Jan 28, 2025
f466742
Merge branch 'develop' of https://github.com/sanger/sequencescape int…
BenTopping Jan 28, 2025
eee2f17
Merge branch 'develop' into y24-382-add-test-cases
StephenHulme Jan 28, 2025
32507f9
build: add unpacked gems
StephenHulme Jan 28, 2025
e15fbd4
style: lint
StephenHulme Jan 28, 2025
7491e60
Merge pull request #4647 from sanger/sh51/gemfile-updates
StephenHulme Jan 28, 2025
b498de3
Merge branch 'develop' into Y24-300-rake-task
sabrine33 Jan 29, 2025
6c137ad
Merge pull request #4594 from sanger/Y24-300-rake-task
sabrine33 Jan 29, 2025
6d08266
Merge pull request #4610 from sanger/Y24-307
sabrine33 Jan 31, 2025
fd6bd42
remove redundent methods
wendyyang Feb 3, 2025
b18f751
test: add maximum_volume as test parameter
StephenHulme Feb 4, 2025
29a2e2c
Merge pull request #4633 from sanger/depfu/update/yarn/vite-5.4.14
harrietc52 Feb 4, 2025
e512bae
fix: add sample collection date to summary view
seenanair Feb 4, 2025
ee486ce
Merge branch 'develop' into y24-382-add-test-cases
StephenHulme Feb 4, 2025
b80add8
build: add syslog as separate gem
StephenHulme Feb 4, 2025
088dcf7
Merge pull request #4662 from sanger/sh51/add-syslog-to-gemfile
StephenHulme Feb 4, 2025
1a801d8
Merge branch 'develop' into y24-382-add-test-cases
StephenHulme Feb 4, 2025
2aa1b7a
test: move estimated_volume to a separate check
StephenHulme Feb 4, 2025
bc7de79
test: include sample collection date in samples feature
seenanair Feb 4, 2025
363ff25
Merge branch 'develop' into 4409-y24-379--study-setup-fields-to-align…
wendyyang Feb 4, 2025
292a30b
test: add assertions for amount final source and destination volumes
StephenHulme Feb 5, 2025
708a6e4
test: refactor value assignment
StephenHulme Feb 5, 2025
090f7f5
test: rename desired to target
StephenHulme Feb 5, 2025
8501436
Merge pull request #4640 from sanger/4409-y24-379--study-setup-fields…
wendyyang Feb 5, 2025
e7069c3
feat(vitest): replace jest with vitest and removes babel
BenTopping Feb 5, 2025
822d54b
Merge pull request #4660 from sanger/origin/4579-y25-002---bug-duplic…
wendyyang Feb 6, 2025
8f0a2a0
Merge pull request #4635 from sanger/y24-213-remove-default-includes
SHIV5T3R Feb 6, 2025
a124453
test: add final source volumes
StephenHulme Feb 6, 2025
3689bf5
deps: updates eslint and its config
BenTopping Feb 6, 2025
c31d6c8
misc: removes comments from eslint config file
BenTopping Feb 6, 2025
26c2f6f
deps(eslint): removes redundant globals
BenTopping Feb 6, 2025
32c80c3
test: add final destination volumes
StephenHulme Feb 6, 2025
15c3b31
style: reformat test to improve readbility
StephenHulme Feb 6, 2025
b139544
test: update final volumes
StephenHulme Feb 6, 2025
df4afdd
style: change test parameter order for reability
StephenHulme Feb 6, 2025
dbaabb4
refactor: rename _obtained -> _picked
StephenHulme Feb 6, 2025
f40b62b
test: fix broken expectation
StephenHulme Feb 6, 2025
9f37b19
style: improve readbility of individual examples
StephenHulme Feb 6, 2025
79571c4
Merge pull request #4665 from sanger/dpl-1047-add-vitest
BenTopping Feb 7, 2025
9aedadb
Update postcss to version 8.5.1
depfu[bot] Feb 7, 2025
1ab8a63
Merge pull request #4661 from sanger/y24-471-fix-date_of_sample_colle…
seenanair Feb 10, 2025
d1f1c5b
test: refactor stock_to_pick and wording
StephenHulme Feb 10, 2025
bd384c8
Merge pull request #4669 from sanger/depfu/update/yarn/postcss-8.5.1
KatyTaylor Feb 10, 2025
bf13288
Merge pull request #4641 from sanger/y24-382-add-test-cases
StephenHulme Feb 11, 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
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
ARG CHIPSET=default
ARG RUBY_VERSION=3.3.6
ARG APPLE_PLATFORM=linux/amd64

# Use the correct base image depending on the architecture
# For Apple M1 Chip, run: docker build --build-arg CHIPSET=m1 .
FROM ruby:3.3.6-slim AS base_default
FROM --platform=linux/amd64 ruby:3.2.5-slim AS base_m1
FROM ruby:${RUBY_VERSION}-slim AS base_default
FROM --platform=${APPLE_PLATFORM} ruby:${RUBY_VERSION}-slim AS base_m1
FROM base_${CHIPSET} AS base

COPY .nvmrc /.nvmrc
Expand Down
7 changes: 7 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ group :default do
gem 'bootsnap'
gem 'rails', '~> 7.0.8'

# Previously part of ruby or rails, now separate gems
gem 'drb', '~> 2.2'
gem 'mutex_m', '~> 0.3.0'
gem 'syslog', '~> 0.2.0'

# Fix incompatibility with between Ruby 3.1 and Psych 4 (used for yaml)
# see https://stackoverflow.com/a/71192990
gem 'psych', '< 4'
Expand Down Expand Up @@ -79,6 +84,8 @@ group :default do
# - Load the gem from the branch
gem 'jsonapi-resources', github: 'sanger/jsonapi-resources', branch: 'develop'

gem 'csv', '~> 3.3' # Required by jsonapi-resources, previously part of ruby

# Wraps bunny with connection pooling and consumer process handling
gem 'sanger_warren'

Expand Down
8 changes: 8 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ GEM
bigdecimal
rexml
crass (1.0.6)
csv (3.3.2)
cucumber (9.1.2)
builder (~> 3.2, >= 3.2.4)
cucumber-ci-environment (~> 9.2, >= 9.2.0)
Expand Down Expand Up @@ -205,6 +206,7 @@ GEM
diff-lcs (1.5.1)
docile (1.4.0)
domain_name (0.6.20240107)
drb (2.2.1)
dry-cli (1.0.0)
erubi (1.13.1)
exception_notification (4.5.0)
Expand Down Expand Up @@ -284,6 +286,7 @@ GEM
multi_test (1.1.0)
mustermann (3.0.0)
ruby2_keywords (~> 0.0.1)
mutex_m (0.3.0)
mysql2 (0.5.6)
net-imap (0.5.5)
date
Expand Down Expand Up @@ -510,6 +513,7 @@ GEM
syntax_tree (>= 2.0.1)
sys-uname (1.2.3)
ffi (~> 1.1)
syslog (0.2.0)
temple (0.10.3)
test-prof (1.4.2)
thor (1.3.2)
Expand Down Expand Up @@ -578,11 +582,13 @@ DEPENDENCIES
carrierwave
caxlsx
configatron
csv (~> 3.3)
cucumber-rails
cucumber_github_formatter
daemons
database_cleaner
delayed_job_active_record
drb (~> 2.2)
exception_notification
factory_bot_rails
flipper (~> 0.25.0)
Expand All @@ -599,6 +605,7 @@ DEPENDENCIES
minitest-profiler
mocha
multi_json
mutex_m (~> 0.3.0)
mysql2
net-ldap
nokogiri
Expand Down Expand Up @@ -643,6 +650,7 @@ DEPENDENCIES
syntax_tree
syntax_tree-haml
syntax_tree-rbs
syslog (~> 0.2.0)
test-prof
timecop
traceroute
Expand Down
2 changes: 1 addition & 1 deletion app/api/io/study.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class Io::Study < Core::Io::Base
study_metadata.commercially_available => commercially_available
study_metadata.data_release_study_type.name => data_release_sort_of_study
study_metadata.data_release_strategy => data_release_strategy
study_metadata.contaminated_human_data_access_group => contaminated_human_data_access_group
study_metadata.contaminated_human_data_access_group => contaminated_human_data_access_group
'
)
end
27 changes: 0 additions & 27 deletions app/frontend/.eslintrc.js

This file was deleted.

1 change: 0 additions & 1 deletion app/frontend/plate-picks/components/HelpToggle.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { shallowMount } from "@vue/test-utils";
import "@testing-library/jest-dom";
import HelpToggle from "./HelpToggle.vue";

describe("HelpToggle.vue", () => {
Expand Down
1 change: 0 additions & 1 deletion app/frontend/plate-picks/components/PicksSection.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { shallowMount } from "@vue/test-utils";
import "@testing-library/jest-dom";
import PicksSection from "./PicksSection.vue";
import PicksSectionBatch from "./PicksSectionBatch.vue";
import defaultState from "../store/state";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { shallowMount } from "@vue/test-utils";
import "@testing-library/jest-dom";
import PicksSectionBatch from "./PicksSectionBatch.vue";
import PicksSectionBatchPick from "./PicksSectionBatchPick.vue";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { shallowMount } from "@vue/test-utils";
import "@testing-library/jest-dom";
import PicksSectionBatchPick from "./PicksSectionBatchPick.vue";
import defaultState from "../store/state";
import { storePlateWithPicks } from "../_test_examples_";
Expand Down Expand Up @@ -81,7 +80,7 @@ describe("PicksSectionBatchPick.vue", () => {
});

it("includes an editable short name", async () => {
const commit = jest.fn();
const commit = vi.fn();
const wrapper = shallowMount(PicksSectionBatchPick, {
propsData: {
name,
Expand Down
5 changes: 2 additions & 3 deletions app/frontend/plate-picks/components/PlatesSection.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { shallowMount } from "@vue/test-utils";
import "@testing-library/jest-dom";
import PlatesSection from "./PlatesSection.vue";
import PlatesSectionPlate from "./PlatesSectionPlate.vue";
import defaultState from "../store/state";
Expand Down Expand Up @@ -33,7 +32,7 @@ describe("PlatesSection.vue", () => {
it("triggers plate lookup", async () => {
const mockStore = {
state: defaultState(),
dispatch: jest.fn(),
dispatch: vi.fn(),
getters: { sortedScannedPlates: [] },
};
const wrapper = shallowMount(PlatesSection, {
Expand All @@ -52,7 +51,7 @@ describe("PlatesSection.vue", () => {
it("ignores empty input", async () => {
const mockStore = {
state: defaultState(),
dispatch: jest.fn(),
dispatch: vi.fn(),
getters: { sortedScannedPlates: [] },
};
const wrapper = shallowMount(PlatesSection, {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { shallowMount } from "@vue/test-utils";
import "@testing-library/jest-dom";
import PlatesSectionPlate from "./PlatesSectionPlate.vue";
import defaultState from "../store/state";

Expand Down
26 changes: 13 additions & 13 deletions app/frontend/plate-picks/store/actions.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ describe("actions.js", () => {
// mock commit
const plates = { 1: plateWithPicks() };
const state = { ...defaultState(), plates };
const dispatch = jest.fn();
const commit = jest.fn((_) => (state.scanStore[`_${exampleBarcode}`] = { barcode: exampleBarcode, id: 1 }));
const dispatch = vi.fn();
const commit = vi.fn((_) => (state.scanStore[`_${exampleBarcode}`] = { barcode: exampleBarcode, id: 1 }));
// apply action
await plateBarcodeScan({ commit, state, dispatch }, exampleBarcode);
// assert result
Expand All @@ -36,8 +36,8 @@ describe("actions.js", () => {
mirageServer.create("plate", plateWithoutPicks({ id: "1" }));
// mock commit
const state = defaultState();
const commit = jest.fn((_) => (state.scanStore[`_${exampleBarcode}`] = { barcode: exampleBarcode }));
const dispatch = jest.fn();
const commit = vi.fn((_) => (state.scanStore[`_${exampleBarcode}`] = { barcode: exampleBarcode }));
const dispatch = vi.fn();
// apply action
await plateBarcodeScan({ commit, state, dispatch }, exampleBarcode);
// assert result
Expand All @@ -53,8 +53,8 @@ describe("actions.js", () => {
mirageServer.create("plate", plateWithoutPicks({ id: "1", control: true }));
// mock commit
const state = defaultState();
const commit = jest.fn((_) => (state.scanStore[`_${exampleBarcode}`] = { barcode: exampleBarcode }));
const dispatch = jest.fn();
const commit = vi.fn((_) => (state.scanStore[`_${exampleBarcode}`] = { barcode: exampleBarcode }));
const dispatch = vi.fn();
// apply action
await plateBarcodeScan({ commit, state, dispatch }, exampleBarcode);
// assert result
Expand All @@ -73,10 +73,10 @@ describe("actions.js", () => {
// mock the console
// We don't *need* to do this, but it clutters the output and confuses
// actual failing tests
console.error = jest.fn();
console.error = vi.fn();
// mock commit
const state = defaultState();
const commit = jest.fn((_) => (state.scanStore["_BadPlate"] = { barcode: "BadPlate" }));
const commit = vi.fn((_) => (state.scanStore["_BadPlate"] = { barcode: "BadPlate" }));
// mock dependencies
// apply action
await plateBarcodeScan({ commit, state }, "BadPlate");
Expand All @@ -93,8 +93,8 @@ describe("actions.js", () => {
describe("fetchBatches", () => {
it("fetches each batch`", () => {
// mock commit
const commit = jest.fn();
const dispatch = jest.fn();
const commit = vi.fn();
const dispatch = vi.fn();
const state = defaultState();
// apply action
fetchBatches({ commit, dispatch, state }, { ids: [1, 2] });
Expand Down Expand Up @@ -132,8 +132,8 @@ describe("actions.js", () => {

// mock commit
const state = defaultState();
const commit = jest.fn().mockImplementationOnce((_) => (state.batches["b1"] = { id: "1" }));
const dispatch = jest.fn((_) => (state.pickCount += 1));
const commit = vi.fn().mockImplementationOnce((_) => (state.batches["b1"] = { id: "1" }));
const dispatch = vi.fn((_) => (state.pickCount += 1));

// apply action
await fetchBatch({ commit, dispatch, state }, { id: "1" });
Expand Down Expand Up @@ -170,7 +170,7 @@ describe("actions.js", () => {
// Set up initial state
const state = defaultState();
// apply action
const commit = jest.fn((_) => (state.pickCount += 1));
const commit = vi.fn((_) => (state.pickCount += 1));
const returned = nextPickId({ commit, state });
expect(commit).toHaveBeenCalledWith("incrementPick");
expect(returned).toBe(1);
Expand Down
4 changes: 2 additions & 2 deletions app/frontend/plate-picks/store/mutations.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ describe("mutations.js", () => {
it("updates plates when they exist already", () => {
// Provided by the browser. We mock it. Currently just mock a string as we're not doing anything fancy
global.SpeechSynthesisUtterance = class extends String {};
global.speechSynthesis = { speak: jest.fn() };
global.speechSynthesis = { speak: vi.fn() };
// mock state
const state = defaultState();
state.plates = { 1: plateWithoutPicks({ id: 1 }) };
Expand All @@ -64,7 +64,7 @@ describe("mutations.js", () => {
it("updates picks when they exist already", () => {
// Provided by the browser. We mock it. Currently just mock a string as we're not doing anything fancy
global.SpeechSynthesisUtterance = class extends String {};
global.speechSynthesis = { speak: jest.fn() };
global.speechSynthesis = { speak: vi.fn() };
// mock state
const state = {
...defaultState(),
Expand Down
1 change: 0 additions & 1 deletion app/frontend/shared/components/BaseRadio.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { shallowMount } from "@vue/test-utils";
import "@testing-library/jest-dom";
import BaseRadio from "./BaseRadio.vue";

describe("BaseRadio.vue", () => {
Expand Down
1 change: 1 addition & 0 deletions app/frontend/shared/components/BaseRadio.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export default {
name: { type: String, required: true },
id: { type: String, required: true }, // Unique id essential for generating labels
},
emits: ["change"],
data: function () {
return {
value: this.selected,
Expand Down
3 changes: 3 additions & 0 deletions app/models/api/study_io.rb
Original file line number Diff line number Diff line change
Expand Up @@ -101,5 +101,8 @@ def render_class
map_attribute_to_json_attribute(:data_deletion_period)
map_attribute_to_json_attribute(:contaminated_human_data_access_group)
with_association(:program, lookup_by: :id) { map_attribute_to_json_attribute(:name, 'programme') }
map_attribute_to_json_attribute(:ebi_library_strategy)
map_attribute_to_json_attribute(:ebi_library_source)
map_attribute_to_json_attribute(:ebi_library_selection)
end
end
13 changes: 13 additions & 0 deletions app/models/study.rb
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ class Study < ApplicationRecord # rubocop:todo Metrics/ClassLength

DATA_RELEASE_DELAY_PERIODS = ['3 months', '6 months', '9 months', '12 months', '18 months'].freeze

EBI_LIBRARY_STRATEGY_OPTIONS = Rails.configuration.ena_requirement_fields['EBI_Library_strategy']
EBI_LIBRARY_SOURCE_OPTIONS = Rails.configuration.ena_requirement_fields['EBI_Library_source']
EBI_LIBRARY_SELECTION_OPTIONS = Rails.configuration.ena_requirement_fields['EBI_Library_selection']

# Class variables
self.per_page = 500

Expand Down Expand Up @@ -214,6 +218,11 @@ class Study < ApplicationRecord # rubocop:todo Metrics/ClassLength
custom_attribute(:commercially_available, required: true, in: YES_OR_NO)
custom_attribute(:study_name_abbreviation)

# add ebi library strategy
custom_attribute(:ebi_library_strategy, required: true, in: EBI_LIBRARY_STRATEGY_OPTIONS)
custom_attribute(:ebi_library_source, required: true, in: EBI_LIBRARY_SOURCE_OPTIONS)
custom_attribute(:ebi_library_selection, required: true, in: EBI_LIBRARY_SELECTION_OPTIONS)

custom_attribute(
:data_release_strategy,
required: true,
Expand Down Expand Up @@ -309,6 +318,10 @@ class Study < ApplicationRecord # rubocop:todo Metrics/ClassLength
allow_blank: true
}

validates :ebi_library_strategy, inclusion: { in: EBI_LIBRARY_STRATEGY_OPTIONS }
validates :ebi_library_source, inclusion: { in: EBI_LIBRARY_SOURCE_OPTIONS }
validates :ebi_library_selection, inclusion: { in: EBI_LIBRARY_SELECTION_OPTIONS }

before_validation do |record|
record.reference_genome_id = 1 if record.reference_genome_id.blank?

Expand Down
2 changes: 2 additions & 0 deletions app/models/submission/flexible_request_graph.rb
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ def build! # rubocop:todo Metrics/AbcSize
.order
.create_request_of_type!(request_type, asset: source_asset, target_asset: target_asset)
.tap do |request|
# Removed from linear_request_graph module as it caused unnecessary links in pipelines where
# a limber_multiplexing request is the first step.
if source_asset&.labware.present? && target_asset&.labware.present?
AssetLink.create_edge(source_asset.labware, target_asset.labware)
end
Expand Down
8 changes: 0 additions & 8 deletions app/models/submission/linear_request_graph.rb
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,6 @@ def create_request_chain!(request_type_and_multiplier_pairs, source_data_set, mu
target_asset = target_assets[index]

create_request_of_type!(request_type, asset: source_asset, target_asset: target_asset).tap do |request|
# TODO: AssetLink is supposed to disappear at some point in the future because it makes no real sense
# given that the request graph describes this relationship.
# JG: Its removal only really makes sense if we can walk the request graph in a timely manner.
# We use save not save! as AssetLink throws validation errors when the link already exists
if source_asset&.labware.present? && target_asset&.labware.present?
AssetLink.create_edge(source_asset.labware, target_asset.labware)
end

request.qc_metrics = qc_metrics.compact.uniq
request.update_responsibilities!

Expand Down
Loading
Loading