Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove all env #3212

Merged
merged 21 commits into from
Nov 14, 2021
Merged

Conversation

DustinMoriarty
Copy link
Contributor

@DustinMoriarty DustinMoriarty commented Oct 15, 2020

Pull Request Check List

Resolves: #3208
Resolves: #1884

  • Add support for removing all virtualenvs in the CLI.
  • Add support for removing multiple virtualenvs in the CLI.
  • Add tests for supported features.
  • Revise CLI help to document supported features.

@DustinMoriarty DustinMoriarty mentioned this pull request Oct 15, 2020
2 tasks
@max-sixty
Copy link
Contributor

Awesome — thanks @DustinMoriarty !

abn
abn previously requested changes Oct 16, 2020
Copy link
Member

@abn abn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general looking good, minor suggestions.

poetry/console/commands/env/remove.py Outdated Show resolved Hide resolved
poetry.lock Outdated Show resolved Hide resolved
poetry/console/commands/env/remove.py Outdated Show resolved Hide resolved
poetry/console/commands/env/remove.py Outdated Show resolved Hide resolved
poetry/console/commands/env/remove.py Outdated Show resolved Hide resolved
@venaturum
Copy link
Contributor

This looks good to go right?

@sinoroc
Copy link

sinoroc commented Jan 14, 2021

This looks good to go right?

Looks like it might need docs update as well.

steveYeah
steveYeah previously approved these changes Jan 31, 2021
Copy link

@steveYeah steveYeah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! This will also solve this issue, so I'm keen to get this merged 😄 👍🏻 (Once the docs have been added, of course)

@steveYeah steveYeah mentioned this pull request Jan 31, 2021
2 tasks
@DustinMoriarty
Copy link
Contributor Author

@sinoroc : Which docs need to be updated?

@DustinMoriarty
Copy link
Contributor Author

Ok. I see perhaps we could update managing-environments.md to show the new functionality. The old docs would not be wrong since the change is back compatible. However, we can streamline the documentation for env remove to show multiple lines removed at once. Am I understanding your suggestion right @sinoroc ?

@sinoroc
Copy link

sinoroc commented Feb 22, 2021

Yes. I had this in mind:

but it actually is just a link to:

So in the end, as you said, I guess docs should go to:

At least that would be my recommendation (I am not a maintainer, so I do not have the last word on this).

@DustinMoriarty
Copy link
Contributor Author

Got it. I'll see if I have some time to take a look this weekend.

@DustinMoriarty
Copy link
Contributor Author

DustinMoriarty commented Mar 12, 2021

@sinoroc, @venaturum, @steveYeah or @abn : I just went to update the docs as discussed as well as update the branch to merge from latest upstream master. I am getting this failure with the FreeBSD build that does not look like it has anything to do with the PR. I think I had this problem before. It was odd because it was intermittent. Previously I would make some minor change, push and it would go away.

@DustinMoriarty
Copy link
Contributor Author

Here is the error:

FileNotFoundError: [Errno 2] No such file or directory: '/tmp/cirrus-ci-build/.tox/py/lib/python3.8/site-packages/ptyprocess-0.7.0.dist-info'

@DustinMoriarty
Copy link
Contributor Author

DustinMoriarty commented Mar 12, 2021

Well I did do some additional changes to improve the CI help documentation. The FreeBSD check passed this time. Given the nature of that issue intermittently not being able to find a file I wonder if the Cirrus FreeBSD service is running low on storage. I guess all is well for this PR, but maybe something to look into with regards to the Cirrus FreeBSD check.

@sinoroc
Copy link

sinoroc commented Mar 12, 2021

I have seen multiple reports of CI failing on FreeBSD. I would not worry about this too much. Usually just re-triggering the build solves it.

@DustinMoriarty
Copy link
Contributor Author

Sounds good. @abn or @steveYeah : could you please review? Is this ready to merge?

Copy link
Member

@neersighted neersighted left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has some conflicts -- LGTM once they're solved.

@DustinMoriarty
Copy link
Contributor Author

This has some conflicts -- LGTM once they're solved.

@neersighted : I merged from the upstream master and had no merge conflicts. It looks like it passes the pre-commit checks. Can you please approve the workflow pipeline to run? Thank you.

@DustinMoriarty
Copy link
Contributor Author

@neersighted : It looks like this one passed all pipeline checks. I believe that all suggested changes are addressed. Can you please approve the merge? Thank you.

Copy link
Member

@neersighted neersighted left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like a couple changes to the command descriptions, and I'm not 100% thrilled with the less-than-DRY approach. However, the code is simple to understand. Slight refactoring in env.py is needed to DRY this up -- that can be left as a future task.

poetry/console/commands/env/remove.py Outdated Show resolved Hide resolved
poetry/console/commands/env/remove.py Outdated Show resolved Hide resolved
docs/managing-environments.md Outdated Show resolved Hide resolved
poetry/console/commands/env/remove.py Show resolved Hide resolved
DustinMoriarty and others added 4 commits November 14, 2021 17:21
Co-authored-by: Bjorn Neergaard <bjorn@neersighted.com>
Co-authored-by: Bjorn Neergaard <bjorn@neersighted.com>
Co-authored-by: Bjorn Neergaard <bjorn@neersighted.com>
Co-authored-by: Bjorn Neergaard <bjorn@neersighted.com>
@DustinMoriarty
Copy link
Contributor Author

@neersighted : All suggestions should be resolved now. Thank you for the suggestions.

@neersighted
Copy link
Member

Awesome! I'm going to squash your changes, but keep in mind Github lets you batch suggested edits into one commit. I'd have to squash here anyway, but it's worth keeping in mind if you do like using the web interface.

@neersighted neersighted merged commit 089ff9d into python-poetry:master Nov 14, 2021
@DustinMoriarty DustinMoriarty deleted the remove-all-env branch November 15, 2021 00:28
@neersighted neersighted mentioned this pull request Nov 15, 2021
2 tasks
1nF0rmed pushed a commit to 1nF0rmed/poetry that referenced this pull request Nov 15, 2021
…#3212)

Co-authored-by: Arun Babu Neelicattu <arun.neelicattu@gmail.com>
Co-authored-by: Bjorn Neergaard <bjorn@neersighted.com>
edvardm pushed a commit to edvardm/poetry that referenced this pull request Nov 24, 2021
…#3212)

Co-authored-by: Arun Babu Neelicattu <arun.neelicattu@gmail.com>
Co-authored-by: Bjorn Neergaard <bjorn@neersighted.com>
@finswimmer finswimmer mentioned this pull request Mar 6, 2022
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

poetry env remove --all? CLI command to remove all old environments
7 participants