Skip to content

Commit 33e9577

Browse files
committed
Add yearly charts for affiliation, country and continent, fix some bugs
- Legacy-Id: 12894
1 parent c61babb commit 33e9577

15 files changed

Lines changed: 265 additions & 72 deletions

ietf/stats/tests.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ def test_document_stats(self):
2626

2727
# check various stats types
2828
for stats_type in ["authors", "pages", "words", "format", "formlang",
29-
"author/documents", "author/affiliation", "author/country", "author/continent"]:
29+
"author/documents", "author/affiliation", "author/country",
30+
"author/continent", "author/citations", "author/hindex",
31+
"yearly/affiliation", "yearly/country", "yearly/continent"]:
3032
for document_type in ["", "rfc", "draft"]:
3133
for time_choice in ["", "5y"]:
3234
url = urlreverse(ietf.stats.views.document_stats, kwargs={ "stats_type": stats_type })
@@ -37,7 +39,8 @@ def test_document_stats(self):
3739
self.assertEqual(r.status_code, 200)
3840
q = PyQuery(r.content)
3941
self.assertTrue(q('#chart'))
40-
self.assertTrue(q('table.stats-data'))
42+
if not stats_type.startswith("yearly"):
43+
self.assertTrue(q('table.stats-data'))
4144

4245
def test_known_country_list(self):
4346
make_test_data()

ietf/stats/urls.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
urlpatterns = patterns('',
77
url("^$", ietf.stats.views.stats_index),
8-
url("^document/(?:(?P<stats_type>authors|pages|words|format|formlang|author/documents|author/affiliation|author/country|author/continent|author/citations||author/hindex)/)?$", ietf.stats.views.document_stats),
8+
url("^document/(?:(?P<stats_type>authors|pages|words|format|formlang|author/(?:documents|affiliation|country|continent|citations|hindex)|yearly/(?:affiliation|country|continent))/)?$", ietf.stats.views.document_stats),
99
url("^knowncountries/$", ietf.stats.views.known_countries_list),
1010
url("^review/(?:(?P<stats_type>completion|results|states|time)/)?(?:%(acronym)s/)?$" % settings.URL_REGEXPS, ietf.stats.views.review_stats),
1111
)

0 commit comments

Comments
 (0)