Skip to content
This repository was archived by the owner on Aug 11, 2020. It is now read-only.

Commit 325038f

Browse files
committed
change run options required fields; add no_logging and ignoreFiles run options
1 parent 0eeca64 commit 325038f

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

paperspace/main.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,20 +70,21 @@ def main():
7070
opt = args.pop(0)
7171
if opt.startswith('--'):
7272
param = opt[2:]
73-
if param in ['script', 'python', 'apiKey', 'container', 'machineType', 'name', 'project', 'projectId', 'command',
74-
'workspace', 'dataset', 'registryUsername', 'registryPassword', 'workspaceUsername', 'workspacePassword']:
73+
if param in ['script', 'python', 'conda', 'ignoreFiles', 'apiKey', 'container', 'machineType', 'name',
74+
'project', 'projectId', 'command', 'workspace', 'dataset', 'registryUsername', 'registryPassword',
75+
'workspaceUsername', 'workspacePassword']:
7576
if args and not args[0].startswith('--'):
7677
params[param] = args.pop(0)
7778
else:
7879
print('error: missing argument for %s' % opt)
7980
print('usage: %s' % run_usage(prog))
8081
sys.exit(1)
81-
elif param in ['init', 'req', 'pipenv']:
82+
elif param in ['init', 'pipenv', 'req']:
8283
params[param] = True
8384
if args and not args[0].startswith('--') and not args[0].endswith('.py'):
8485
params[param] = args.pop(0)
85-
elif param in ['conda', 'no_logging']:
86-
params[param] = True
86+
elif param in ['no_logging', 'nologging', 'noLogging', 'json']:
87+
params['no_logging'] = True
8788
else:
8889
print('error: invalid option: %s' % opt)
8990
print('usage: %s' % run_usage(prog))
@@ -121,7 +122,7 @@ def apikey_usage(prog):
121122

122123

123124
def run_usage(prog):
124-
return format('%s run <python_script.py> [--python 2 | 3] [--conda] [--init [<script.sh>] | --req [<requirements.txt>] | --pipenv [<Pipfile>[,<Pipfile.lock>]]]' % prog)
125+
return format('%s run <python_script.py> [--python 2 | 3] [--init [<init.sh>]] [--conda <env>] [--pipenv [Pipfile,Pipfile.lock]] [--req [<requirements.txt>] |' % prog)
125126

126127

127128
def usage(prog):

0 commit comments

Comments
 (0)