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

[Chore] Fix the issue that the click version is locked at 7.x #127

Merged
merged 17 commits into from
Jun 16, 2022

Conversation

ice-tong
Copy link
Collaborator

@ice-tong ice-tong commented Jun 13, 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

Fix the issue that the click version is locked at 7.x, fixes #123
In addition, add .vscode into .gitignore make vscode user happy.

Modification

  • .gitignore
  • setup.py
  • requirements/install.txt
  • mim/click/__init__.py
  • mim/click/compat.py
  • mim/click/option.py
  • mim/commands/download.py
  • mim/commands/install.py
  • mim/commands/search.py
  • mim/commands/uninstall.py

BC-breaking (Optional)

No

Use cases (Optional)

No

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 June 13, 2022 06:39
mim/click/compat.py Outdated Show resolved Hide resolved
mim/click/compat.py Outdated Show resolved Hide resolved
mim/commands/download.py Outdated Show resolved Hide resolved
mim/commands/download.py Outdated Show resolved Hide resolved
@zhouzaida
Copy link
Collaborator

Suggest renaming mim/click/compat.py to mim/click/compatibility .py

@zhouzaida
Copy link
Collaborator

zhouzaida commented Jun 13, 2022

#128 has been merged and please update your branch to fix the CI.

In addition, it would be better to test click < 8.0 in CI.

      - name: Test click==7.1.2
        run: python -m pip install click==7.1.2
        if: ${{matrix.python-version == '3.8'}}

@ice-tong
Copy link
Collaborator Author

Suggest renaming mim/click/compat.py to mim/click/compatibility .py

The name compat.py are much more commonly used than compatibility.py.
For examples:

@codecov
Copy link

codecov bot commented Jun 14, 2022

Codecov Report

Merging #127 (6827d9e) into main (eb5c5c6) will increase coverage by 0.19%.
The diff coverage is 57.14%.

❗ Current head 6827d9e differs from pull request most recent head 0d94f4a. Consider uploading reports for the commit 0d94f4a to get more accurate results

@@            Coverage Diff             @@
##             main     #127      +/-   ##
==========================================
+ Coverage   32.58%   32.77%   +0.19%     
==========================================
  Files          21       22       +1     
  Lines        1593     1620      +27     
  Branches      363      371       +8     
==========================================
+ Hits          519      531      +12     
- Misses       1032     1045      +13     
- Partials       42       44       +2     
Flag Coverage Δ
unittests 32.77% <57.14%> (+0.19%) ⬆️

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

Impacted Files Coverage Δ
mim/click/option.py 29.72% <25.00%> (-0.58%) ⬇️
mim/click/compat.py 45.45% <45.45%> (ø)
mim/click/__init__.py 100.00% <100.00%> (ø)
mim/commands/download.py 34.61% <100.00%> (ø)
mim/commands/install.py 68.64% <100.00%> (ø)
mim/commands/search.py 12.75% <100.00%> (ø)
mim/commands/uninstall.py 92.30% <100.00%> (ø)

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 eb5c5c6...0d94f4a. Read the comment docs.

@ice-tong
Copy link
Collaborator Author

ice-tong commented Jun 14, 2022

#128 has been merged and please update your branch to fix the CI.

In addition, it would be better to test click < 8.0 in CI.

      - name: Test click==7.1.2
        run: python -m pip install click==7.1.2
        if: ${{matrix.python-version == '3.8'}}

Done. I added this step to the CI:

- name: Run unittests with click < 8.0.0
   run: |
      python -m pip install click==7.1.2
      pytest tests/
   if: ${{matrix.python-version == '3.8'}}

mim/click/option.py Outdated Show resolved Hide resolved
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
mim/click/compat.py Outdated Show resolved Hide resolved
mim/click/compat.py Outdated Show resolved Hide resolved
ice-tong and others added 3 commits June 16, 2022 15:01
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
@zhouzaida zhouzaida merged commit 77f5866 into open-mmlab:main Jun 16, 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.

Update Click to 8.x
2 participants