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
Scottx611x/workflow launching and monitoring #1949
Scottx611x/workflow launching and monitoring #1949
Conversation
…_collection_creation
…w_launching_and_monitoring
…ad diff, and isn't crucial
…saturated with Workflow-based Tool specific methods
Codecov Report
@@ Coverage Diff @@
## develop #1949 +/- ##
==========================================
+ Coverage 42.78% 44.1% +1.31%
==========================================
Files 414 415 +1
Lines 26988 28087 +1099
Branches 1321 1322 +1
==========================================
+ Hits 11548 12388 +840
- Misses 15440 15699 +259
Continue to review full report at Codecov.
|
).delete() | ||
galaxy_workflow_taskset.delete() | ||
analysis.galaxy_cleanup() | ||
return |
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.
Why these blank return
s throughout analysis monitoring code?
@@ -352,13 +347,58 @@ def _get_analysis_config(self): | |||
} | |||
|
|||
def launch(self): | |||
if self.get_tool_type() == ToolDefinition.VISUALIZATION: | |||
return self._launch_visualization() | |||
raise NotImplementedError(Tool.LAUNCH_WARNING) |
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.
Look at AbstractBaseClass decorators: @abstractmethod
https://docs.python.org/2/library/abc.html
refinery/tool_manager/models.py
Outdated
'src': 'hda' | ||
} | ||
for item in self.get_file_relationships_galaxy() | ||
] |
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.
style ]
refinery/tool_manager/models.py
Outdated
'name': "{} File: {}".format(self.name, item), | ||
'src': 'hda' | ||
} | ||
for item in self.get_file_relationships_galaxy() |
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.
rename item
to something better
refinery/tool_manager/models.py
Outdated
structure=structure | ||
) | ||
except RuntimeError: | ||
return structure[:-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.
This line on 559 and no runtimeException handling
refinery/tool_manager/models.py
Outdated
inputs=self.create_workflow_inputs() | ||
) | ||
|
||
def _get_nesting_string(self, nesting=None, structure=""): |
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.
flatten structure into array and do list/paired concat. from that DS
refinery/tool_manager/models.py
Outdated
tool_launch_config[self.FILE_RELATIONSHIPS_GALAXY] = ( | ||
tool_launch_config[self.FILE_RELATIONSHIPS] | ||
) | ||
if tool_launch_config.get(self.FILE_RELATIONSHIPS_GALAXY) is None: |
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.
Set this in create_tool()
refinery/tool_manager/utils.py
Outdated
if tool_type == ToolDefinition.WORKFLOW: | ||
tool_launch_configuration[WorkflowTool.GALAXY_DATA] = {} | ||
tool = WorkflowToolFactory( | ||
name=tool_name, |
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.
DRY
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.
user_tools = get_objects_for_user( | ||
self.request.user, | ||
"tool_manager.read_tool" | ||
user_tools.extend( |
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.
is there a better way?
…tionships_nesting`
Tool
Polymorphism (there are nowWorkflowTool
&VisualizationTool
)RefineryImport
,GalaxyImport
,GalaxyAnalysis
stages forWorkflowTool
launches<DatasetCollection:list>
, InvokeWorkflowTools
with saidDatasetCollection
, and have the GalaxyAnalysis stage successfully complete.analysis_manager.tasks._check_galaxy_history_state
for easier testing