Skip to content

Commit

Permalink
fix failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
KatyTaylor committed Mar 8, 2024
1 parent 00b8e18 commit 15a4c6c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/models/sample_manifest/core_behaviour.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def stocks?

# Used for read-made libraries. Ensures that the library_id gets set
module LibraryAssets
def generate_sample_and_aliquot(sanger_sample_id, receptacle)
def generate_sample_and_aliquot(sanger_sample_id, receptacle, row = nil)

Check failure on line 51 in app/models/sample_manifest/core_behaviour.rb

View workflow job for this annotation

GitHub Actions / rubocop

Lint/UnusedMethodArgument: Unused method argument - `row`. If it's necessary, use `_` or `_row` as an argument name to indicate that it won't be used. If it's unnecessary, remove it. (https://rubystyle.guide#underscore-unused-vars)

Check failure on line 51 in app/models/sample_manifest/core_behaviour.rb

View workflow job for this annotation

GitHub Actions / rubocop

Lint/UnusedMethodArgument: Unused method argument - `row`. If it's necessary, use `_` or `_row` as an argument name to indicate that it won't be used. If it's unnecessary, remove it. (https://rubystyle.guide#underscore-unused-vars)
create_sample(sanger_sample_id).tap do |sample|
receptacle.aliquots.create!(sample: sample, study: study, library: receptacle)
study.samples << sample
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def create_rows(cache)
end

def find_pools_if_present

Check failure on line 48 in app/sample_manifest_excel/sample_manifest_excel/upload/rows.rb

View workflow job for this annotation

GitHub Actions / rubocop

Metrics/AbcSize: Assignment Branch Condition size for find_pools_if_present is too high. [<6, 16, 7> 18.47/17] (http://c2.com/cgi/wiki?AbcMetric, https://en.wikipedia.org/wiki/ABC_Software_Metric)

Check failure on line 48 in app/sample_manifest_excel/sample_manifest_excel/upload/rows.rb

View workflow job for this annotation

GitHub Actions / rubocop

Metrics/CyclomaticComplexity: Cyclomatic complexity for find_pools_if_present is too high. [8/7]

Check failure on line 48 in app/sample_manifest_excel/sample_manifest_excel/upload/rows.rb

View workflow job for this annotation

GitHub Actions / rubocop

Metrics/AbcSize: Assignment Branch Condition size for find_pools_if_present is too high. [<6, 16, 7> 18.47/17] (http://c2.com/cgi/wiki?AbcMetric, https://en.wikipedia.org/wiki/ABC_Software_Metric)

Check failure on line 48 in app/sample_manifest_excel/sample_manifest_excel/upload/rows.rb

View workflow job for this annotation

GitHub Actions / rubocop

Metrics/CyclomaticComplexity: Cyclomatic complexity for find_pools_if_present is too high. [8/7]
return unless row.plate_barcode && row.well_position
return unless items.first.plate_barcode && items.first.well_position

pools = items.group_by { |row| "#{row.plate_barcode}:#{row.well_position}" }
return if pools.values.all?(&:one?)
Expand Down

0 comments on commit 15a4c6c

Please sign in to comment.