Skip to content

Commit

Permalink
Merge pull request #1064 from mjuric/minimal-cmdline-update
Browse files Browse the repository at this point in the history
  • Loading branch information
mschwamb authored Nov 23, 2024
2 parents 83a8799 + b7935c9 commit 3bf965d
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 19 deletions.
2 changes: 1 addition & 1 deletion src/sorcha/utilities/sorcha_demo_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def get_demo_command():
working sorcha demo command
"""

return "sorcha run -c sorcha_config_demo.ini -p sspp_testset_colours.txt -ob sspp_testset_orbits.des -pd baseline_v2.0_1yr.db -o ./ -t testrun_e2e -st testrun_stats"
return "sorcha run -c sorcha_config_demo.ini -p sspp_testset_colours.txt --orbits sspp_testset_orbits.des --pointing-db baseline_v2.0_1yr.db -o ./ -t testrun_e2e --stats testrun_stats"


def print_demo_command(printall=True):
Expand Down
3 changes: 3 additions & 0 deletions src/sorcha_cmdline/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,20 @@ def main():
parser = argparse.ArgumentParser(
description=description, epilog=epilog_text, formatter_class=argparse.RawDescriptionHelpFormatter
)

parser.add_argument(
"--version",
help="Print version information",
dest="version",
action="store_true",
)

parser.add_argument("verb", nargs="?", choices=available_verbs, help="Verb to execute")
parser.add_argument("args", nargs=argparse.REMAINDER, help="Arguments for the verb")

args = parser.parse_args()

# intercept global options (just version, for now)
if args.version:
import sorcha

Expand Down
36 changes: 18 additions & 18 deletions src/sorcha_cmdline/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,24 +26,24 @@ def main():
required=True,
)
required.add_argument(
"-ob",
"--orbit",
help="Orbit file name",
"--ob",
"--orbits",
help="Orbit catalog file name",
type=str,
dest="ob",
required=True,
)
required.add_argument(
"-p",
"--params",
help="Physical parameters file name",
"--physical-parameters",
help="Catalog of object physical parameters",
type=str,
dest="p",
required=True,
)
required.add_argument(
"-pd",
"--pointing_database",
"--pd",
"--pointing-db",
help="Survey pointing information",
type=str,
dest="pd",
Expand All @@ -52,35 +52,35 @@ def main():

optional = parser.add_argument_group("Optional arguments")
optional.add_argument(
"-er",
"--ephem_read",
"--er",
"--ephem-read",
help="Previously generated ephemeris simulation file name, required if ephemerides_type in config file is 'external'.",
type=str,
dest="er",
required=False,
default=None,
)
optional.add_argument(
"-ew",
"--ephem_write",
"--ew",
"--ephem-write",
help="Output file name for newly generated ephemeris simulation, required if ephemerides_type in config file is not 'external'.",
type=str,
dest="ew",
required=False,
default=None,
)
optional.add_argument(
"-ar",
"--ar_data_path",
"--ar",
"--ar-data-path",
help="Directory path where Assist+Rebound data files where stored when running bootstrap_sorcha_data_files from the command line.",
type=str,
dest="ar",
required=False,
)
optional.add_argument(
"-cp",
"--complex_physical_parameters",
help="Complex physical parameters file name",
"--cp",
"--complex-physical-parameters",
help="Catalog of object complex physical parameters",
type=str,
dest="cp",
)
Expand All @@ -101,14 +101,14 @@ def main():
optional.add_argument(
"-v",
"--verbose",
help="Verbosity. Default currently true; include to turn off verbosity.",
help="Print additional information to log while running",
dest="v",
default=True,
action="store_false",
)

optional.add_argument(
"-st",
"--st",
"--stats",
help="Output summary statistics table to this stem filename.",
type=str,
Expand Down

0 comments on commit 3bf965d

Please sign in to comment.