Auto-detect venv

Hi all,

I have a python project structured as follows:

- Project root
 -- service-1
  --- /.venv
  --- /src
  --- /test
  --- Pipfile
  --- Makefile
 -- service-2
  --- /.venv
  --- /src
  --- /test
  --- Pipfile
  --- Makefile
...

where individual venv's are created for every service via the Makefiles (internally pipenv is used to create the venv from the Pipfile). The services itself are completely independent of each other.

Do you know if there is a possibility to automatically get the python interpreter of the corresponding venv depending on the context of the src/test file I'm currently working on?

A further question would be if it's possible to store individual run/debug config templates corresponding to the individual services?

Unfortunately it is not possible to change the code-base or extract to individual services to separate projects.

 

 

 

 

Please sign in to leave a comment.