pyextal.jaxGeo.cli¶
Command line for jaxGeo.refine.refine.
Every option’s default comes from a RefineSettings, so a dataset script sets its own defaults and keeps the whole command line:
from pyextal.jaxGeo import cli
raise SystemExit(cli.main(doc=__doc__, h5=H5, tile=16, geo_max_block=12.0))
python <script> --help then prints the script’s docstring, the method, and
every option with the script’s defaults.
Functions¶
|
|
|
The argument parser, with defaults taken from |
|
Parses the command line and runs the refinement. |
Module Contents¶
- pyextal.jaxGeo.cli._path_or_none(text)¶
- pyextal.jaxGeo.cli.build_parser(defaults=None, doc=None)¶
The argument parser, with defaults taken from
defaults.- Parameters:
defaults (RefineSettings, optional) – Supplies every default.
doc (str, optional) – Text printed by
--helpbefore the method.
- Returns:
argparse.ArgumentParser
- pyextal.jaxGeo.cli.main(argv=None, doc=None, **defaults)¶
Parses the command line and runs the refinement.
- Parameters:
argv (list, optional) – Arguments;
sys.argv[1:]when None.doc (str, optional) – The calling script’s docstring, for
--help.**defaults – RefineSettings fields to use as defaults.
- Returns:
Exit code – 0 on success, 1 if the simulation after the refinement failed (the parameters are then in a rescue
.npz).- Return type:
int