MCPcopy Create free account
hub / github.com/SourceCode-AI/aura / score_pypi_downloads

Method score_pypi_downloads

aura/package.py:362–376  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

360 self.github = github.GitHub.from_url(self.repo_url)
361
362 def score_pypi_downloads(self) -> Union[Value, NA]:
363 try:
364 for line in config.iter_pypi_stats():
365 pkg_name = canonicalize_name(line["package_name"])
366 if pkg_name == self.package_name:
367 downloads = int(line.get("downloads", 0))
368 normalized = log_scale(downloads)
369 explanation = f"{downloads} (+{normalized})"
370 return self.Value(downloads, normalized, "PyPI downloads", explanation)
371 except ValueError:
372 pass
373 except MissingFile:
374 pass
375
376 return PackageScore.NA("PyPI downloads")
377
378 def score_reverse_dependencies(self) -> Union[Value, NA]:
379 try:

Callers 1

get_score_entriesMethod · 0.95

Calls 2

log_scaleFunction · 0.85
getMethod · 0.80

Tested by

no test coverage detected