Ticket Info Extract
Data analysis utilities for SKA Low operations.
Contains functions to extract Jira tickets from spreadsheets and generate summaries in CSV/XLSX format.
The utilities assume access to an operations-time dataframe that can be loaded into
a pandas DataFrame. They also rely on a configuration environment, which
may be provided through a .env file, and has to include variables such as
JIRA_AUTH, JIRA_BASE, and JIRA_PAT for authenticating with the
Jira REST API.
- ska_sci_ops_data_analysis.ticket_info_extract.ticket_info_extract()
Extract Jira ticket information from a dataframe and generate a summary file.
The function acts as a command-line entry point. It parses arguments, loads Jira configuration from environment variable, scans a single column of the input table for Jira ticket keys, fetches ticket summaries via the Jira REST API, and writes a table of unique tickets with their summaries and occurrence counts to an output dataframe.
The function is intended to be run from the command line and does not return a value. It prints progress information and a short summary to stdout.
Example usage:
#For Nightly Freq Sweep tab sheet run python3 ticket_info_extract.py Useful_operations_time.xlsx -o nightly_freq_sweep.xlsx -c "SPRTS or SKB ticket" -s "Nightly Freq Sweep" --env ini.env #For Sci Ops Logs tab sheet run python3 ticket_info_extract.py Useful_operations_time.xlsx -o sci_op_logs.xlsx -c "SPRTS or SKB ticket" -s "Sci Ops Logs" --env ini.env
- Raises:
SystemExit – If required environment variables are missing or invalid, the input file type is unsupported, the requested column is absent, no matching ticket keys are found, or an invalid authentication mode is configured. When
--list-sheetsis used, a clean exit with status code0is also triggered.