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

Review PR [do not merge] #8

Open
wants to merge 66 commits into
base: initial
Choose a base branch
from
Open

Review PR [do not merge] #8

wants to merge 66 commits into from

Conversation

bjkeller
Copy link
Member

this is for code review

cashmonger and others added 30 commits March 30, 2020 12:04
Cannon edits, with resolved merged conflicts
…needs work on mismatched input and output failures/edit on repeated sampels (aka only not allow repeated items).
Copy link
Member Author

@bjkeller bjkeller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cashmonger @malloc3
Both CollectionManagement/CollectionActions and CollectionDisplay seem like they should be in Krill.
There are also potentially classes that we might want to make -- for instance input and output arrays.

Also need to find a way to avoid exposing field values, or at least don't use that name.

more to say, but lets go back and forth on this

# @param operations [OperationList] operation list
# @param role [String] whether object is an input or an output
# @param location [String] the location to put things
def table_of_job_object_location(operations, role: 'input', location: nil)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method name doesn't say what is being done.

Also, this is a basic operation and should be in Krill. In fact, there is already code that puts things away. If it doesn't do what is needed, then it should be changed.

See https://github.com/klavinslab/aquarium/blob/283335bd5bf294ba47ad8b341e7eb6851efa1a21/lib/krill/inventory.rb#L225

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a rule, if you are mentioning field values, it is probably not protocol code and needs to be moved into Krill.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bjkeller this looks like an Aquarium issue.

#
# @param operations [OperationList] the list of operations
# @param location [String] the location that the items are to be moved to
def store_input_collections(operations, location: nil)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method is not unique to collections, and doesn't really belong here. See comment on table_of_job_object_location

Also, you shouldn't have methods with basically the same show block. Factor out the commonality with store_output_collections.

#
# @param array_of_fv [Array] array of field values
# @return obj_array [Array] array of objects (either collections or items)
def get_obj_from_fv_array(array_of_fv)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

field values...

# that extends class Item
# @param location [String] the location to move object to
# (String or Wizard if Wizard exists)
def set_locations(obj_array, location)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not unique to collections.
also, probably could be Krill

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bjkeller this looks like an Aquarium issue.


# Instructions to store a specific collection
#
# @param collection [Collection] the collection that is to be put away
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

name doesn't match parameter

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has aspects that are not unique to collections. I'm not clear on how this can be generalized, but should look at it.

# Parts are copied from the WorkflowValidation Lib see note below for explination

def precondition(_op)
range = (50...100)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it possible to do this with units?

# @param range [Range] acceptable numerical range of concentration
def valid_conc?(op, range)
op.input_array("Input Array").each do |field_value|
conc = field_value.part.get("Stock Conc (ng/ul)".to_sym)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be abstracted.

note 'Save output data as CSV and upload on next page'
end

csv_uploads = get_validated_uploads(working_plate.parts.length,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this be library or Krill code?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bjkeller this looks like an Aquarium issue.

# TODO write highlight heat map method for table
#
# @param working_plate [Collection] the plate being used
def list_concentrations(working_plate)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

concentrations seems like another thing that could be a library (similar to QC)

end
end

# Needs documentation
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mark these with TODO: – many editors will flag them

malloc3 and others added 12 commits April 24, 2020 15:03
… while being more general, additional changes reflected within protocols and other libraries to support.
…cols, Front end looks mostly the same however tracking and managing of samples is notable improved and generalized
…ns to libraries that will be cascaded through the rest of the protocols. Need to finish testing and confirm everything is working properly before the rest of the protocols get the updates
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants