solprop.cli#
The solprop command line: run, resume, check and export recipes (SEP 41, S1).
Six commands, parsed by _parser and dispatched by main():
solprop run recipe.toml -o out.h5 builds and runs a recipe, solprop resume
out.h5 continues it from the file and the recipe it records, solprop check
reports what stops it building, solprop export prints the equivalent
script, solprop scan is python -m solprop.scan, and solprop calibrate
measures, shows, exports, imports or forgets the native backend’s machine profile
(solprop.calibration.command, SEP 46). A run maps SIGINT and SIGTERM onto its
stop flag (_stopping), so the first signal writes its state and returns. The same
commands run as python -m solprop. The manual page is
docs/guide/setup/recipes.md.
Functions
|
Run the |
- solprop.cli.main(argv=None)[source]#
Run the
solpropcommand line.- Parameters:
- argvsequence of str or None, optional
The arguments, or
Nonefor the process’s own.
- Returns:
- int
The exit status: zero on success; one when
checkfinds an error in a recipe, or a calibration is inconclusive; two for refused arguments or input (a recipe or file that cannot be read or built) and for a run or scan that fails with a solprop error;128plus the signal’s number when a signal stopped a run.
Examples
>>> from solprop.cli import main >>> main(["check", "missing.toml"]) 2