Skip to content

fix #135 read local vpts files#147

Merged
bart1 merged 13 commits intomainfrom
135-using-local-files-as-source-in-get_vpts
Jan 22, 2026
Merged

fix #135 read local vpts files#147
bart1 merged 13 commits intomainfrom
135-using-local-files-as-source-in-get_vpts

Conversation

@bart1
Copy link
Collaborator

@bart1 bart1 commented Nov 18, 2025

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

@bart1 bart1 linked an issue Nov 18, 2025 that may be closed by this pull request
@bart1 bart1 requested a review from PietrH November 18, 2025 16:13
@bart1 bart1 marked this pull request as ready for review November 18, 2025 17:02
@bart1
Copy link
Collaborator Author

bart1 commented Nov 18, 2025

@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
Copy link

codecov bot commented Dec 2, 2025

Codecov Report

❌ Patch coverage is 71.71717% with 28 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.92%. Comparing base (4b6a386) to head (515bab4).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
R/zzz.R 0.00% 28 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bart1 bart1 changed the title fix #135 fix #135 read local vpts files Jan 16, 2026
@bart1 bart1 requested a review from YohanSassi January 19, 2026 12:35
Copy link
Contributor

@PietrH PietrH left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well done, small suggestions. 👍

) |>
purrr::set_names(radar)
full_paths <- purrr::map(file_paths, ~ file.path(directory, .x))
s <- purrr::map(full_paths, file.exists)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@bart1 bart1 requested a review from PietrH January 22, 2026 17:31
@PietrH
Copy link
Contributor

PietrH commented Jan 22, 2026

Thanks for making the changes, good to merge if CI passes.

@bart1 bart1 merged commit 1392aea into main Jan 22, 2026
9 checks passed
@bart1 bart1 deleted the 135-using-local-files-as-source-in-get_vpts branch January 22, 2026 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Using local files as source in get_vpts?

2 participants