Skip to content

[Feature Request] Keep up to date environments created based on requirements.txt #1392

@cantrem404

Description

@cantrem404

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):

  1. 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.
  2. 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
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions