Ignore environment if appropriate runner isn't installed #3504
Labels
enhancement
help:wanted
Issues that have been acknowledged, a solution determined and a PR might likely be accepted.
What's the problem this feature will solve?
I'm trying to make bootstrapping my dev environment as simple as possible. I happen to LOVE tox-uv. I'd like to make it easy for people to get going even if they don't have the plugin installed. Right now, if an environment has a defined runner that is not valid you cannot run any environment at all, even if that environment would run fine with the virtualenv runner.
Describe the solution you'd like
Instead of throwing a KeyError I'd like environments without useable runners to be ignored.
Consider this tox.ini and assume there is an existing uv.lock in the project.
If I run:
I get the error:
I'm not trying to run that environment to start so the fact that I don't have the runner should not matter. If the environment was ignored I would end up with a properly bootstrapped .venv folder because I install tox-uv into the dev tox environment.
Alternative Solutions
The alternative is fine, but it's certainly not as nice looking:
The text was updated successfully, but these errors were encountered: