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

add setup_job_directory shortcut #98

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions sisyphus/shortcuts.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,15 @@ def add_subparsers(parsers):
help='All config files that will be loaded')
parser_remove_job_and_descendants.set_defaults(func=remove_job_and_descendants)

parser_setup_job_directory = sc_subparsers.add_parser(
"setup_job_directory",
help="setup a job that is marked as runnable manually"
)
parser_setup_job_directory.add_argument("--job", help="job path")
parser_setup_job_directory.add_argument('argv', metavar='ARGV', type=str, nargs='*',
help='All config files that will be loaded')
parser_setup_job_directory.set_defaults(func=setup_job_directory)

parser_show_jobs_in_webserver = sc_subparsers.add_parser(
'show_jobs_in_webserver',
help="Start webserver which shows all given jobs")
Expand Down Expand Up @@ -188,6 +197,13 @@ def remove_job_and_descendants(args):
call_sis(call)


def setup_job_directory(args):
for conf_file in args.argv:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does passing all config files at once cause problems?

call = ['console', conf_file, '--script', '-c',
'tk.setup_job_directory(tk.sis_graph.find("%s")[0])' % (args.job)]
call_sis(call)


def show_job_in_webserver(args):
call = ['console', '--script']
for job in args.job:
Expand Down