Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

Show number of active weekly users and $ transferred in the headline of each page. #1377

Merged
merged 9 commits into from
Sep 6, 2013
Merged

Conversation

zbynekwinkler
Copy link
Contributor

In response to #703.

Adds 'weekly active users exchanging $' message to the top of each page.
@chadwhitacre
Copy link
Contributor

@zwn Are the tests passing locally for you? Looks like they're failing at Travis.

@zbynekwinkler
Copy link
Contributor Author

The test are failing but they fail even without the two commits. When I make test of ffe3d4d I get a lots of 500. The first failing test says

Traceback (most recent call last):
  File "/home/zbynek/www.gittip.com/tests/test_goal_json.py", line 95, in test_all_goals_are_stored_in_goals_table
    assert actual == [400, None, 300, 200, 100], actual
AssertionError: []

But I have no idea what it is supposed to do.

@chadwhitacre
Copy link
Contributor

@zwn We just landed a big pull request (#1320). We'll need to sync this PR up with master before we can merge. There will almost certainly be some work to do because of that.

@zbynekwinkler
Copy link
Contributor Author

@whit537 It should be ready now.

@@ -88,6 +88,13 @@ def add_stuff(request):
request.context['github'] = github
request.context['twitter'] = twitter
request.context['bountysource'] = bountysource
stats = gittip.db.one('SELECT nactive, transfer_volume FROM paydays ORDER BY ts_end DESC')
Copy link
Contributor

Choose a reason for hiding this comment

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

This fails with TooMany if there is more than one payday. Probably want a LIMIT 1?

Copy link
Contributor

Choose a reason for hiding this comment

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

I should say that that's a change in the .one API from the internal postgres.py module to the external one we're now using after #1320. Here's the docs for the version we're using now:

http://postgres-py.readthedocs.org/en/latest/#postgres.Postgres.one

@chadwhitacre
Copy link
Contributor

@zwn Final items:

  • Let's also round the number of users to the nearest 100.
  • Let's make the text a link to the /about/charts.html page (no style change though, might need to override something).
  • Let's change the "Funders" chart to "Active Users"
  • Let's change the description of the "Active Users" chart to "Users that gave and/or received money within Gittip"

@chadwhitacre
Copy link
Contributor

Actually, let's link to and change the charts in a separate pull request. I'll change the rounding on master since I can't change the branch.

chadwhitacre added a commit that referenced this pull request Sep 6, 2013
Show number of active weekly users and $ transferred in the headline of each page.
@chadwhitacre chadwhitacre merged commit 76dee91 into gratipay:master Sep 6, 2013
chadwhitacre added a commit that referenced this pull request Sep 6, 2013
That PR was for a branch in @zwn's fork, not a branch of the main repo.
Since I couldn't commit on that branch I'm doing this little bit here.
This rounds nactive in addition to transfer_volume. It also reflows the
db call to not use long lines.
chadwhitacre added a commit that referenced this pull request Sep 6, 2013
In #1377 we rounded the dollar amount. Let's round the number of users
as well.
@chadwhitacre
Copy link
Contributor

I force-pushed master to remove b594e49, and went with a PR (#1400) instead. :-)

IRC

@chadwhitacre
Copy link
Contributor

Reticketed charts changes and link as #1401.

@chadwhitacre
Copy link
Contributor

!m @zwn 💃

@tshepang
Copy link
Contributor

tshepang commented Sep 6, 2013

excellent!

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

Successfully merging this pull request may close these issues.

3 participants