Skip to content

wellcast.cli

cli

Command-line interface, installed as the wellcast command.

Commands::

wellcast --version
wellcast qc <file>                 # data-quality report
wellcast dca <file> --well <name>  # decline fit and EUR
wellcast demo                      # write a synthetic data set to CSV
wellcast app                       # launch the Streamlit app

Exit codes: 0 success, 1 a wellcast error (bad data, failed fit, missing extra), 2 invalid command-line usage.

find_app

find_app() -> Path

Locate the Streamlit entry script.

Returns:

Type Description
Path

streamlit_app.py shipped inside the installed package, or the repository copy when running from a source checkout.

Raises:

Type Description
WellcastError

If neither location exists.

build_parser

build_parser() -> argparse.ArgumentParser

Build the argument parser for the wellcast command.

Returns:

Type Description
ArgumentParser

Parser with the qc, dca, demo and app subcommands.

main

main(argv: Sequence[str] | None = None) -> int

Run the wellcast command.

Parameters:

Name Type Description Default
argv sequence of str

Arguments without the program name. Default: sys.argv[1:].

None

Returns:

Type Description
int

Exit status.

Examples:

>>> main(["--version"])
Traceback (most recent call last):
...
SystemExit: 0