Skip to content

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

Open
ice-tong wants to merge 2 commits into
open-mmlab:mainfrom
ice-tong:yancong-fix-list
Open

[Fix]: fix mim command crashes problem if requirements version conflict#144
ice-tong wants to merge 2 commits into
open-mmlab:mainfrom
ice-tong:yancong-fix-list

Conversation

@ice-tong

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

Copy link
Copy Markdown
Collaborator

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

codecov Bot commented Jun 25, 2022

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 54.50%. Comparing base (b449e97) to head (c8703b7).
⚠️ Report is 45 commits behind head on main.

Additional details and impacted files
@@            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.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ice-tong

Copy link
Copy Markdown
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