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

[Refactor] refactor mim uninstall #135

Merged
merged 15 commits into from Jun 24, 2022

Conversation

ice-tong
Copy link
Collaborator

@ice-tong ice-tong commented Jun 21, 2022

Thanks for your contribution and we appreciate it a lot. The following instructions would make your pull request more healthy and more easily get feedback. If you do not understand some items, don't worry, just make the pull request and seek help from maintainers.

Motivation

Refactor mim uninstall in order to use the same method as pip uninstall.

Modification

commands/uninstall.py

  • Added -r / --requirements option.
  • Rename the original package to uninstall_args to uninstall multiple packages at the same time.
  • Support for passing unknown option of mim uninstall to pip uninstall.

BC-breaking (Optional)

Does the modification introduce changes that break the back-compatibility of the downstream repos?
If so, please describe how it breaks the compatibility and how the downstream projects should modify their code to keep compatibility with this PR.

Use cases (Optional)

If this PR introduces a new feature, it is better to list some use cases here, and update the documentation.

Checklist

  1. Pre-commit or other linting tools are used to fix the potential lint issues.
  2. The modification is covered by complete unit tests. If not, please add more unit test to ensure the correctness.
  3. If the modification has potential influence on downstream projects, this PR should be tested with downstream projects, like MMDet or MMCls.
  4. The documentation has been modified accordingly, like docstring or example tutorials.

@ice-tong ice-tong changed the title refactor(commands/uninstall.py): refactor mim uninstall [Refactor] refactor mim uninstall Jun 22, 2022
@codecov
Copy link

codecov bot commented Jun 22, 2022

Codecov Report

Merging #135 (f181659) into main (90d97cd) will increase coverage by 0.49%.
The diff coverage is 73.33%.

@@            Coverage Diff             @@
##             main     #135      +/-   ##
==========================================
+ Coverage   53.95%   54.44%   +0.49%     
==========================================
  Files          23       23              
  Lines        1544     1552       +8     
  Branches      329      331       +2     
==========================================
+ Hits          833      845      +12     
+ Misses        585      582       -3     
+ Partials      126      125       -1     
Flag Coverage Δ
unittests 54.44% <73.33%> (+0.49%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
mim/commands/uninstall.py 76.19% <73.33%> (-16.12%) ⬇️
mim/commands/install.py 72.97% <0.00%> (+3.37%) ⬆️
mim/commands/list.py 84.09% <0.00%> (+6.81%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 90d97cd...f181659. Read the comment docs.

@ice-tong ice-tong requested a review from zhouzaida June 22, 2022 06:38
@zhouzaida
Copy link
Member

zhouzaida commented Jun 22, 2022

Please add unit tests for uninstall command.

ice-tong and others added 3 commits June 24, 2022 13:49
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
@zhouzaida zhouzaida merged commit eb0b827 into open-mmlab:main Jun 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants