If i have a first step of:
python3 -m venv path/to/venv
source path/to/venv/bin/activate
Is there a way to have the venv active in subsequent steps?
If i have a first step of:
python3 -m venv path/to/venv
source path/to/venv/bin/activate
Is there a way to have the venv active in subsequent steps?
Thereās not an easy way to reuse commands or snippets right now, but you could do something like this
{{ doc.named["THE NAME"].content }}
EG
Definitely looking to make this sort of reuse easier - any suggestions as to what would work for you?
Not sure about ideas but plenty of related requirements, eg kube context or
kubectl wait deployment/myapp
Ideally, the block would visually indicate that āthings arenāt ready yetā.
Finally, the export doesnāt want this content (eg export to README.md shouldnāt be littered with these annotations),
EDIT
I need to try out your suggestion, it looks good. I shudda waited until I did before giving feedback
what about a custom interpreter?
I donāt know how well it would work for two commands, but worth a try!
my understanding is that only the second command is required to run each time - the first command creates the venv
hereās my half-baked solution:
Set the following as a custom interpreter and set the workdir (local directory node) to the directory that includes the .venv folder:
bash --init-file .venv/bin/activate -ic
I say āhalf bakedā because it results in some bash warnings at the start of each script āinappropriate ioctl for deviceā since we tell bash that this is an interactive instead of a login terminal
unsure if this is considered a bug
EDIT: Keep in mind that due to the --init-file
flag your bashrc wonāt be loaded. A much easier fix than all of the above is to check if the source file exists in your bashrc and source it ([[ -f .venv/bin/activate ]] && source .venv/bin/activate
)
There are many, many other hacks and workarounds but it depends on what you want to do