Skip to content

Commit

Permalink
Merge branch 'develop' into Y24-307-new-plate-purpose
Browse files Browse the repository at this point in the history
  • Loading branch information
yoldas committed Jan 20, 2025
2 parents 4c02075 + df9b621 commit e4bbf24
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 98 deletions.
2 changes: 0 additions & 2 deletions app/models/presenters/donor_pooling_plate_presenter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ module Presenters
# number of cells by study. If other features are necessary in the presenter,
# they can be added here or the validation can be moved to the new one.
class DonorPoolingPlatePresenter < StandardPresenter
validates_with Validators::RequiredNumberOfCellsValidator

# The pooling tab is not relevant for this presenter as the wells are already pooled (tab shows future pooling
# by submission strategy)
self.pooling_tab = ''
Expand Down
69 changes: 0 additions & 69 deletions app/models/validators/required_number_of_cells_validator.rb

This file was deleted.

2 changes: 0 additions & 2 deletions config/initializers/scrna_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@
7 => 70_000,
8 => 84_285
},
# Key for the required number of cells metadata stored on Study (in poly_metadata)
study_required_number_of_cells_per_sample_in_pool_key: 'scrna_core_pbmc_donor_pooling_required_number_of_cells',
# Default viability threshold when passing/failing samples (in percent)
viability_default_threshold: 65,
# Default total cell count threshold when passing/failing samples
Expand Down
25 changes: 0 additions & 25 deletions spec/models/presenters/donor_pooling_plate_presenter_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,6 @@
# Constants from config/initializers/scrna_config.rb
let(:scrna_config) { Rails.application.config.scrna_config }

let(:study_required_number_of_cells_per_sample_in_pool_key) do
scrna_config[:study_required_number_of_cells_per_sample_in_pool_key]
end
let(:required_number_of_cells_per_sample_in_pool) { scrna_config[:required_number_of_cells_per_sample_in_pool] }

subject { Presenters::DonorPoolingPlatePresenter.new(labware:) }
Expand All @@ -89,28 +86,6 @@
source_wells_to_b1.each { |well| allow(well.aliquots.first).to receive(:study).and_return(study_to_b1) }
end

context 'when the labware in pending state' do
context 'with the required number of cells option for all studies' do
# Configure the first study
let(:study_to_a1) do
poly_metadatum =
create(:poly_metadatum, key: study_required_number_of_cells_per_sample_in_pool_key, value: '1000')
create(:study_with_poly_metadata, poly_metadata: [poly_metadatum]) # poly_metadata with cell count option
end

# Configure the second study
let(:study_to_b1) do
poly_metadatum =
create(:poly_metadatum, key: study_required_number_of_cells_per_sample_in_pool_key, value: '2000')
create(:study_with_poly_metadata, poly_metadata: [poly_metadatum]) # poly_metadata with cell count option
end

it 'does not warn the user about any study' do
expect(subject).to be_valid # There are no warnings.
end
end
end

context 'when the labware not in pending state' do
before { allow(labware).to receive(:state).and_return('passed') }

Expand Down

0 comments on commit e4bbf24

Please sign in to comment.