Skip to content

Conversation

@ice-tong
Copy link
Collaborator

@ice-tong ice-tong commented Aug 2, 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

The mim --version command crash in click>=8.x, fix it by pass the __version__ to version_option.

Modification

  • mim/cli.py
  • tests/test_version.py

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 requested a review from zhouzaida August 2, 2022 05:46
@ice-tong ice-tong changed the title fix(mim): fix mim --version crash in click>=8.x [fix] fix mim --version crash in click>=8.x Aug 2, 2022
@ice-tong ice-tong changed the title [fix] fix mim --version crash in click>=8.x [Fix] fix mim --version crash in click>=8.x Aug 2, 2022
@codecov
Copy link

codecov bot commented Aug 2, 2022

Codecov Report

Merging #152 (5eafeed) into main (1266840) will increase coverage by 1.43%.
The diff coverage is 100.00%.

❗ Current head 5eafeed differs from pull request most recent head 494b4e2. Consider uploading reports for the commit 494b4e2 to get more accurate results

@@            Coverage Diff             @@
##             main     #152      +/-   ##
==========================================
+ Coverage   54.22%   55.66%   +1.43%     
==========================================
  Files          23       23              
  Lines        1562     1563       +1     
  Branches      333      333              
==========================================
+ Hits          847      870      +23     
+ Misses        587      563      -24     
- Partials      128      130       +2     
Flag Coverage Δ
unittests 55.66% <100.00%> (+1.43%) ⬆️

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

Impacted Files Coverage Δ
mim/cli.py 29.82% <100.00%> (+29.82%) ⬆️
mim/commands/install.py 68.78% <0.00%> (-0.64%) ⬇️
mim/version.py 58.33% <0.00%> (+58.33%) ⬆️

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 1266840...494b4e2. Read the comment docs.

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.

3 participants