-
Notifications
You must be signed in to change notification settings - Fork 2
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
UX improvements for working with metadata #119
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #119 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 40 40
Lines 3513 3548 +35
=========================================
+ Hits 3513 3548 +35 ☔ View full report in Codecov by Sentry. |
@@ -55,45 +56,59 @@ outpack_index <- R6::R6Class( | |||
)) | |||
|
|||
|
|||
index_update <- function(root_path, prev, skip_cache) { | |||
index_update <- function(root_path, prev, skip_cache, progress) { | |||
progress <- progress %||% getOption("orderly_index_progress", TRUE) |
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.
What does %||%
do ? Does it override progress
only when null? Is that a standard thing?
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.
it's not standard, but very common. The implementation is in util.R
but also in just about every package we write (and many other people too)!
This deals with some of the metadata reading issues seen by Lydia when working with the malaria orderly2 project:
The progress bars are discussed here: https://cli.r-lib.org/articles/progress.html - they won't be shown unless rebuilding takes more than a couple of seconds, which is nice. They are however really annoying in tests so I've disabled them generally in the test setup and put in a pretty grim interaction test. I've tried this out Lydia's network sources, which take about 10-20s to read, and the behaviour is pretty good.
In a following PR I'll try out some way of writing out some mechanism faster than listing all files in the directory, which is still quite slow over the network