mirror of
https://github.com/hwchase17/langchain.git
synced 2025-04-28 11:55:21 +00:00
docs: fix partner package table build for packages with no download stats (#29871)
The build in #29867 is currently broken because `langchain-cli` didn't add download stats to the provider file. This change gracefully handles sorting packages with missing download counts. I initially updated the build to fetch download counts on every run, but pypistats [requests](https://pypistats.org/api/) that users not fetch stats like this via CI.
This commit is contained in:
parent
8e5074d82d
commit
e2ba336e72
@ -93,7 +93,7 @@ packages_n = [_enrich_package(p) for p in data["packages"]]
|
||||
packages = [p for p in packages_n if p is not None]
|
||||
|
||||
# sort by downloads
|
||||
packages_sorted = sorted(packages, key=lambda p: p["downloads"], reverse=True)
|
||||
packages_sorted = sorted(packages, key=lambda p: p.get("downloads", 0), reverse=True)
|
||||
|
||||
|
||||
def package_row(p: dict) -> str:
|
||||
|
Loading…
Reference in New Issue
Block a user