Merge lp://qastaging/~jml/libdep-service/summary-pages into lp://qastaging/libdep-service
Proposed by
Jonathan Lange
Status: | Merged |
---|---|
Approved by: | James Westby |
Approved revision: | 71 |
Merged at revision: | 45 |
Proposed branch: | lp://qastaging/~jml/libdep-service/summary-pages |
Merge into: | lp://qastaging/libdep-service |
Diff against target: |
449 lines (+318/-34) 9 files modified
django_project/urls.py (+1/-0) djlibdep/api.py (+59/-0) djlibdep/templates/homepage.html (+4/-0) djlibdep/tests/__init__.py (+30/-3) djlibdep/tests/helpers.py (+48/-0) djlibdep/tests/test_api.py (+120/-0) djlibdep/tests/test_views.py (+37/-31) djlibdep/views.py (+5/-0) djlibdep/wrappers.py (+14/-0) |
To merge this branch: | bzr merge lp://qastaging/~jml/libdep-service/summary-pages |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
James Westby (community) | Approve | ||
Review via email:
|
Commit message
Add API for showing statistics about the database
Description of the change
Adds an API for showing summary information about the database.
Can't remember the interesting bits, I'm afraid.
Good luck!
jml
To post a comment you must log in.
67 +def get_unique_ packages( db): result) [0][0])
68 + result = db._store.execute(
69 + "SELECT COUNT(DISTINCT dependency) FROM libdep")
70 + return int(list(
I'm not sure I think of this as packages, because that might be confused
with the number of packages that we have information for. They will
be close numbers, but can potentially differ.
We also should have versions etc. in these dependencies some times, which
will change the results.
I also wonder if we want the number of scanned packages, i.e. a package_ name'.
DISTINCT of 'source_
My proposal:
* Rename the above to 'dependencies'
* Add another 'packages', though maybe with a different name to reduce confusion
(though source_package_name as it is called in the db is not what they are).
102 +class NonSuite(object):
A comment somewhere around this code explaining what it is accomplishing, and
why it has to be done this way would be very much appreciated.
Thanks,
James