Skip to content

Finland#112

Open
thiagovmdon wants to merge 2 commits intomainfrom
finland
Open

Finland#112
thiagovmdon wants to merge 2 commits intomainfrom
finland

Conversation

@thiagovmdon
Copy link
Copy Markdown
Collaborator

Title

Related to issue #65

Body

Summary

  • Add a new Finland fetcher backed by SYKE Hydrologiarajapinta.
  • Support discharge_daily_mean, stage_daily_mean, and water-temperature_daily_mean.
  • Use SYKE Paikka_Id as gauge_id, since Nro is not unique across variables.
  • Add cached Finland metadata for the supported station set.
  • Add raw-payload unit tests and a small example fetcher script.
  • Align the Sphinx API page with the Germany Berlin structure:
    Data source, Supported variables, Data description and API, Terms of use, plus the method docs.
  • Fix long-range downloads by splitting requests into 365-day windows.

Why the chunking fix is needed

SYKE truncates filtered OData time-series responses at 500 rows and does not return a usable odata.nextLink for these requests. Without chunking, multi-year downloads stop early. This PR avoids that by requesting long date ranges in smaller windows and concatenating the results.

Verification

  • ./.venv/bin/python -m unittest discover -s tests -p 'test*.py'
  • ./.venv/bin/ruff check .
  • ./.venv/bin/ruff format --check .
  • ./.venv/bin/sphinx-build -M html docs docs/_build -a -E

Live checks

  • Discharge: gauge 897, 2025-01-01 to 2026-03-27 returns 451 rows after the chunking fix.
  • Stage: gauge 1900, 2025-01-01 to 2026-03-27 returns 450 available rows.
  • Temperature: gauge 3094, 2025-01-01 to 2026-01-01 returns 260 available rows.

@thiagovmdon thiagovmdon requested a review from kratzert as a code owner March 27, 2026 09:59
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