You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like that pkg_assess() correctly finds and extracts data from the license file, however information is not passed to pkg_score():
> askpass_license_assess[["license"]]
[1] "MIT + file LICENSE"
> askpass_license_score[["license"]]
[1] NA
attr(,"label")
[1] "A binary indicator of whether the package ships with an acceptable license."
attr(,"class")
[1] "pkg_score" "numeric"
Same situation persists for other packages.
The text was updated successfully, but these errors were encountered:
paulie-of-punskas
changed the title
assess_license() returns NA, when called withing pkg_ref
pkg_score() returns NA for "assess_license"
Oct 4, 2023
This is actually expected behavior. From the source:
#' Score a package for acceptable license
#'
#' Maps a license string to a score
#'
#' @eval roxygen_score_family("license")
#'
#' @return score of metric license
#' @export
metric_score.pkg_metric_license <- function(x, ...) {
# defering scoring of licenses until we have a bit more consensus or guidance
NA_real_
}
I guess, the question is what is an acceptable scoring criterium for licenses? My initial thoughts on possible criteria to generate a score:
Is there a license? - Probably not very informative, IIRC CRAN/BioC require a license.
Is there a standard license in place (e.g. MIT, GPL-2, etc)
Is the license compatible user's intended use case? (e.g. does the license allow for commercial use?)
Does this package's license conflict with the licenses of its dependencies or reverse dependencies? (this is more of a cohort metric).
The team is open to suggestions on how to implement a metric from this assessment, so long as we can reach some sort of consensus.
I noticed that
pkg_score()
returns NA value, even when license is found. For example, let's take "askpass":It looks like that
pkg_assess()
correctly finds and extracts data from the license file, however information is not passed topkg_score()
:Same situation persists for other packages.
The text was updated successfully, but these errors were encountered: