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

clean up Twitter integration #406

Closed
chadwhitacre opened this issue Dec 6, 2012 · 14 comments
Closed

clean up Twitter integration #406

chadwhitacre opened this issue Dec 6, 2012 · 14 comments

Comments

@chadwhitacre
Copy link
Contributor

The two main tickets so far for this are #289 and #313. I'm starting a new ticket here so that I can talk to myself without interrupting all the watchers on those tickets. :-)

@chadwhitacre
Copy link
Contributor Author

This is about the interaction of participants with social_network_users.

@chadwhitacre
Copy link
Contributor Author

Participants can be claimed or unclaimed.

Unclaimed participants are 1:1 with a social_network_user.

Claimed participants are 1:N with social_network_users.

@chadwhitacre
Copy link
Contributor Author

I think it might be time to implement a bit of an object model for participants. I started this at one point but then backed it out and I can't remember why. :-(

Currently we interact with participants mostly through functions in gittip/init.py. I'm considering defining Participant and SocialNetworkAccount classes. All of the get_ functions from gittip/init.py would go on Participant.

participant = Participant('whit537')
tip = participant.get_tip_to('dowski')
# etc.

github_account = GitHubAccount('whit537')
twitter_account = TwitterAccount('whit537')

participant.connect_account(github_account)
participant.connect_account(twitter_account)

@chadwhitacre
Copy link
Contributor Author

I need to make sure b340cf8 works for authenticated users (ideally with some more tests in test_pages.py) and then I'll release this so far.

@chadwhitacre
Copy link
Contributor Author

Okay, work so far is deployed as 5.4.28.

@chadwhitacre
Copy link
Contributor Author

Next steps:

  • Implement SocialNetworkUser class (includes subclasses for each network, and using these in existing simplates where appropriate).
  • Implement connect_account method on Participant object. That will do the heavy lifting of merging accounts as needed and will be where we have to tease that out fully.
  • Add UI for firing connect_account -- probably needs confirmation dialogs for merging accounts?

chadwhitacre added a commit that referenced this issue Dec 7, 2012
chadwhitacre added a commit that referenced this issue Dec 7, 2012
I am renaming this because I want the Python library nomenclature to
harmonize with the database, and I don't want to call the Python
submodule social_network_users (it was called networks before). Now
they're both called elsewhere. Secondly, I want to broaden the category
to include things that might not necessarily be social networks (is
Vimeo a social network?). Platform is more generic. This commit also
adds some more page smoke tests. There's a lot more to test. :(
chadwhitacre added a commit that referenced this issue Dec 7, 2012
@chadwhitacre
Copy link
Contributor Author

How will participant absorption affect nparticipants during payday?

@chadwhitacre
Copy link
Contributor Author

Deployed work to date as 5.4.33.

chadwhitacre added a commit that referenced this issue Dec 14, 2012
I modified the test fixture to setup data in the elsewhere column, but
it turns out we depend on lowercase for platform names, and the test
fixutre didn't use lowercase.
chadwhitacre added a commit that referenced this issue Dec 14, 2012
I believe these tests hit the database in a way they didn't before, due
to the way we're filling out the elsewhere table now(?). Anyway, they
weren't wrapped in a db testing context manager, so there was
bleed-through. Maybe they were always bleeding, I dunno.
chadwhitacre added a commit that referenced this issue Dec 14, 2012
chadwhitacre added a commit that referenced this issue Dec 14, 2012
When I added the additional constraints to the elsewhere table, I broke
the upsert method. In fixing it I was able to greatly simplify it.
@chadwhitacre
Copy link
Contributor Author

Deployed as 5.5.3.

chadwhitacre added a commit that referenced this issue Dec 14, 2012
This avoids creating and then deleting participants.
@chadwhitacre
Copy link
Contributor Author

I'm refactoring the login machinery.

chadwhitacre added a commit that referenced this issue Dec 14, 2012
chadwhitacre added a commit that referenced this issue Dec 14, 2012
chadwhitacre added a commit that referenced this issue Dec 14, 2012
chadwhitacre added a commit that referenced this issue Dec 14, 2012
This centralizes all upsert calls to AccountElsewhere.__init__. That
means when you instantiate that object it updates the database.
chadwhitacre added a commit that referenced this issue Dec 17, 2012
We were only getting gifts *to* people with a valid credit card. Oops!
@chadwhitacre
Copy link
Contributor Author

Punchlist for UI:

@chadwhitacre
Copy link
Contributor Author

General punchlist:

@chadwhitacre
Copy link
Contributor Author

Deployed as 5.5.7.

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

No branches or pull requests

1 participant