Make weather class and fix test XML#13
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a new weather_data_fetcher class to encapsulate weather data retrieval from NOAA and updates associated tests and XML examples to ensure correct data handling. Key changes include:
- Adding the weather_data_fetcher R6 class in R/weather_data_fetcher.R.
- Updating tests in tests/ to validate the new weather_data_fetcher functionality and ensuring proper XML format in test data.
- Refactoring utility functions in R/bsync_utils.R and updating documentation and configuration files.
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_weather_data_fetcher.R | Added tests for verifying weather_data_fetcher behavior and error conditions. |
| tests/test_bsyncr.R | Introduced an additional test case for dataframe creation using the new XML file. |
| tests/data/ex_bsync_2.xml | Updated the test XML to the correct format. |
| tests/bsyncr_example.Rmd | Revised example Rmd to reference ex_bsync_2.xml and integrate weather_data_fetcher usage. |
| cspell.json | Updated spelling dictionary entries for new terms. |
| README.md | Modified installation instructions to include custom CRAN repo for styler. |
| R/weather_data_fetcher.R | Added the weather_data_fetcher class to fetch and process weather data using rnoaa functions. |
| R/bsync_utils.R | Refactored XML parsing to utilize weather_data_fetcher for retrieving weather data. |
| NAMESPACE | Adjusted exports accordingly. |
| .lintr | Created new linter configuration for consistent style rules. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
kflemin
approved these changes
May 9, 2025
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.
see c2a220f#diff-6c40cc6729b8e63472133cbd4dea203250af8e30877087f6b25170c15e823eebR73, you don't need to fix the IntervalFrequency and you don't really need the EndTimeStamp.
You don't need to pull in these changes to run the latest bsyncr-server, fixing the XML output from SEED should suffice.