Context
Developer tracks dependencies through a requirements.txt file in their python project (the source of truth).
Developer creates a venv based on said requirements.txt through the Python Environments extension.
i.e.:
Create Environment -> Custom -> Select Python version -> Name env -> Install project dependencies -> Select requirements.txt
Issue
Once the venv is created, its link to requirements.txt is lost.
When dependencies need to be changed, the developer has to manually update both requirements.txt and the previously created venv
Proposal
Any of the below (first is best for user, but most complex to implement):
- When creating
venvs based on requirements.txt, link them together. Any change to requirements.txt automatically updates the venv and vice-versa. Settings and user prompts can be added where necessary.
- When creating
venvs based on requirements.txt, link them together. Provide a user trigger to update the venv based on requirements.txt, e.g. an Update Environment From Project Dependencies option per venv in the "Environment Managers" tab
- Add an Update/Recreate option for an already created
venv. Accessing it, the developer then goes through the normal venv creation process, but with preselected options (e.g. env name, python version), reselecting requirements.txt.
Context
Developer tracks dependencies through a
requirements.txtfile in their python project (the source of truth).Developer creates a
venvbased on saidrequirements.txtthrough the Python Environments extension.i.e.:
Create Environment -> Custom -> Select Python version -> Name env -> Install project dependencies -> Select
requirements.txtIssue
Once the venv is created, its link to
requirements.txtis lost.When dependencies need to be changed, the developer has to manually update both
requirements.txtand the previously createdvenvProposal
Any of the below (first is best for user, but most complex to implement):
venvsbased onrequirements.txt, link them together. Any change torequirements.txtautomatically updates thevenvand vice-versa. Settings and user prompts can be added where necessary.venvsbased onrequirements.txt, link them together. Provide a user trigger to update thevenvbased onrequirements.txt, e.g. an Update Environment From Project Dependencies option pervenvin the "Environment Managers" tabvenv. Accessing it, the developer then goes through the normalvenvcreation process, but with preselected options (e.g. env name, python version), reselectingrequirements.txt.