@@ -181,7 +181,7 @@ def loadFromCache(self, statusFile):
181181 logging .warning (f"(loadFromCache) { self .nodeName } : Error while loading status file { statusFile } : { e } " )
182182 self .reset ()
183183
184- @property
184+ @property
185185 def nbChunks (self ):
186186 nbBlocks = self .chunks .nbBlocks if self .chunks else - 1
187187 return nbBlocks
@@ -190,15 +190,15 @@ def getChunkRanges(self):
190190 if not self .chunks :
191191 return []
192192 ranges = []
193- for i in range (self .chunks .nbBlocks ):
193+ for i in range (self .chunks .nbBlocks ):
194194 ranges .append (desc .Range (
195- iteration = i ,
196- blockSize = self .chunks .blockSize ,
197- fullSize = self .chunks .fullSize ,
195+ iteration = i ,
196+ blockSize = self .chunks .blockSize ,
197+ fullSize = self .chunks .fullSize ,
198198 nbBlocks = self .chunks .nbBlocks
199199 ))
200200 return ranges
201-
201+
202202 def setChunks (self , chunks ):
203203 blockSize , fullSize , nbBlocks = 1 , 1 , 1
204204 for c in chunks :
@@ -215,7 +215,7 @@ class ChunkStatusData(BaseObject):
215215
216216 __slots__ = (
217217 "nodeName" , "nodeType" , "packageName" , "packageVersion" , "mrNodeType" ,
218- "computeSessionUid" , "execMode" , "status" , "graph" , "commandLine" , "env" ,
218+ "computeSessionUid" , "execMode" , "status" , "graph" , "commandLine" , "env" ,
219219 "startDateTime" , "endDateTime" , "elapsedTime" , "hostname"
220220 )
221221
@@ -274,7 +274,7 @@ def reset(self):
274274 self .mrNodeType : MrNodeType = MrNodeType .NONE
275275 self .execMode : ExecMode = ExecMode .NONE
276276 self .resetDynamicValues ()
277-
277+
278278 def initStartCompute (self ):
279279 import platform
280280 self .computeSessionUid = meshroom .core .sessionUid
@@ -510,12 +510,14 @@ def logger(self):
510510
511511 def getExecModeName (self ):
512512 return self ._status .execMode .name
513-
513+
514514 def shouldMonitorChanges (self ):
515- """ Check whether we should monitor changes in minimal mode
515+ """
516+ Check whether we should monitor changes in minimal mode.
516517 Only chunks that are run externally or local_isolated should be monitored,
517518 when run locally, status changes are already notified.
518- Chunks with an ERROR status may be re-submitted externally and should thus still be monitored
519+ Chunks with an ERROR status may be re-submitted externally and should thus still be
520+ monitored.
519521 """
520522 return (self .isExtern () and self ._status .status in (Status .SUBMITTED , Status .RUNNING , Status .ERROR )) or \
521523 (self .node .getMrNodeType () == MrNodeType .NODE and self ._status .status in (Status .SUBMITTED , Status .RUNNING ))
@@ -526,7 +528,7 @@ def updateStatusFromCache(self):
526528 """
527529 # TODO : If this is a placeholder chunk
528530 # Then we shouldn't do anything here
529-
531+
530532 statusFile = self .getStatusFile ()
531533 oldStatus = self ._status .status
532534 # No status file => reset status to Status.None
@@ -831,7 +833,7 @@ def __init__(self, nodeType: str, position: Position = None, parent: BaseObject
831833 self ._locked : bool = False
832834 self ._duplicates = ListModel (parent = self ) # list of nodes with the same uid
833835 self ._hasDuplicates : bool = False
834-
836+
835837 self ._nodeStatus : NodeStatusData = NodeStatusData (self ._name , nodeType , self .packageName ,
836838 self .packageVersion , self .getMrNodeType ())
837839 self .nodeStatusFileLastModTime = - 1
@@ -929,7 +931,7 @@ def getDocumentation(self):
929931 return self .nodeDesc .documentation
930932 else :
931933 return self .nodeDesc .__doc__
932-
934+
933935 def getNodeInfo (self ):
934936 if not self .nodeDesc :
935937 return []
@@ -956,7 +958,7 @@ def getNodeInfo(self):
956958 for key , value in additionalNodeInfo :
957959 info [key ] = value
958960 return [{"key" : k , "value" : v } for k , v in info .items ()]
959-
961+
960962 @property
961963 def packageFullName (self ):
962964 return '-' .join ([self .packageName , self .packageVersion ])
@@ -1356,7 +1358,7 @@ def isExtern(self):
13561358 @Slot ()
13571359 def clearSubmittedChunks (self ):
13581360 """
1359- Reset all submitted chunks to Status.NONE. This method should be used to clear
1361+ Reset all submitted chunks to Status.NONE. This method should be used to clear
13601362 inconsistent status if a computation failed without informing the graph.
13611363
13621364 Warnings:
@@ -1526,9 +1528,9 @@ def sourceCodeFolder(self):
15261528 @property
15271529 def nodeStatusFile (self ):
15281530 return os .path .join (self .graph .cacheDir , self .internalFolder , "nodeStatus" )
1529-
1531+
15301532 def shouldMonitorChanges (self ):
1531- """ Check whether we should monitor changes in minimal mode
1533+ """ Check whether we should monitor changes in minimal mode.
15321534 Only chunks that are run externally or local_isolated should be monitored,
15331535 when run locally, status changes are already notified.
15341536 Chunks with an ERROR status may be re-submitted externally and should thus still be monitored
@@ -2039,7 +2041,7 @@ def _hasDisplayableShape(self):
20392041 """
20402042 return next ((attr for attr in self ._attributes if attr .hasDisplayableShape or
20412043 attr .desc .semantic == "shapeFile" ), None ) is not None
2042-
2044+
20432045
20442046 name = Property (str , getName , constant = True )
20452047 defaultLabel = Property (str , getDefaultLabel , constant = True )
@@ -2209,7 +2211,7 @@ def toDict(self):
22092211 }
22102212
22112213 def _resetChunks (self ):
2212- """ Set chunks on the node
2214+ """ Set chunks on the node
22132215 # TODO : Maybe don't delete chunks if we will recreate them as before ?
22142216 """
22152217 if isinstance (self .nodeDesc , desc .InputNode ):
@@ -2248,7 +2250,7 @@ def _resetChunks(self):
22482250 self ._chunksCreated = False
22492251 self .setSize (0 )
22502252 self ._chunks .setObjectList ([])
2251- # Create chunks when possible
2253+ # Create chunks when possible
22522254 self .chunksCreatedChanged .emit ()
22532255 self .chunksChanged .emit ()
22542256 self .globalStatusChanged .emit ()
0 commit comments