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
Modifier and TypeClassDescriptionstatic enum
This enum helps us figure out the type of virtualenv. -
Constructor Summary
ConstructorDescriptionVirtualEnvironmentRunner
(String environmentNameOrPath, VirtualEnvironmentRunner.EnvType type, String name) VirtualEnvironmentRunner
(String environmentNameOrPath, VirtualEnvironmentRunner.EnvType type, String condaPath, String name) -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
runCommand
(boolean waitUntilDone) This builds, runs the command and outputs it to the logger as it is being runvoid
setArguments
(List<String> arguments) This is the code you actually want to run after 'python'.void
startWatchService
(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
-