-
Notifications
You must be signed in to change notification settings - Fork 7
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
Initial implementation of updating Livneh weather DB extraction #331
base: master
Are you sure you want to change the base?
Conversation
* Created new branch * Changed demo/ and TestPrj4/ description files so user can choose between versions * Updated extract_daily_weather_from_livneh with version argument and pertinent if ... statement * Other arguments within WeatherDB.R for additional data source including finding ids and paths.
Codecov Report
@@ Coverage Diff @@
## master #331 +/- ##
==========================================
- Coverage 48.01% 47.87% -0.14%
==========================================
Files 40 40
Lines 16627 16679 +52
==========================================
+ Hits 7983 7985 +2
- Misses 8644 8694 +50
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Output from lintr checks test_file("tests/testthat/test_rSFSW2_StyleSpelllingPractices.R")
:
test_rSFSW2_StyleSpelllingPractices.R:29: failure: Package code style
Not lint free
R/WeatherDB.R:281:24: style: Only use double-quotes.
version = 'v2013',
^~~~~~~
R/WeatherDB.R:300:24: style: Only use double-quotes.
version = 'v2016',
^~~~~~~
R/WeatherDB.R:1451:5: style: Place a space before left parenthesis, except in a function call.
if(version == 'v2013') {
^
R/WeatherDB.R:1451:17: style: Only use double-quotes.
if(version == 'v2013') {
^~~~~~~
R/WeatherDB.R:1452:21: style: Use <-, not =, for assignment.
end_year_livneh = 2011
^
R/WeatherDB.R:1457:5: style: Place a space before left parenthesis, except in a function call.
if(version == 'v2016') {
^
R/WeatherDB.R:1457:17: style: Only use double-quotes.
if(version == 'v2016') {
^~~~~~~
R/WeatherDB.R:1458:21: style: Use <-, not =, for assignment.
end_year_livneh = 2015
^
R/WeatherDB.R:1464:1: style: Lines should not be more than 80 characters.
has_start_year = 1915, has_end_year = end_year_livneh, temp_call = temp_call,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
R/WeatherDB.R:1500:22: style: Only use double-quotes.
if (version == 'v2013') {
^~~~~~~
R/WeatherDB.R:1507:22: style: Only use double-quotes.
if (version == 'v2016') {
^~~~~~~
tests/test_data/TestPrj4/SFSW2_project_descriptions.R:160:13: style: Commented code should be removed.
# file.path(project_paths[["dir_ex_weather"]], "Livneh_NA_2016")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
temp <- unlist(lapply(temp, function(x) | ||
if (length(x) == 3 && x[3] == "nc") x[2])) | ||
|
||
db_months <- formatC(SFSW2_glovars[["st_mo"]], width = 2, flag = "0") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line is exact repeat from line 1504. Move after if (version == ...) {}
.
between versions
pertinent if ... statement
finding ids and paths.