Skip to content

Sweden#111

Open
thiagovmdon wants to merge 3 commits intomainfrom
sweden
Open

Sweden#111
thiagovmdon wants to merge 3 commits intomainfrom
sweden

Conversation

@thiagovmdon
Copy link
Copy Markdown
Collaborator

Summary

Related to issue #30

This PR aligns the Sweden fetcher with the RivRetrieve fetcher design and test standards, rebases the branch onto current main, and updates the Sweden variable mapping to reflect the documented SMHI daily cadence for stage and stream temperature.

What changed

  • rebased sweden onto updated main and cleaned the branch history
  • rewrote the Sweden fetcher to follow the Denmark/Switzerland structure
  • standardized metadata and empty-result handling
  • switched Sweden downloads to the SMHI HydroObs JSON API pattern with retry sessions
  • added Sweden unit tests using real raw API payloads stored in tests/test_data/
  • added a Sweden example script
  • added Sweden API docs pages to Sphinx
  • updated the Sweden rendered API page to use:
    • Data source
    • Supported variables
    • Data description and API
    • Terms of use
    • Notes
  • kept Notes as an explicit Sweden exception requested during review
  • mapped Sweden variables as:
    • DISCHARGE_DAILY_MEAN -> parameter 1
    • DISCHARGE_INSTANT -> parameter 2
    • STAGE_DAILY_MEAN -> parameter 3
    • WATER_TEMPERATURE_DAILY_MEAN -> parameter 4
    • DISCHARGE_MONTHLY_MEAN -> parameter 10
  • converted stage from cm to m
  • renamed the Sweden stage and water-temperature test fixtures to match the normalized daily variable names

Documentation basis

Fetcher checked against:

  • docs/design_docs/data_fetcher.md
  • docs/design_docs/data_fetcher_test.md

For SMHI semantics, I checked the official SMHI HydroObs/API documentation and normalized stage and water temperature to daily mean constants after confirming the provider documents them as daily measurements.

@thiagovmdon thiagovmdon requested a review from kratzert as a code owner March 26, 2026 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant