@@ -1020,19 +1020,18 @@ def print_input_spec(self):
10201020 | | | | alignments2D | alignments2D | ✕
10211021 | | | | alignments3D | alignments3D | ✕
10221022 """
1023- specs = self .cs .api .jobs .get_input_specs (self .project_uid , self .uid )
10241023 headings = ["Input" , "Title" , "Type" , "Required?" , "Input Slots" , "Slot Types" , "Slot Required?" ]
10251024 rows = []
1026- for key , spec in specs .root .items ():
1027- name , title , type = key , spec .title , spec .type
1028- required = f"✓ ({ spec .count_min } " if spec .count_min else "✕ (0"
1029- if spec .count_max in (0 , "inf" ):
1025+ for key , input in self . model . spec . inputs .root .items ():
1026+ name , title , type = key , input .title , input .type
1027+ required = f"✓ ({ input .count_min } " if input .count_min else "✕ (0"
1028+ if input .count_max in (0 , "inf" ):
10301029 required += "+)" # unlimited connections
1031- elif spec .count_min == spec .count_max :
1030+ elif input .count_min == input .count_max :
10321031 required += ")"
10331032 else :
1034- required += f"-{ spec .count_max } )"
1035- for slot in spec .slots :
1033+ required += f"-{ input .count_max } )"
1034+ for slot in input .slots :
10361035 slot = as_input_slot (slot )
10371036 rows .append ([name , title , type , required , slot .name , slot .dtype , "✓" if slot .required else "✕" ])
10381037 name , title , type , required = ("" ,) * 4 # only show group info on first iter
@@ -1061,15 +1060,10 @@ def print_output_spec(self):
10611060 particles | Particles | particle | blob | blob | ✕
10621061 | | | ctf | ctf | ✕
10631062 """
1064- specs = self .cs .api .jobs .get_output_specs (self .project_uid , self .uid )
10651063 headings = ["Output" , "Title" , "Type" , "Result Slots" , "Result Types" , "Passthrough?" ]
10661064 rows = []
1067- for key , spec in specs .root .items ():
1068- output = self .model .spec .outputs .root .get (key )
1069- if not output :
1070- warnings .warn (f"No results for input { key } " , stacklevel = 2 )
1071- continue
1072- name , title , type = key , spec .title , spec .type
1065+ for key , output in self .model .spec .outputs .root .items ():
1066+ name , title , type = key , output .title , output .type
10731067 for result in output .results :
10741068 rows .append ([name , title , type , result .name , result .dtype , "✓" if result .passthrough else "✕" ])
10751069 name , title , type = "" , "" , "" # only these print once per group
0 commit comments