-
Notifications
You must be signed in to change notification settings - Fork 8
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
DPL-914 scRNA create tube rack (plate) from banked pmbc tubes #1586
DPL-914 scRNA create tube rack (plate) from banked pmbc tubes #1586
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #1586 +/- ##
===========================================
- Coverage 90.82% 90.78% -0.05%
===========================================
Files 359 362 +3
Lines 7424 7452 +28
===========================================
+ Hits 6743 6765 +22
- Misses 681 687 +6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
app/models/labware_creators/multi_stamp_tubes_using_tube_rack_scan/csv_file/row.rb
Outdated
Show resolved
Hide resolved
app/models/labware_creators/multi_stamp_tubes_using_tube_rack_scan/csv_file.rb
Outdated
Show resolved
Hide resolved
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.
Haven't looked at the state changer or api stuff yet, but submitting these comments in a batch as I might not get a chance to finish reviewing until later this afternoon.
# type(s). | ||
# 5) The request on the tube must be active, and must match to one of the expected ones from a list in the plate | ||
# purpose config. This is to check that the tubes are at the appropriate stage of their pipeline to transfer. | ||
# |
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.
Nice docs, thank you.
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.
Really nice and easy to read, thanks for the sensible method order and informative comments.
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.
Definitely some code duplication going on here - did you consider whether to try to share code with other CsvFile classes?
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.
yes can have a look, was having the same in the Targeted NanoSeq stories. Maybe can create some common classes for all of these file upload classes.
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.
Same here - code duplication. Might be easier to refactor considering the thinking you put into it already in the last similar story?
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.
Yep ok
app/views/plate_creation/multi_stamp_tubes_using_tube_rack_scan.html.erb
Outdated
Show resolved
Hide resolved
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.
Would be good to have a standard 'upload tube rack scan file' view (maybe a partial?) that we could reuse, as we now have these uploads in several different places. Could break that out into a different technical debt story though maybe, as it might take some thinking.
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.
The other one in this pipeline has 2 files, for contingency and sequencing racks.
Agree it should be possible to make a common one, maybe that allows for an array of files. Set up from attributes in the labware creator.
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.
Left some comments. The API stuff looks like a good change to me. I agree we should be cautious though and make sure the Integration Suite tests pass.
…n.html.erb Co-authored-by: KatyTaylor <[email protected]>
…thub.com:sanger/limber into dpl-914-scrna-create-tube-rack-banked-pmbc-tubes
app/models/labware_creators/common_file_handling/csv_file_for_tube_rack.rb
Show resolved
Hide resolved
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 doing all that refactoring. I've left a few extra comments but they're all minor.
app/models/labware_creators/common_file_handling/csv_file/row_base.rb
Outdated
Show resolved
Hide resolved
# | ||
class CsvFile::RowForTubeRack < CsvFile::RowBase | ||
TUBE_LOCATION_NOT_RECOGNISED = 'contains an invalid coordinate, in %s' | ||
TUBE_BARCODE_MISSING = 'cannot be empty, in %s' |
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.
The error messages could flow better, I think, but I guess you are copy pasting from an existing class? What does it end up as, something like:
Tube barcode cannot be empty, in CsvFile::RowForTubeRack
?
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.
The 'in' part is the to_s method that gives you a row number reference (plus well coord if available)
e.g. Tube barcode cannot be empty, in row 11 [G5]
|
||
# Override in subclass if needed | ||
def reset_variables | ||
@parent_barcode = nil |
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.
Not sure why @parent_barcode
is being reset, do you know? The other 3 are initialized in this class.
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.
well spotted, removed
cut and paste error from the pcr cycles version of csv file base
app/models/labware_creators/common_file_handling/csv_file_for_tube_rack.rb
Outdated
Show resolved
Hide resolved
# Generates a hash of position details based on the tube rack scan data in the CSV file. | ||
# | ||
# @return [Hash] A hash of position details, where the keys are positions and the values | ||
# are hashes containing the tube rack barcode and tube barcode for each position. |
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.
# are hashes containing the tube rack barcode and tube barcode for each position. | |
# are hashes containing the tube barcode for each position. |
Is this correct? Does not contain the tube rack barcode?
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.
correct, fixed
@row_data = row_data | ||
super(index, row_data) | ||
|
||
# initialize pipeline specific columns |
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.
# initialize pipeline specific columns |
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.
Added some comments. I will continue in a new batch.
app/models/labware_creators/common_file_handling/csv_file_base.rb
Outdated
Show resolved
Hide resolved
app/models/labware_creators/common_file_handling/csv_file/row_base.rb
Outdated
Show resolved
Hide resolved
app/models/labware_creators/common_file_handling/csv_file_for_tube_rack.rb
Outdated
Show resolved
Hide resolved
app/models/labware_creators/custom_pooled_tubes/csv_file/row.rb
Outdated
Show resolved
Hide resolved
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.
One more comment.
spec/models/labware_creators/common_file_handling/csv_file_for_tube_rack_spec.rb
Show resolved
Hide resolved
…base.rb Co-authored-by: KatyTaylor <[email protected]>
Code Climate has analyzed commit 47cad6a and detected 3 issues on this pull request. Here's the issue category breakdown:
The test coverage on the diff in this pull request is 96.5% (50% is the threshold). This pull request will bring the total coverage in the repository to 90.3% (-0.1% change). View more on Code Climate. |
Closes #1388
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