Skip to content

feature: Integrating MeteoBlue into the providers package #12

@yendelevium

Description

@yendelevium

Feature Request

Summary

To integrate MB into the providers package

  • Structure MB models and processes
  • Unmarshal the data returned by MB into the baseData struct (plumber pkg)

Motivation

MB will be the primary provider for meteomunch, so proper integration is required. Then, the other data can be filled in by other providers like open-meteo, Copernicus etc

Detailed Design

The way baseData is structed, it has separate fields for current, hourly and daily data. MB's data is different, and it doesn't get cleanly translated into baseData.
We could create intermediate models for current, hourly and daily data, unmarshal MB data into all three separately, and then add them to the baseData struct.

Alternatives

  • Remove the current, hourly, and daily nested structs from baseData, and directly store the fields we want into the baseData struct. This removes the intermediate structs proposed in the first solution, at the cost of bloating up the baseData struct.

Additional Context

We would also need to pass this struct around to other providers(if available) to fill in data MB missed or doesn't provide, and then return this data back to the service which called it. The faster we can do this, the better.
We should also be able to extract the hourly,daily, and current data (incase we decide to go with the alternative option, I'm assuming we can probably access them via the baseData struct if we go with the proposed solution)

Acceptance Criteria

  • MB Data must be successfully translated to the baseData struct
  • The hourly, daily, and current data must be accessible separately

Additional Information

References #5

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsDecisionThe issue is understood, but the best solution is undecided. Wait for a decision before writing codeenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions