maize icon indicating copy to clipboard operation
maize copied to clipboard

Optional Output ports don't pass Workflow.check()

Open mikegluk opened this issue 10 months ago • 0 comments

Great software, appreciate your work very much!

Version: 0.9.1 Platform: CentOS Stream 9 Description: Unconnected optional internal output ports don't pass Graph.check_connectivity() because it checks only input ports for optionality.

File ~/anaconda3/envs/reinvent4/lib/python3.10/site-packages/maize/core/workflow.py:797, in Workflow.check(self)
    796 def check(self) -> None:
--> 797     super().check()
    798     super().check_dependencies()
    800     # These are the original names of all mapped parameters

File ~/anaconda3/envs/reinvent4/lib/python3.10/site-packages/maize/core/graph.py:354, in Graph.check(self)
    333 """
    334 Checks if the graph was built correctly and warns about possible deadlocks.
    335 
   (...)
    351 
    352 """
    353 # Check connectivity first
--> 354 self.check_connectivity()
    356 # Check for deadlock potential by detecting cycles
    357 self.check_cycles()

File ~/anaconda3/envs/reinvent4/lib/python3.10/site-packages/maize/core/graph.py:372, in Graph.check_connectivity(self)
    366 if (
    367     isinstance(port, Input)
    368     and (port.is_set or port.optional)
    369     or port in self.mapped_parameters
    370 ):
    371     continue
--> 372 raise GraphBuildException(
    373     f"Subgraph '{self.name}' internal port '{name}' "
    374     f"of node '{node.name}' was not connected"
    375 )

GraphBuildException: Subgraph 'mmpbsa' internal port 'out_confout_gro' of node 'mds' was not connected

mikegluk avatar Apr 16 '25 23:04 mikegluk