Skip to content

Commit eb5c5c6

Browse files
authored
Fix mmaction2 package name and run script (#113)
* Fix mmaction2 package name and run script * Update customcommand.py
1 parent d8f00ed commit eb5c5c6

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

mim/click/autocompletion.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def get_official_package(ctx=None, args=None, incomplete=None):
2424
'mmdet',
2525
'mmdet3d',
2626
'mmseg',
27-
'mmaction',
27+
'mmaction2',
2828
'mmtrack',
2929
'mmpose',
3030
'mmedit',

mim/click/customcommand.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ def format_help(self, ctx: Context, formatter: HelpFormatter) -> None:
5858
if repo and repo in repos and is_installed(repo):
5959
self.name = 'train' if self.name == 'search' else self.name
6060
script = osp.join(
61-
get_installed_path(repo), f'tools/{self.name}.py')
61+
get_installed_path(repo), '.mim', 'tools',
62+
f'{self.name}.py')
6263
ret = subprocess.check_output(
6364
['python', '-u', script, '--help'])
6465
color_echo(
@@ -82,7 +83,7 @@ def format_help(self, ctx: Context, formatter: HelpFormatter) -> None:
8283
if command:
8384
repo_root = get_installed_path(repo)
8485
files = recursively_find(
85-
osp.join(repo_root, 'tools'), command + '.py')
86+
osp.join(repo_root, '.mim', 'tools'), command + '.py')
8687
if len(files) == 0:
8788
exit_with_error(
8889
f"The command {command} doesn't exist in codebase "
@@ -98,7 +99,7 @@ def format_help(self, ctx: Context, formatter: HelpFormatter) -> None:
9899
click.echo(ret.decode('utf-8'))
99100
else:
100101
repo_root = get_installed_path(repo)
101-
tool_root = osp.join(repo_root, 'tools')
102+
tool_root = osp.join(repo_root, '.mim', 'tools')
102103
walk_list = list(os.walk(tool_root))
103104

104105
files = []

0 commit comments

Comments
 (0)