Skip to content

Commit

Permalink
[Feature] Support 'python -m mim' usage (#158)
Browse files Browse the repository at this point in the history
* feat(mim): support 'python -m mim' usage

* feat(mim): add test mim cli test

* move mim cli test to build.yml
  • Loading branch information
ice-tong authored Sep 3, 2022
1 parent f989842 commit 6b36c8e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,10 @@ jobs:
- name: Build and install
run: rm -rf .eggs && python -m pip install -e .
- name: Validate the installation
run: python -c "import mim"
run: |
python -c "import mim"
mim --help
python -m mim --help
- name: Install unittest dependencies
run: python -m pip install -r requirements/tests.txt
- name: Run unittests and generate coverage report
Expand Down
6 changes: 6 additions & 0 deletions mim/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Copyright (c) OpenMMLab. All rights reserved.
"""With this module, we can use `python -m mim`."""
from .cli import cli

if __name__ == '__main__':
cli()

0 comments on commit 6b36c8e

Please sign in to comment.