Python API#
Gecko is mainly a command-line tool. These modules are documented for contributors and for scripting. The API isn’t stable yet and may change between minor releases.
gecko.triage#
Core Gecko triage workflow.
Triage aspects of any observatory system or instrument to provide a quick overview of the system health and status at any point. Specifically designed for execution at a crash or issue during observation.
Original author: Elijah Anakalea-Buckley
- exception gecko.triage.GeckoConfigError[source]#
Bases:
RuntimeErrorRaised when the Gecko configuration file is missing values or not initialized.
- class gecko.triage.Triagetools(config: str, message: str = '', init=False)[source]#
Bases:
objectCollect diagnostics and build a Gecko report bundle.
- Parameters:
config – Path to an initialized Gecko
.iniconfiguration file.message – User-provided description written at the top of the report.
init – When true, interactively prompt for every setting and write
configinstead of loading it.
gecko.config#
Locate and create Gecko configuration files.
Lookup order used by resolve_config_path():
An explicit path (
--config).The
GECKO_CONFIGenvironment variable.The per-user file
$XDG_CONFIG_HOME/gecko/gecko.ini(default~/.config/gecko/gecko.ini).The system-wide file
/etc/gecko/gecko.ini.A legacy
triage_package/triage.inifrom a pre-0.2 source checkout, if it was initialized.
- gecko.config.legacy_config_paths()[source]#
Return candidate locations of a pre-0.2
triage_package/triage.ini.
- gecko.config.is_initialized(path)[source]#
Return True if
pathis a readable config withSystem.initialized = true.
- gecko.config.resolve_config_path(explicit=None)[source]#
Return the config file Gecko should read.
If no existing file is found, the per-user path is returned so that error messages point the operator at the location
gecko -initwill create.
gecko.cli#
Command-line interface for Gecko.