Skip to content

get_pestpp

Download and install the PEST++ software suite.

This script originates from pyemu: https://github.com/pypest/pyemu This file can be downloaded and run independently outside pyemu. It requires Python 3.6 or later, and has no dependencies.

See https://developer.github.com/v3/repos/releases/ for GitHub Releases API.

cli_main()

Command-line interface.

columns_str(items, line_chars=79)

Return str of columns of items, similar to 'ls' command.

get_bindir_options(previous=None)

Generate install location options based on platform and filesystem access.

get_ostag()

Determine operating system tag from sys.platform.

get_release(owner=None, repo=None, tag='latest', quiet=False)

Get info about a particular release.

get_releases(owner=None, repo=None, quiet=False, per_page=None)

Get list of available releases.

get_request(url, params={})

Get urllib.request.Request, with parameters and headers.

This bears GITHUB_TOKEN if it is set as an environment variable.

run_main(bindir, owner=default_owner, repo=default_repo, release_id='latest', ostag=None, subset=None, downloads_dir=None, force=False, quiet=False, _is_cli=False)

Run main method to get the PEST++ software suite.

Parameters

bindir : str or Path Writable path to extract executables. Auto-select options start with a colon character. See error message or other documentation for further information on auto-select options. owner : str, default "usgs" Name of GitHub repository owner (user or organization). repo : str, default "pestpp" Name of GitHub PEST++ repository. release_id : str, default "latest" GitHub release ID. ostag : str, optional Operating system tag; default is to automatically choose. subset : list, set or str, optional Optional subset of executables to extract, specified as a list (e.g.) ["pestpp-glm", "pestpp-ies"] or a comma-separated string "pestpp-glm,pestpp-ies". downloads_dir : str or Path, optional Manually specify directory to download archives. Default is to use home Downloads, if available, otherwise a temporary directory. force : bool, default False If True, always download archive. Default False will use archive if previously downloaded in downloads_dir. quiet : bool, default False If True, show fewer messages. _is_cli : bool, default False Control behavior of method if this is run as a command-line interface or as a Python function.

select_bindir(bindir, previous=None, quiet=False, is_cli=False)

Resolve an install location if provided, or prompt interactive user to select one.