Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix retrieving Author timeline #389

Merged
merged 1 commit into from
Nov 13, 2018
Merged

Conversation

ajdapretnar
Copy link
Collaborator

Issue

Fixes #388.

Description of changes

Updated retrieval of Author timelines to fit the new API.

Includes
  • Code changes
  • Tests
  • Documentation

@ajdapretnar ajdapretnar changed the title Fix retrieving Author timeline [WIP] Fix retrieving Author timeline Oct 27, 2018
@ajdapretnar
Copy link
Collaborator Author

This should be thorough inspected before merging. I will provide tests, too.

@codecov-io
Copy link

Codecov Report

Merging #389 into master will increase coverage by 0.1%.
The diff coverage is 100%.

@@            Coverage Diff            @@
##           master     #389     +/-   ##
=========================================
+ Coverage   85.34%   85.44%   +0.1%     
=========================================
  Files          34       34             
  Lines        1951     1951             
  Branches      344      344             
=========================================
+ Hits         1665     1667      +2     
+ Misses        244      243      -1     
+ Partials       42       41      -1

@ajdapretnar
Copy link
Collaborator Author

@robertcv There's an issue with the tests.

Run:

    def test_search_author(self):
        api = twitter.TwitterAPI(self.credentials)
        corpus = api.search_authors(['@OrangeDataMiner'], max_tweets=5)
        self.assertEqual(len(corpus), 5)
        print(corpus)

This should print a corpus of tweets from @OrangeDataMiner. It does not. Looks like credentials might get broken somewhere in between and tweepy defaults to 'hello' query. Or sth. 🤷‍♀️

@robertcv
Copy link
Collaborator

robertcv commented Nov 9, 2018

The problem is due to mocking of the underlying API. Used data is static, you can see it in tweets.json.

@ajdapretnar ajdapretnar changed the title [WIP] Fix retrieving Author timeline Fix retrieving Author timeline Nov 12, 2018
@robertcv robertcv merged commit b8788f1 into biolab:master Nov 13, 2018
@ajdapretnar ajdapretnar deleted the twitter-api-fix branch January 21, 2021 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants