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

Fixed -S option to tell you the tasks if no task is specified #65

Merged
merged 1 commit into from
Sep 6, 2021
Merged
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
3 changes: 2 additions & 1 deletion run.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ def get_syntax():
taskname = ["DATAPREP", "SIM", "LCFIT", "CLASSIFY", "AGG", "MERGE", "BIASCOR", "CREATE_COV", "COSMOMC", "ANALYSE"]
for i, name in enumerate(taskname):
syntax[name] = tasks[i]
syntax["options"] = f"Possible tasks are: ({[(i, task) for i, task in enumerate(taskname)]})"
return syntax

def print_syntax(s):
Expand Down Expand Up @@ -169,7 +170,7 @@ def get_args(test=False):
parser.add_argument("-c", "--check", help="Check if config is valid", action="store_true", default=False)
parser.add_argument("-p", "--permission", help="Fix permissions and groups on all output, don't rerun", action="store_true", default=False)
parser.add_argument("-i", "--ignore", help="Dont rerun tasks with this stage or less", default=None)
parser.add_argument("-S", "--syntax", help="Get the syntax of the given task.", default=None, type=str)
parser.add_argument("-S", "--syntax", help="Get the syntax of the given task.", default=None, const="options", type=str, nargs='?')
args = parser.parse_args()

if args.syntax is not None:
Expand Down