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

reduce surface area #3406

Merged
merged 6 commits into from
May 12, 2015
Merged

reduce surface area #3406

merged 6 commits into from
May 12, 2015

Conversation

chadwhitacre
Copy link
Contributor

Turn off tipping in the UI, the JSON API, and the Python API. After this PR, there should be no more code using the tips table. Reduce the surface area for changes by removing code we won't need under the Teams system.

@chadwhitacre chadwhitacre added this to the Pivot milestone May 12, 2015
@chadwhitacre
Copy link
Contributor Author

Incorporates #3403.

@chadwhitacre
Copy link
Contributor Author

Where are all the places where the Python API interacts with the tips table?

@chadwhitacre
Copy link
Contributor Author

Here's what I can find:

✓ _check_tips
✓ _check_orphans_no_tips

✓ Participant.update_number
  Participant.clear_tips_giving - close
  Participant.clear_tips_receiving - close
  Participant.update_giving - team takes, exchange routes, setting tips, take over
  Participant.update_receiving - team takes, setting tips, take over
  Participant.set_tip_to - {tip,tips}.json, close, throughout the test suite
  Participant.get_tip_to - tip widget, old button widget, pricing
  Participant.get_tip_distribution - stats, receiving page
  Participant.get_giving_for_profile - giving page, tips.json, close
  Participant.get_tips_receiving - unused!
  Participant.get_current_tips - tips.json
  Participant.take_over - take over
  Participant.final_check - archive, close

  www/about/stats.spt
  www/about/tip-distribution.json.spt

@chadwhitacre
Copy link
Contributor Author

Here's the behavior this PR should implement:

  1. the ability to view, set, or modify a tip should be removed from the UI
  2. the ability to view, set, or modify a tip should be removed from the JSON API
  3. any Python function that directly interacts with the tips or current_tips should raise NotImplementedError (users shouldn't ever hit this after 1 and 2, but just in case)
  4. the Giving page should show empty

@chadwhitacre chadwhitacre mentioned this pull request May 12, 2015
@chadwhitacre
Copy link
Contributor Author

The max tip limit interacts with the number attribute in such a way that this entanglement should be undone as part of this PR (not on a separate PR or we'll introduce a race condition).

@chadwhitacre
Copy link
Contributor Author

This PR can archive the tips table in its branch.sql.

@chadwhitacre
Copy link
Contributor Author

Here are the parts of the UI that touch tips:

  • closing accounts
  • updating team takes
  • adding/updating exchange routes
  • setting tips
  • merging accounts
  • tips.json
  • the old button widget
  • the pricing page
  • the stats page
  • the receiving page
  • the giving page
  • archiving accounts

In other words, quite a bit of it, as well as quite a bit of the test suite. Hmm ...

@chadwhitacre
Copy link
Contributor Author

Revised scope for this PR: let's reduce our surface area for changes to Participant.

@chadwhitacre chadwhitacre changed the title turn off tipping reduce surface area May 12, 2015
Tests marked xfail, bring them back once we have tipping back on
Teams.
Disentangles `number` from `tips`
We'll bring back something comparable down the line.
We no longer have giving attached to a participant
chadwhitacre added a commit that referenced this pull request May 12, 2015
@chadwhitacre chadwhitacre merged commit 9943a5a into master May 12, 2015
@chadwhitacre chadwhitacre deleted the turn-off-tipping branch May 12, 2015 22:29
@chadwhitacre chadwhitacre mentioned this pull request Jan 29, 2016
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.

1 participant