Skip to content
This repository was archived by the owner on Aug 7, 2024. It is now read-only.

Changes to tweet counting#394

Merged
jeremylow merged 16 commits intodevelopfrom
feature/changes_to_tweet_counting
Oct 25, 2016
Merged

Changes to tweet counting#394
jeremylow merged 16 commits intodevelopfrom
feature/changes_to_tweet_counting

Conversation

@jeremylow
Copy link
Copy Markdown
Collaborator

@jeremylow jeremylow commented Oct 21, 2016

Description

Changes update the API to be compliant with the REST portions of the changes described here: https://dev.twitter.com/overview/api/upcoming-changes-to-tweets . There is a new tweet_mode parameter for choosing whether to remain in compatibility mode (i.e., the old mode, but tweets may be truncated) or in the new, shiny extended_mode. Documentation has been updated, though it's a little rough at the moment while we see how things shake out from Twitter.

Additionally, I fixed the regex a little bit for the URL parsing to better match that of Twitter. It's not perfect; see 0180e27 for details.

This is not a breaking change.

Related Issue

Issue #338
Issue #346

Motivation and Context

Changes are required for new extended_mode

How Has This Been Tested?

Most tests had to be rewritten for the updates, as a new query parameter (tweet_mode) is getting passed to Twitter with most of the GET requests. Changes have been tested, though I'd like to see better coverage for what's changed to make sure we're not missing something.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

This change is Reviewable

This is basically just a distillation of what is on twitter documentation, but consdensed so it is easier to read/reference when building out the changes.
Some of the URLs acknowledged by Twitter are not counted, most are.
Some that Twitter says are not URLs, count as URLs.
It is not perfect, but it covers a number of use cases. See
tests/test_url_regex.py - the commented out URLs are the edge cases
that are not addressed.
@jeremylow jeremylow added this to the 3.2 milestone Oct 21, 2016
@jeremylow
Copy link
Copy Markdown
Collaborator Author

@bear any thoughts?

@bear
Copy link
Copy Markdown
Owner

bear commented Oct 25, 2016

Reviewed 24 of 24 files at r1.
Review status: all files reviewed at latest revision, all discussions resolved.


Comments from Reviewable

@bear
Copy link
Copy Markdown
Owner

bear commented Oct 25, 2016

I am loving all the tests and changes - apologies for not looking at this soo much sooner

@jeremylow
Copy link
Copy Markdown
Collaborator Author

Awesome! Yeah - I think the changes to the tests will make it a whole lot easier to maintain going forward.

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.

2 participants