mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-06-10 14:51:54 +02:00
fix import paths
This commit is contained in:
parent
f54c765b30
commit
889e0298eb
5 changed files with 9 additions and 10 deletions
2
meshroom/compute.py
Normal file → Executable file
2
meshroom/compute.py
Normal file → Executable file
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python3
|
||||
import argparse
|
||||
|
||||
from meshroom import processGraph as pg
|
||||
from meshroom.processGraph import graph as pg
|
||||
|
||||
parser = argparse.ArgumentParser(description='Execute a Graph of processes.')
|
||||
parser.add_argument('graphFile', metavar='GRAPHFILE.mg', type=str,
|
||||
|
|
2
meshroom/newNodeType.py
Normal file → Executable file
2
meshroom/newNodeType.py
Normal file → Executable file
|
@ -63,7 +63,7 @@ if sys.stdin.isatty():
|
|||
inputCmdLineDoc = ''.join([line for line in sys.stdin])
|
||||
|
||||
outputNodeStr = '''
|
||||
from processGraph import desc
|
||||
from meshroom.processGraph import desc
|
||||
|
||||
class __COMMANDNAME__(desc.CommandLineNode):
|
||||
internalFolder = '{cache}/{nodeType}/{uid0}/'
|
||||
|
|
|
@ -6,7 +6,6 @@ import tempfile
|
|||
from contextlib import contextmanager
|
||||
|
||||
from . import desc
|
||||
from .graph import * # TODO: remove this
|
||||
|
||||
cacheFolder = os.path.join(tempfile.gettempdir(), 'processGraphCache')
|
||||
nodesDesc = {}
|
||||
|
|
|
@ -357,13 +357,13 @@ class Node:
|
|||
self.saveStatusFile()
|
||||
|
||||
def submit(self):
|
||||
self.upgradeStatusTo(pg.Status.SUBMITTED_EXTERN)
|
||||
self.upgradeStatusTo(Status.SUBMITTED_EXTERN)
|
||||
|
||||
def beginSequence(self):
|
||||
self.upgradeStatusTo(pg.Status.SUBMITTED_LOCAL)
|
||||
self.upgradeStatusTo(Status.SUBMITTED_LOCAL)
|
||||
|
||||
def process(self):
|
||||
self.upgradeStatusTo(pg.Status.RUNNING)
|
||||
self.upgradeStatusTo(Status.RUNNING)
|
||||
statThread = StatisticsThread(self)
|
||||
statThread.start()
|
||||
try:
|
||||
|
@ -377,15 +377,15 @@ class Node:
|
|||
logContent = ''
|
||||
with open(self.logFile(), 'r') as logF:
|
||||
logContent = ''.join(logF.readlines())
|
||||
self.upgradeStatusTo(pg.Status.ERROR)
|
||||
self.upgradeStatusTo(Status.ERROR)
|
||||
raise RuntimeError('Error on node "{}":\nLog:\n{}'.format(self.name, logContent))
|
||||
except:
|
||||
self.upgradeStatusTo(pg.Status.ERROR)
|
||||
self.upgradeStatusTo(Status.ERROR)
|
||||
raise
|
||||
statThread.running = False
|
||||
statThread.join()
|
||||
|
||||
self.upgradeStatusTo(pg.Status.SUCCESS)
|
||||
self.upgradeStatusTo(Status.SUCCESS)
|
||||
|
||||
def endSequence(self):
|
||||
pass
|
||||
|
|
2
meshroom/status.py
Normal file → Executable file
2
meshroom/status.py
Normal file → Executable file
|
@ -3,7 +3,7 @@ import argparse
|
|||
import os
|
||||
from pprint import pprint
|
||||
|
||||
from meshroom import processGraph as pg
|
||||
from meshroom.processGraph import graph as pg
|
||||
|
||||
parser = argparse.ArgumentParser(description='Query the status of nodes in a Graph of processes.')
|
||||
parser.add_argument('graphFile', metavar='GRAPHFILE.mg', type=str,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue