mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-08-06 10:18:42 +02:00
created plugin and environment node systems
This commit is contained in:
parent
dad6c4ae0a
commit
c2aac17c88
18 changed files with 823 additions and 59 deletions
155
tests/nodes/plugins/dummyNodes.py
Normal file
155
tests/nodes/plugins/dummyNodes.py
Normal file
|
@ -0,0 +1,155 @@
|
|||
|
||||
|
||||
import os
|
||||
from meshroom.core.plugin import PluginNode, PluginCommandLineNode, EnvType
|
||||
|
||||
#Python nodes
|
||||
|
||||
class DummyConda(PluginNode):
|
||||
|
||||
category = 'Dummy'
|
||||
documentation = ''' '''
|
||||
|
||||
envType = EnvType.CONDA
|
||||
envFile = os.path.join(os.path.dirname(__file__), "env.yaml")
|
||||
|
||||
inputs = []
|
||||
outputs = []
|
||||
|
||||
def processChunk(self, chunk):
|
||||
import numpy as np
|
||||
chunk.logManager.start("info")
|
||||
chunk.logger.info(np.abs(-1))
|
||||
|
||||
class DummyDocker(PluginNode):
|
||||
|
||||
category = 'Dummy'
|
||||
documentation = ''' '''
|
||||
|
||||
envType = EnvType.DOCKER
|
||||
envFile = os.path.join(os.path.dirname(__file__), "Dockerfile")
|
||||
|
||||
inputs = []
|
||||
outputs = []
|
||||
|
||||
def processChunk(self, chunk):
|
||||
import numpy as np
|
||||
chunk.logManager.start("info")
|
||||
chunk.logger.info(np.abs(-1))
|
||||
|
||||
|
||||
class DummyVenv(PluginNode):
|
||||
|
||||
category = 'Dummy'
|
||||
documentation = ''' '''
|
||||
|
||||
envType = EnvType.VENV
|
||||
envFile = os.path.join(os.path.dirname(__file__), "requirements.txt")
|
||||
|
||||
inputs = []
|
||||
outputs = []
|
||||
|
||||
def processChunk(self, chunk):
|
||||
import numpy as np
|
||||
chunk.logManager.start("info")
|
||||
chunk.logger.info(np.abs(-1))
|
||||
|
||||
class DummyPip(PluginNode):
|
||||
|
||||
category = 'Dummy'
|
||||
documentation = ''' '''
|
||||
|
||||
envType = EnvType.PIP
|
||||
envFile = os.path.join(os.path.dirname(__file__), "requirements.txt")
|
||||
|
||||
inputs = []
|
||||
outputs = []
|
||||
|
||||
def processChunk(self, chunk):
|
||||
import numpy as np
|
||||
chunk.logManager.start("info")
|
||||
chunk.logger.info(np.abs(-1))
|
||||
|
||||
class DummyNone(PluginNode):
|
||||
|
||||
category = 'Dummy'
|
||||
documentation = ''' '''
|
||||
|
||||
envType = EnvType.NONE
|
||||
envFile = None
|
||||
|
||||
inputs = []
|
||||
outputs = []
|
||||
|
||||
def processChunk(self, chunk):
|
||||
import numpy as np
|
||||
chunk.logManager.start("info")
|
||||
chunk.logger.info(np.abs(-1))
|
||||
|
||||
#Command line node
|
||||
|
||||
class DummyCondaCL(PluginCommandLineNode):
|
||||
|
||||
category = 'Dummy'
|
||||
documentation = ''' '''
|
||||
|
||||
envType = EnvType.CONDA
|
||||
envFile = os.path.join(os.path.dirname(__file__), "env.yaml")
|
||||
|
||||
inputs = []
|
||||
outputs = []
|
||||
|
||||
commandLine = "python -c \"import numpy as np; print(np.abs(-1))\""
|
||||
|
||||
class DummyDockerCL(PluginCommandLineNode):
|
||||
|
||||
category = 'Dummy'
|
||||
documentation = ''' '''
|
||||
|
||||
envType = EnvType.DOCKER
|
||||
envFile = os.path.join(os.path.dirname(__file__), "Dockerfile")
|
||||
|
||||
inputs = []
|
||||
outputs = []
|
||||
|
||||
commandLine = "python -c \"import numpy as np; print(np.abs(-1))\""
|
||||
|
||||
|
||||
class DummyVenvCL(PluginCommandLineNode):
|
||||
|
||||
category = 'Dummy'
|
||||
documentation = ''' '''
|
||||
|
||||
envType = EnvType.VENV
|
||||
envFile = os.path.join(os.path.dirname(__file__), "requirements.txt")
|
||||
|
||||
inputs = []
|
||||
outputs = []
|
||||
|
||||
commandLine = "python -c \"import numpy as np; print(np.abs(-1))\""
|
||||
|
||||
class DummyPipCL(PluginCommandLineNode):
|
||||
|
||||
category = 'Dummy'
|
||||
documentation = ''' '''
|
||||
|
||||
envType = EnvType.PIP
|
||||
envFile = os.path.join(os.path.dirname(__file__), "requirements.txt")
|
||||
|
||||
inputs = []
|
||||
outputs = []
|
||||
|
||||
commandLine = "python -c \"import numpy as np; print(np.abs(-1))\""
|
||||
|
||||
class DummyNoneCL(PluginCommandLineNode):
|
||||
|
||||
category = 'Dummy'
|
||||
documentation = ''' '''
|
||||
|
||||
envType = EnvType.NONE
|
||||
envFile = None
|
||||
|
||||
inputs = []
|
||||
outputs = []
|
||||
|
||||
commandLine = "python -c \"import numpy as np; print(np.abs(-1))\""
|
Loading…
Add table
Add a link
Reference in a new issue