Is your feature request related to a problem? Please describe.
I am new to moon, but I really like what I see! I am looking to use it primarily as a task runner.
But the tasks we want to run will be primarily provided via pip (python packages). Therefore, to ensure we have a consistent python environment, I need tasks to run in a virtual environment.
I would like to do this in a way that there is a task that creates the virtual environment with the required pip dependencies and then subsequent tasks operate in this environment (or can be specified to)
Describe the solution you'd like
I would like one of the following:
The ability to use envFile in tasks that are generated during the run of a previous task.
An option inVirtualEnv that points to a path of a virtual environment to be activated.
Any alternative solution that allows me to do this that makes more sense in the context of moon.
Describe alternatives you've considered
My experiments so far, suggest this is not possible, without some kind of wrapper around my commands. E.g. a cmd script that first activates the virtual environment before running the actual command.
I have played with generating a .env file and using that in the envFile option of tasks, but the issue is that the envFile seems to be read before the file is generated by the task that generates it. So, I would have to run the setup task first and then run the other tasks, but it would be nice to be able to do it all in one step, i.e via a dep.
Additional context
Note that the virtual environment I am creating is created in the workspace (usually /.venv).
I am guessing something like this may be needed for the Python language support as well. But I am not talking about a Python project here, just a project wanting to use commands installed via pip.
Is your feature request related to a problem? Please describe.
I am new to moon, but I really like what I see! I am looking to use it primarily as a task runner.
But the tasks we want to run will be primarily provided via pip (python packages). Therefore, to ensure we have a consistent python environment, I need tasks to run in a virtual environment.
I would like to do this in a way that there is a task that creates the virtual environment with the required pip dependencies and then subsequent tasks operate in this environment (or can be specified to)
Describe the solution you'd like
I would like one of the following:
Describe alternatives you've considered
My experiments so far, suggest this is not possible, without some kind of wrapper around my commands. E.g. a cmd script that first activates the virtual environment before running the actual command.
I have played with generating a .env file and using that in the envFile option of tasks, but the issue is that the envFile seems to be read before the file is generated by the task that generates it. So, I would have to run the setup task first and then run the other tasks, but it would be nice to be able to do it all in one step, i.e via a dep.
Additional context
Note that the virtual environment I am creating is created in the workspace (usually /.venv).
I am guessing something like this may be needed for the Python language support as well. But I am not talking about a Python project here, just a project wanting to use commands installed via pip.