add support for poetry env remove when virtualenvs.in-project = true#2748
add support for poetry env remove when virtualenvs.in-project = true#2748ITProKyle wants to merge 10 commits intopython-poetry:masterfrom ITProKyle:feature/env-remove-in-project
poetry env remove when virtualenvs.in-project = true#2748Conversation
|
@ITProKyle Apoligies for dropping the ball on this one. Feel free to ping on discord if something falls through the crack again. We appricate your contribution. Can you rebase this change with latest master please? Also can we make |
- remove python default value - split the remove method into smaller methods - used the logic from remove to create a new method for finding an environment - remove now uses get to delete the active venv if python is not provided - remove now uses the new find method to located the venv to remove TODO update existing tests and write new tests
- method name is now more accurate to its intended functionality - add test for `env remove` command - add tests for EnvManager.find - update some previously added tests to use mocker instead of monkeypatch
|
@ITProKyle is this PR still alive? I've encountered the bug that this fixes, so it would be great if this fix could get merged 🙂 |
|
@jidicula - I could probably find some time to update the PR if it were to get reviewed. But, I don't want to waste the time if it's just going to sit for months to the point where I need to spend hours bring it back up to date for the third time. Not having this functionality is still an annoyance for me as well. |
|
Hello @ITProKyle, yes please rebase this PR please. Don't hesitate to ping me on Discord for a review. Thanks a lot for your contribution 👍 fin swimmer |
|
Hi, @ITProKyle @abn @finswimmer ! Is there any chance for this PR to be reviewed and merged? Fixing up this issue manually after every poetry installation/update is pretty inconvenient. |
|
Until this is fixed, simply removing the |
|
I really haven't had any time to revisit this to update it so anyone else is free to continue from where I left off. Not that this isn't annoying and an inconvenience to not have but I have adapted to live without it. I use the following snippet in its absence either per project or the root directory for all my projects to cleanup all virtual environments in one go. find -name ".venv" -type d -prune -exec rm -rf '{}' + |
|
Closing for now as this is long out of date/conflicted and |
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Pull Request Check List
Resolves: #2124
What Changed
poetry env removeargument now defaults to.venvfor ease of use with the static value.venvis passed as the<python>argument andvirtualenvs.in-project=true, it will remove the.envdirectory in the root of the project