-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Development for v6.2.0 #248
Merged
Merged
Conversation
This file contains 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
- rhub was overhauled with v2 (https://blog.r-hub.io/2024/04/11/rhub2/) - https://builder.r-hub.io is flagged with a "potential security risk" --> potential alternative is to use the "rhub" R package (https://cran.r-project.org/package=rhub)
based on https://github.com/r-lib/actions/tree/v2/examples * update "checkout" action to v4
- objects with all missing values are now passed through (instead of causing a cryptic error) - tests now check dbW_fixWeather() for "normal" use and for the case with all missing values
* Fix the calculation of relative humidity * Fix the count of days on which a missing weather value was replaced by a non-missing value from the preceding day for the method "LOCF"
See DrylandEcology/SOILWAT2#435 1) Updates to rSW2_set_weather_hist() are reflecting the changes in SOILWAT2's read_weather_hist() * rSW2_set_weather_hist() now uses relativeHumidity1() to calculate relative humidity from vapor pressure -- fixing first part of SOILWAT2 bug #435 * rSW2_set_weather_hist() gained argument "elevation" and now uses relativeHumidity2() to calculate relative humidity from specific humidity inputs and elevation -- fixing second part of bug #435 ** the conversion from specific to relative humidity is not exact, the code snaps estimated values within 100-150% to 100% relative humidity (with a warning) Consequently, * rSW2_setAllWeather() gained argument "elevation" which is passed to rSW2_set_weather_hist() * onSet_WTH_DATA() calls rSW2_setAllWeather(): thus, functions that call onSet_WTH_DATA() are now required to previously set "elevation". These are ** rSW_CTL_obtain_inputs() calls onSet_WTH_DATA(): now, obtaining weather data occurs after obtaining "site" data that includes elevation ** rSW2_processAllWeather() calls onSet_WTH_DATA(): now, copies "elevation" from inputData argument to global object that is utilized by onSet_WTH_DATA() *** dbW_generateWeather() calls rSW2_processAllWeather(): gained argument "elevation" **** dbW_imputeWeather() calls dbW_generateWeather(): gained argument "elevation" * rSW2_calc_SiteClimate() calls rSW2_setAllWeather(): gained argument "elevation" ** calc_SiteClimate() calls rSW2_calc_SiteClimate(): gained argument "elevation" 2) SOILWAT2's SW_WTH_read() now passes elevation as argument to readAllWeather(): thus, functions that call SW_WTH_read() are now required to previously set "elevation". These are * rSW2_readAllWeatherFromDisk() calls SW_WTH_read(): gained argument "elevation" ** getWeatherData_folders() calls rSW2_readAllWeatherFromDisk(): gained argument "elevation" *** dbW_addWeatherData() calls getWeatherData_folders(): gained argument "elevation" **** dbW_addFromFolders() calls dbW_addWeatherData(): argument "MetaData" gained new column "elevation" 3) Update "extdata/example1" from SOILWAT2, i.e., "data_weather_maca" was renamed to "data_weather_maca-type1", "data_weather_maca-type2" is a new dataset * update tests "Weather data sources" to handle new and renamed weather data sources
- update package data: only difference is the updated name of the weather data column for specific humidity - update test data: only difference is the updated name of the weather data column for specific humidity - rename specific humidity: weather_dataColumns() and weather_dataAggFun() * dbW_weatherData_to_monthly() and dbW_dataframe_aggregate() are now more careful with weather data column names - functionality to upgrade old weather data: * new weather_renamedDataColumns() identifies renaming of weather data columns * new upgrade_weatherColumns() applies renaming of weather data columns * upgrade_weatherDF() now calls upgrade_weatherColumns() -- satisfying sw_upgrade(), upgrade_swWeatherData(), and upgrade_weatherHistory() - updated functionality to test validity: * validObject() method for class "swWeatherData" now checks for expected column names in the "data" slot * new validObject_weatherHistory() to check for validity of a weatherHistory object * validObject() method for class "swInputData" now checks for a valid weatherHistory object -- previously weatherHistory was skipped
- documentation now includes the changes to classes "swWeather" and "swWeatherData" with v6.0.0
Closed
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #248 +/- ##
==========================================
+ Coverage 58.95% 59.26% +0.31%
==========================================
Files 44 44
Lines 8863 8899 +36
==========================================
+ Hits 5225 5274 +49
+ Misses 3638 3625 -13 ☔ View full report in Codecov by Sentry. |
N1ckP3rsl3y
approved these changes
Nov 27, 2024
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.
"%"
to"g kg-1"
) and name ("specHavg_pct"
to"specHavg_gPERkg"
)