Skip to content

Centralize SkyPortal config #7

Description

@MenesesCarlos29

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

Metadata

Metadata

Labels

No labels
No labels

Type

No fields configured for Task.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions