Package qupath.ext.biop.cmd
Class VirtualEnvironmentRunner
java.lang.Object
qupath.ext.biop.cmd.VirtualEnvironmentRunner
A wrapper to run python virtualenvs, that tries to figure out the commands to run based on the environment type
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThis enum helps us figure out the type of virtualenv. -
Constructor Summary
ConstructorsConstructorDescriptionVirtualEnvironmentRunner(String environmentNameOrPath, VirtualEnvironmentRunner.EnvType type, String name) VirtualEnvironmentRunner(String environmentNameOrPath, VirtualEnvironmentRunner.EnvType type, String condaPath, String name) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidrunCommand(boolean waitUntilDone) This builds, runs the command and outputs it to the logger as it is being runvoidsetArguments(List<String> arguments) This is the code you actually want to run after 'python'.voidstartWatchService(Path folderToListen)
-
Constructor Details
-
VirtualEnvironmentRunner
public VirtualEnvironmentRunner(String environmentNameOrPath, VirtualEnvironmentRunner.EnvType type, String name) -
VirtualEnvironmentRunner
public VirtualEnvironmentRunner(String environmentNameOrPath, VirtualEnvironmentRunner.EnvType type, String condaPath, String name)
-
-
Method Details
-
setArguments
This is the code you actually want to run after 'python'. For example addingArrays.asList("--version")should return the version of python that is being run.- Parameters:
arguments- any cellpose or omnipose command line argument
-
runCommand
This builds, runs the command and outputs it to the logger as it is being run- Parameters:
waitUntilDone- whether to wait for the process to end or not before exiting this method- Throws:
IOException- in case there is an issue with the process
-
getProcess
-
getProcessLog
-
startWatchService
- Throws:
IOException
-
getChangedFiles
- Throws:
InterruptedException
-
closeWatchService
- Throws:
IOException
-