CircleCI-Public / python-orb

Common CircleCI tasks for the Python programming language.
https://circleci.com/developer/orbs/orb/circleci/python
MIT License
13 stars 37 forks source link

update install-packages to autodiscover env #61

Closed dsayling closed 2 years ago

dsayling commented 3 years ago

Describe Request:

Currently, a user has to specify the pip tools they're using, be-it pipenv, poetry or pip. Because of the nature of python envs, you can theoretically do things like, use a requirements.txt to setup a pipenv project if you want, or use a pyproject.toml without using poetry, or just avoid virtualenvs all together since you're in a docker environment.

However, users are expecting more "smarts" in the integration. Ideally, we should be able to auto-discover the environment via the dependency file based on some sort of prioritization and decision tree based on the env files and the contents of those files.

We could also do some autodiscover on testing tool available, extending #56

Jaryt commented 2 years ago

This would be excellent, however I think there are some issues when it comes to caching. Since this would have to be done in a script, a solution I could be to make a symlink to the dependency files. We can only use one cache key, so there'd need to be some wizardry to merge the cached files and then expand them accordingly. Isn't a very clean solution. Any ideas @dsayling ?

dsayling commented 2 years ago

Ah, yes, that does make sense, but isn't too terrible. It would definitely be a little 'magic', but I think it would be a solid enhancement.

Jaryt commented 2 years ago

Sounds good! I'll take a stab at it then. 🎉