-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from Ciela-Institute/dev
Dev
- Loading branch information
Showing
3 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import argparse | ||
from ..save_load_jobs import save_bundle | ||
|
||
|
||
def parse_args(): | ||
# fmt: off | ||
parser = argparse.ArgumentParser(description='Initialize a bundle of jobs to run with SLURM') | ||
parser.add_argument('bundle', help='Name of the job bundle (JSON file containing multiple jobs/scripts to be scheduled).') | ||
# fmt: on | ||
args = parser.parse_known_args() | ||
return args | ||
|
||
|
||
def cli(): | ||
import sys | ||
import json | ||
|
||
args, script_args = parse_args() | ||
if script_args is None: | ||
sys.exit(1) | ||
print(json.dumps(vars(args), indent=4)) | ||
sys.exit(0) | ||
|
||
|
||
def main(): | ||
args = parse_args() | ||
save_bundle({}, args.bundle) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters