Skip to content

v2.0.0: Oil meets weather, now called heizsaison

Choose a tag to compare

@github-actions github-actions released this 11 Oct 12:57
· 13 commits to main since this release
v2.0.0
0b809e8

The project now covers more than oil prices. v2.0.0 adds a second binary that collects daily weather data from five providers, so you can relate heating oil prices to the actual heating season. To match, the whole project is renamed to heizsaison: module, binaries, images, metrics and database. Many internals were also consolidated.

⚠️ Breaking changes

  • Go module: github.com/andygrunwald/oil-price-scraper → github.com/andygrunwald/heizsaison. go install users must switch to the new path.
  • Binaries: oilscraper / weatherscraper → heizsaison-oil / heizsaison-weather
  • Docker images: ghcr.io/andygrunwald/oil-price-scraper → ghcr.io/andygrunwald/heizsaison-oil (weather: heizsaison-weather)
  • Prometheus metrics: oilscraper_* → heizsaison_oil_*, weatherscraper_* → heizsaison_weather_*. Old series are not aliased, so dashboards and alerts must be updated.
  • Database and role: oil / oilscraper → heizsaison. Migrate before upgrading:
    ALTER DATABASE oil RENAME TO heizsaison;
    ALTER ROLE oilscraper RENAME TO heizsaison;
    Table names oil_prices and weather_observations are unchanged.
  • Config behaviour: the SCRAPE_HOUR and PROVIDERS env vars now take effect (before, they were silently ignored). Check your env for values you didn't intend.

Features

  • New weather binary with the same commands (run, scrape, backfill, version), its own Docker image and a Compose service on port 8081
  • 5 weather providers:
    • Open-Meteo: no API key, history back to 1940
    • Bright Sky: DWD data, aggregated from hourly to daily
    • Visual Crossing: API key required
    • OpenWeather One Call 3.0: API key required
    • DWD CDC-OpenData: official station data, automatic nearest-station lookup, 50+ years of history
  • New weather_observations table
  • --providers accepts repeated or comma-separated values

Bug fixes

  • run/scrape/backfill flags are now bound to the config, so SCRAPE_HOUR, PROVIDERS and the backfill config are no longer dead
  • CLI help no longer says "MySQL"

Internal and docs

  • Merged duplicate packages (weatherscraper, weatherapi, weatherhttp, weatherconfig) into shared ones. Added the internal/numeric helpers and the first scraper tests, including a race test.
  • README rewritten. New docs/ for configuration, HTTP endpoints, development, providers, debug logging and example SQL queries.
Full commit list
  • 3d5ce15 Add DWD CDC-OpenData weather provider
  • db0e687 Add weather data scraping support with 4 providers
  • 2c268ec Bump github.com/jackc/pgx/v5 from 5.8.0 to 5.9.2
  • 6f31bd4 Check error return value of deferred Close calls
  • 8d871e3 Consolidate the four float64Ptr copies into internal/numeric
  • d4f2548 Document how to enable debug logging
  • c118df4 Extract HTTP endpoint documentation into docs/HTTP_ENDPOINTS.md
  • 406687d Extract configuration reference into docs/CONFIGURATION.md
  • 86d3453 Extract development guide into docs/DEVELOPMENT.md
  • 35b197f Extract oil price operations into internal/database/oil.go
  • 825eafb Extract oil price types into internal/models/oil.go
  • ee5c4b9 Extract slice aggregation helpers into internal/numeric
  • 923edc9 Give each dockers_v2 block a unique ID
  • 4a3717c Ignore the weatherscraper binary
  • 50b6f62 Merge internal/weatherapi into internal/api
  • 31c2bec Merge internal/weatherconfig into internal/config
  • 9851fc8 Merge internal/weatherhttp into internal/http
  • 4c37ddc Merge internal/weatherscraper into internal/scraper
  • 182d1c6 Pin golangci-lint and track it with Renovate
  • 487e089 Pin the GitHub Actions runners to ubuntu-24.04
  • 2af082d Pin the goreleaser CLI version
  • 711310f Rename 001_initial_schema.sql to 001_oil_schema.sql
  • d9f06d5 Rename Go module and binaries to heizsaison
  • de2d4fa Rename Prometheus metric namespaces to heizsaison
  • b5ee022 Rename migrations/ to database-schema/
  • 41fd428 Rename the Postgres database and role to heizsaison
  • 263bfb5 Rewrite README.md as a concise entry point
  • b26c990 Run CI checks through the make targets
  • 8462903 Track staticcheck as a Go tool dependency
  • 2141606 Update CLI help and package docs for the heizsaison rename
  • 149551f Update README and documentation for the heizsaison rename
  • 041f956 Update actions/checkout action to v7
  • 073cac9 Update actions/setup-go action to v7
  • 8eae3bf Update alpine Docker tag to v3.23
  • 64e6c3e Update alpine Docker tag to v3.24
  • 6a1cb6c Update alpine Docker tag to v3.24
  • 2aba9ba Update codecov/codecov-action action to v7
  • aa48d8d Update dependency go to 1.27
  • ab1a82f Update dependency golangci/golangci-lint to v2.14.0
  • 736e389 Update dependency goreleaser/goreleaser to v2.18.3
  • 166cbf8 Update dependency ubuntu to v26
  • dc3972a Update module github.com/jackc/pgx/v5 to v5.10.0
  • 155b1f3 Update module github.com/jackc/pgx/v5 to v5.11.0
  • f210008 Update module github.com/prometheus/client_golang to v1.24.1
  • d020237 Update module github.com/prometheus/client_golang to v1.25.0
  • 5bde257 Update module github.com/rs/zerolog to v1.35.1
  • 85bf2d0 Update postgres Docker tag to v18.6
  • 6d368b9 Wire the run, scrape and backfill flags to the config
  • 9f52417 build: Rename build targets to build-oilscraper and build-weatherscraper
  • f2c7f31 chore(deps): update dependency go to 1.26
  • 7a1ff86 chore(deps): update docker/login-action action to v4
  • 5010844 chore(deps): update docker/setup-buildx-action action to v4
  • e848b8d chore(deps): update goreleaser/goreleaser-action action to v7
  • 161d12b go fmt ./...