Skip to content

Project detail statistics: support multiple statistics providers #12789

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

Closed
jayaddison opened this issue Jan 9, 2023 · 3 comments
Closed

Project detail statistics: support multiple statistics providers #12789

jayaddison opened this issue Jan 9, 2023 · 3 comments
Labels
feature request help needed We'd love volunteers to advise on or help fix/implement this. UX/UI design, user experience, user interface

Comments

@jayaddison
Copy link
Contributor

What's the problem this feature will solve?
The project detail page displays release-related statistics which can be useful for consumers who would like to gauge project popularity and community size.

Currently, GitHub is the sole supported statistics provider, but there are a number of other source code forges that host FOSS projects and provide statistical information about them.

image

Describe the solution you'd like
Extend the stats URL detection logic to support multiple source control forges.

Additional context
Different forges are likely to use different naming terminology for their statistics; PyPi could choose to decide upon a standard naming format, and may omit statistical fields from display if they are not relevant or available from a provider.

Each additional provider would likely require an associated connect-src entry for the frontend application's content security policy.

This repository's test data file (dev/example.sql.xz) could provide a way to help figure out potential providers to support.

Relates to #4384.

@jayaddison jayaddison added feature request requires triaging maintainers need to do initial inspection of issue labels Jan 9, 2023
@jayaddison
Copy link
Contributor Author

Also worth considering: it's not a great idea to make too many assumptions about the bandwidth and resource capacity of statistics providers.

Although most of the major providers are likely well-resourced, PyPI itself may receive significant inbound traffic, and since subsequent outbound requests are made from the frontend application -- by geographically disparate users -- it could be challenging for providers to filter that traffic.

@miketheman miketheman added UX/UI design, user experience, user interface help needed We'd love volunteers to advise on or help fix/implement this. and removed requires triaging maintainers need to do initial inspection of issue labels Oct 6, 2023
nE0sIghT added a commit to nE0sIghT/warehouse that referenced this issue May 9, 2024
nE0sIghT added a commit to nE0sIghT/warehouse that referenced this issue Sep 10, 2024
di pushed a commit that referenced this issue Sep 19, 2024
* Initial implementation of GitLab statistics

Issue: #12789
Signed-off-by: Yuri Konotopov <[email protected]>

* project-data: fixed Gitlab's repository icon

* csp: limit Gitlab urls to /api/

* gitlab: use "starrers" term instead of "stargazers" and "followers"

* gitlab: `MR` abbreviation revealed

* gitlab: log errors to console instead of hiding them completely

---------

Signed-off-by: Yuri Konotopov <[email protected]>
@di
Copy link
Member

di commented Sep 19, 2024

Fixed in #15931.

@di di closed this as completed Sep 19, 2024
@jayaddison
Copy link
Contributor Author

Nice! Thank you, @nE0sIghT!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request help needed We'd love volunteers to advise on or help fix/implement this. UX/UI design, user experience, user interface
Projects
None yet
Development

No branches or pull requests

3 participants