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

[Fix]: fix mim command crashes problem if requirements version conflict #144

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ice-tong
Copy link
Collaborator

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

Fixes #143 that mim could be crash if exist version conflict.
For reproduce mim crash:

> pip install markdown==3.3.7
> pip install importlib-metadata==4.2
> mim list

Modification

  • mim/__init__.py: set __requires__ in __main__ module from 'openmim' to '' avoid requirement resolve check.

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.

@codecov
Copy link

codecov bot commented Jun 25, 2022

Codecov Report

Merging #144 (c8703b7) into main (b449e97) will increase coverage by 0.05%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #144      +/-   ##
==========================================
+ Coverage   54.44%   54.50%   +0.05%     
==========================================
  Files          23       23              
  Lines        1552     1554       +2     
  Branches      331      331              
==========================================
+ Hits          845      847       +2     
  Misses        582      582              
  Partials      125      125              
Flag Coverage Δ
unittests 54.50% <100.00%> (+0.05%) ⬆️

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

Impacted Files Coverage Δ
mim/__init__.py 100.00% <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 b449e97...c8703b7. Read the comment docs.

@ice-tong
Copy link
Collaborator Author

This workaround works fine, but I'm not sure if good enough to merge into the master branch. Please give this PR a review. @zhouzaida

@ice-tong ice-tong requested a review from zhouzaida June 25, 2022 15:57
@ice-tong ice-tong changed the title [Fix]: fix the mim command crashes due to requirements version conflict [Fix]: fix mim command crashes problem if requirements version conflict Jun 25, 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.

mim could be crash if exist version conflict
1 participant