The current SkyPortal scripts duplicate settings such as API base URL, output paths, request defaults, and inventory parameters. This task is to move shared runtime settings into a versioned SkyPortal config file, while keeping secrets in .env.
The goal is to support reusable inventory profiles for
02_fetch_source_inventory.py and
01_audit_endpoint_availability.py.
Scope:
- create
extraction/skyportal.yaml with shared settings such as:
base_url
- output directories
- request defaults (
timeout, sleep, max_retries, num_per_page)
- reusable inventory profiles such as
recent_500, has_spectrum,
has_followup, classified, redshift, gcn, ep
- add a reusable Python config loader that:
- reads the YAML file
- validates required sections
- exposes config values in a format the scripts can use
- update
02_fetch_source_inventory.py so it can:
- read defaults from config
- run inventory profiles by name
- still allow CLI arguments to override config values
- update
01_audit_endpoint_availability.py so it can:
- read shared defaults from config
- reuse config values such as
base_url, output paths, timeout, and sleep
- update documentation to explain:
- what goes in
skyportal.yaml
- what stays in
.env
- how to run scripts with profiles
- how CLI overrides work
Out of scope:
- moving API tokens or secrets to YAML
- moving the endpoint specification list out of Python
Acceptance criteria:
extraction/skyportal.yaml exists and is documented
02_fetch_source_inventory.py can execute inventory profiles by name
01_audit_endpoint_availability.py can read shared defaults from config
- CLI arguments override config values when both are provided
.env remains the source of secrets
- related documentation is updated
The current SkyPortal scripts duplicate settings such as API base URL, output paths, request defaults, and inventory parameters. This task is to move shared runtime settings into a versioned SkyPortal config file, while keeping secrets in
.env.The goal is to support reusable inventory profiles for
02_fetch_source_inventory.pyand01_audit_endpoint_availability.py.Scope:
extraction/skyportal.yamlwith shared settings such as:base_urltimeout,sleep,max_retries,num_per_page)recent_500,has_spectrum,has_followup,classified,redshift,gcn,ep02_fetch_source_inventory.pyso it can:01_audit_endpoint_availability.pyso it can:base_url, output paths, timeout, and sleepskyportal.yaml.envOut of scope:
Acceptance criteria:
extraction/skyportal.yamlexists and is documented02_fetch_source_inventory.pycan execute inventory profiles by name01_audit_endpoint_availability.pycan read shared defaults from config.envremains the source of secrets