-
Notifications
You must be signed in to change notification settings - Fork 2
Made changes to updates in response to code review comments #85
Conversation
bearmit
left a comment
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.
good job!
| if isinstance(parsed_cell, dict): | ||
| cell_type = parsed_cell["type"] | ||
| cell_key = parsed_cell["key"] | ||
| cell_value = parsed_cell["value"] |
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 recommend stripping it of white spaces as well
| elif cell_type == "identifier": | ||
| if cell_key == "Experiment or Inventory": | ||
| if cell_value == "I": | ||
| if cell_value.lower() == "i": |
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 think this is fine, but if we wanted to make the code shorter we could do
inventory = cell_value.lower() == "i"
| group-obj | ||
| returns-tuple of dicts of objs | ||
| group-cript Group node | ||
| returns-tuple of dicts of reference nodes and citation nodes |
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.
good docstrings!
| elif cell_type == "property": | ||
| if parsed_cell["key"] == "use_existing": | ||
| use_existing = cellToBool(parsed_cell["value"]) | ||
| use_existing = is_cell_true(parsed_cell["value"]) |
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.
beautiful!
| # try to get the material using its name | ||
| name_ = parsed_material["name"]["value"] | ||
| newProject = cript.Project.get( | ||
| mat_name = parsed_material["name"]["value"] |
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 would not have known what mat_name if it wasn't for the comment. How come we didn't go with material_name ?
| return str(val).lower() != "false" | ||
|
|
||
|
|
||
| def copyMaterial(material, new_project, project): |
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.
No description provided.