Skip to content

Improve validation for public API inputs #43

Description

@wilsonfreitas

Context

Several invalid inputs currently fail late or with indirect errors. Examples include empty SGS code lists, unsupported output values, invalid currency side or groupby, regional economy mode values, and unsupported date inputs.

Scope

Add early validation for public API inputs and align docstrings with accepted types.

Branching

Create the implementation branch from project-health-hardening and merge the fix back into project-health-hardening before any merge to main.

Acceptance Criteria

  • Invalid inputs fail early with clear ValueError or project exceptions.
  • Empty SGS code lists no longer rely on pandas concat errors.
  • Public docstrings and type hints match supported inputs.
  • uv run pytest -m "not integration", Ruff, and mypy pass.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: currencyCurrency/PTAX scraping and exchange-rate APIarea: odataOData service discovery, metadata, query building, and endpointsarea: sgsSGS time series APIpriority: mediumModerate urgency or impacttype: refactorInternal refactoring without intended feature changes

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions