feat: add weather provider and AviationWeather#795
Merged
Conversation
|
Please check on sonarcloud https://sonarcloud.io/project/pull_requests_list?id=io.github.mivek%3AmetarParser that the PR does not add any issue. |
…ther providers Introduce a WeatherProvider interface and Strategy pattern to decouple weather data fetching from the service layer, eliminating the NOAA single point of failure. - Add WeatherProvider interface with retrieveMetar() and retrieveTaf() - Add AbstractWeatherProvider base class with shared HTTP utilities (checkIcao, buildRequest, getHttpResponse) - Add NOAAWeatherProvider: moves existing NOAA fetching logic from AbstractWeatherCodeService and TAFService (including TAF reformatting) - Add AviationWeatherProvider: new provider using https://aviationweather.gov/api/data endpoints; strips METAR/SPECI report-type prefixes for parser compatibility - Refactor AbstractWeatherCodeService to accept a WeatherProvider - Add MetarService.withProvider() and TAFService.withProvider() factory methods to create services with any provider - Default singleton instances continue to use NOAAWeatherProvider - Add integration tests for both providers verifying raw strings can be parsed end-to-end - Add NOAAWeatherProviderTest with format() branch coverage tests - Update CONTRIBUTING.md with instructions for adding a new provider Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add detailed section explaining: - WeatherProvider interface and contract - Built-in NOAA and AviationWeather providers - AbstractWeatherProvider base class with shared HTTP utilities - Factory methods withProvider() for custom provider instantiation - Instructions for adding new providers - Link to CONTRIBUTING.md for step-by-step guide Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
d846898 to
119b585
Compare
|
|
🎉 This PR is included in version 2.23.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



No description provided.