-
Notifications
You must be signed in to change notification settings - Fork 33
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
Y24-402 - Specify 'no. pools' rather than 'no. samples per pool' in submission #4467
base: migrating-to-number-of-pools-epic
Are you sure you want to change the base?
Conversation
…fy-no-pools-rather-than-no-samples-per-pool-in-submission
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## migrating-to-number-of-pools-epic #4467 +/- ##
=====================================================================
- Coverage 89.22% 89.21% -0.02%
=====================================================================
Files 1392 1392
Lines 29830 29887 +57
=====================================================================
+ Hits 26616 26663 +47
- Misses 3214 3224 +10 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor comments. Just check that conditional formatting one where its still 5 and 25 and I can approve
promptTitle: "Samples per Pool" | ||
prompt: "The requested number of samples per pool (between 5 and 25 inclusive)" | ||
promptTitle: "Number of pools" | ||
prompt: "The requested number pools (between 2 and 8 inclusive)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be 1 and 8.
Was wrong in the story originally - my bad!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for updating! conditional_formattings.yml still has the old range.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left some comments and questions.
Think it needs better test coverage too.
Can discuss!
end | ||
end | ||
|
||
def apply_number_of_samples_per_pool_validation | ||
# Creates groups of rows based on the study and project name (pool_number.e., study-project combinations) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's pool_number.e. ?
@@ -45,13 +62,11 @@ def apply_additional_validations_by_template_name | |||
# | |||
# @param column_header [String] The header of the column to validate. | |||
# @return [void] | |||
# rubocop:disable Metrics/MethodLength,Metrics/AbcSize | |||
# rubocop:disable Metrics/MethodLength |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I keep running fowl of this rubocop, I wonder if we should increase the allowed length? it's too short
# rubocop:enable Metrics/MethodLength,Metrics/AbcSize | ||
# rubocop:enable Metrics/MethodLength | ||
|
||
def validate_samples_per_pool_for_labware |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add method comments for new methods.
codepilot is pretty good at doing most of it if you highlight the method and ask it to 'add a method comment'
barcodes = rows.pluck(headers.index(HEADER_BARCODE)) | ||
well_locations = rows.pluck(headers.index(HEADER_PLATE_WELLS)) | ||
|
||
if plate?(barcodes, well_locations) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if it's not a plate or tube? e.g. we have tube racks now.
raise exception maybe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
plus add test for tube
|
||
# rubocop:disable Metrics/AbcSize | ||
# rubocop:disable Metrics/MethodLength | ||
def validate_for_tubes(barcodes, rows) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
refactor this? rubocop clearly not happy
ask codepilot for ideas?
plus add more test coverage
end | ||
|
||
# Checks if the asset is either a tube or a plate. | ||
def valid_labware?(barcodes, well_locations) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like the look of this as a way to validate a labware. Where's this used in the code (search doesn't find it in your PR changes)? and why is there no test?
e.g. a TubeRack is a labware but won't have wells but is not a tube.
Maybe look for a valid sti_type? plate or tube if that's the only 2 types you want to allow?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was probably something I had in a previous iteration and forgot to remove.
samples_per_pool += 1 if pool_number < remainder | ||
next unless samples_per_pool > SAMPLES_PER_POOL[:max] || samples_per_pool < SAMPLES_PER_POOL[:min] | ||
|
||
errors.add( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add test
unlocked: true | ||
type: :integer | ||
validation: | ||
options: | ||
type: :whole | ||
operator: :between | ||
formula1: "5" | ||
formula2: "25" | ||
formula1: "1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just checking 1 is the minimum, I thought it was 2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you have 2-8 in the ranges below
…fy-no-pools-rather-than-no-samples-per-pool-in-submission
Closes #4423
Changes proposed in this pull request
Instructions for Reviewers
[All PRs] - Confirm PR template filled
[Feature Branches] - Review code
[Production Merges to
main
]- Check story numbers included
- Check for debug code
- Check version