Conversation
|
@PietrH or @peterdesmet can one of you look if this works for you? I think this setup balances flexibility with usability but it would be good to see if it also works some what natural for you |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #147 +/- ##
==========================================
- Coverage 93.16% 91.92% -1.25%
==========================================
Files 24 25 +1
Lines 1814 1882 +68
==========================================
+ Hits 1690 1730 +40
- Misses 124 152 +28 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
PietrH
left a comment
There was a problem hiding this comment.
Well done, small suggestions. 👍
R/get_vpts_local.R
Outdated
| ) |> | ||
| purrr::set_names(radar) | ||
| full_paths <- purrr::map(file_paths, ~ file.path(directory, .x)) | ||
| s <- purrr::map(full_paths, file.exists) |
There was a problem hiding this comment.
Does it make sense to output to a logical vector here instead of a list? Since you unlist later?
Do you even need map? Can you not just go file.exists(full_paths) ? Otherwise: purrr::map_lgl(full_paths, file.exists).
I'd personally call this something like files_exist instead of s.
There was a problem hiding this comment.
I improved the naming, it does however needs to be a map function since I keep the radars separated in a list. I think this is what get_vpts expects
|
Thanks for making the changes, good to merge if CI passes. |
The implementation for local data reading is quite flexible to for example make it possible to also read daily data. It is mostly controlled through a glue formatting string as documented (please check if you understand).
Currently if no file is found the function fails. If some data is found it warns about the data not found. However it could be whole radars are absent and thus not read with only a warning