uptake / pkgnet

R package for analyzing other R packages via graph representations of their dependencies
https://uptake.github.io/pkgnet/
Other
155 stars 37 forks source link

Package Score #16

Closed patrick-boueri closed 7 months ago

patrick-boueri commented 6 years ago

As I understand the original vision according @bburns632 , every package should have a "Score" that's a weighted metric of all the factors we consider for a package. It should have an indicator like green/yellow/red associated with each dimension and an overall health. The purpose of this in the future is not only to list your dependencies, but also your dependencies health as a function of its structure and its dependencies' health too.

I want to open up this issue for discussion to see if this is still on the table, and if so, what are some rough sketches about what it should look like?

jameslamb commented 6 years ago

This is such a cool idea. I think test coverage should be a key component of "package health" but that would be prohibitively expensive to run for all dependencies (if not impossible, since some packages have tests that assume the existence of external services e.g. uptasticsearch expecting ES)

I'm curious to hear from @bburns632 what his vision for something like this would be. IMHO this is not a feature that we need to have before the first release but it would be a big differentiator relative to other code assessment tools that exist or may exist in the future

bburns632 commented 6 years ago

@patrick-boueri, yes, the main goals here were:

  1. Extract the internal & external dependency networks of an R package.
  2. Expose these networks via visualizations & network statistics.
  3. Utilize the structure of this networks to more effectively quantify the design and possible risks of an R package

For example, one idea was weighted coverage were each function's calculated test coverage is weighted by it's centrality. In a package level coverage statistic, this method would better expose a package with a small, yet very critical uncovered function (such as a logger function).

As for the implementation, I like the red/yellow/green highlighting of all the factors we may consider for a package (weighted coverage, cyclomatic complexity, etc.), but we need to discuss more what an overall health score would be. We could keep it simple in the initial release and have the final package health be yellow if any one of the metrics was yellow and so on.

jameslamb commented 6 years ago

Going to remove the post-release tag since we are past the first release. Still would love to revisit this at some point

bburns632 commented 5 years ago

This idea is being staged for the next release (v.0.5.0) temporarily. The goal and scope of v0.5.0 is being discussed in #208.