-
Notifications
You must be signed in to change notification settings - Fork 58
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
available_packages_filters
disregarded during install
#645
Comments
Hey @gaborcsardi, is this something that you'd be interested in supporting? On our end, the filtering feature of |
Yes, I would like to have a way to prioritize repositories, but it would be another way, as we don't use |
What kind of filters do you use in |
This is related to our work in our (currently private) fork of There's a brief demo in the We use some helper functions in the demo to simplify the syntax, but it amounts to doing something like: options(available_packages_filters = list(add = TRUE, function(ap) {
dplyr::as_tibble(ap) |>
dplyr::select(
QualityLineCoverage >= 0.5,
QualityExportCoverage >= 0.9,
QualityExportDocumentationCoverage >= 0.9
)
})) Here the logic is just a series of conditions, but we'd like to keep it arbitrary - it could be a decision tree or some aggregation of different qualities. The ability to provide a function that can arbitrarily filter the available packages pulled from repos in Speaking only for my company, we also use this behavior to force R to prioritize repositories by their order in |
So you basically want to be able to specify arbitrary conditions on arbitrary fields from your package metadata. This is certainly possible, but needs quite a lot of changes, as currently we don't even read in all metadata from |
Yes, exactly. Glad to hear you're open to supporting it - please let us know if there's anything we can take on to help support it. From what I saw in the |
Not sure if this is necessarily a bug - maybe it's an intentional omission.
We were hoping to leverage this as a universal mechanism for applying a selection criteria to a repository of packages based on quality measures over in pharmaR/pharmapkgs.
Using a simple example, I tried to make a function that ideally would only permit (at least without some intentional side-stepping of common install tools) installation of packages that start with "c".
Though I would expect this to fail, given that the filter should prevent these packages from being available.
Substituting with a
function(ap) browser()
function also never hits a debug session, so my impression is thatavailable.packages
is either used internally but with some defaultfilters
, or an alternative mechanism is used that doesn't implement this behavior.I'm curious to hear your thoughts. It would be a tremendously valuable feature for us.
The text was updated successfully, but these errors were encountered: