Skip to content
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

Add a /stats endpoint #4469

Merged
merged 3 commits into from Aug 5, 2018
Merged

Add a /stats endpoint #4469

merged 3 commits into from Aug 5, 2018

Conversation

cooperlees
Copy link
Contributor

@cooperlees cooperlees commented Aug 5, 2018

  • Add /stats route + view
  • Start with top 100 largest packages, multiple people and especailly bandersnatch users would love a way to know the X top packages that they could then blacklist
  • Have kept the HTML very basic and tried to make it parsable friendly

Test:

  • Ran warehouse locally and went to http://localhost/stats
  • Ensured new unit test passes
  • Ensure we kept 100% unit test coverage

Addresses #4288

cooperlees and others added 3 commits August 5, 2018 14:37
- Add /stats route + view
- Start with top 100 largest packages, multiple people and especailly bandersnatch users would love a way to know the X top packages that they could then blacklist
- Have kept the HTML very basic and tried to make it parsable friendly

Test:
- Ran warehouse locally and went to http://localhost/stats
- Ensured new unit test passes
- Ensure we kept 100% unit test coverage
@dstufft dstufft merged commit 737f3a8 into pypi:master Aug 5, 2018
)

assert stats(db_request) == {
"total_packages_size": 69,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice


assert stats(db_request) == {
"total_packages_size": 69,
"top_packages": [(project.name, 69)],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

@cooperlees
Copy link
Contributor Author

Are you making fun of my small package size? 😂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants