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

Add additional tweet fields to TweetUtils; partially address #194. #254

Merged
merged 1 commit into from Aug 11, 2018

Conversation

Projects
None yet
3 participants
@ruebot
Member

ruebot commented Aug 10, 2018

GitHub issue(s): #194

What does this Pull Request do?

Adds the following addition fields to TweetUtils:

  • retweet_count
  • favorite_count
  • in_reply_to_status_id_str
  • in_reply_to_user_id_str
  • in_reply_to_screen_name
  • source
  • user.protected
  • user.profile_image_url
  • user.description
  • user.location
  • user.name
  • user.url
  • user.time_zone

How should this be tested?

Same as outlined in #252, but test additional fields.

Tests should take care of it all. But, definitely curious to see how it goes.

Additional Notes:

Still need to add some addition fields outlined in #194. Entity fields will be interesting since they are all an array.

Interested parties

@ianmilligan1 @greebie @lintool

@codecov

This comment has been minimized.

Show comment
Hide comment
@codecov

codecov bot Aug 10, 2018

Codecov Report

Merging #254 into master will increase coverage by 0.37%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #254      +/-   ##
==========================================
+ Coverage   70.14%   70.52%   +0.37%     
==========================================
  Files          41       41              
  Lines        1025     1038      +13     
  Branches      191      191              
==========================================
+ Hits          719      732      +13     
  Misses        240      240              
  Partials       66       66
Impacted Files Coverage Δ
...n/scala/io/archivesunleashed/util/TweetUtils.scala 96.15% <100%> (+3.84%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 62628b4...658f1fa. Read the comment docs.

codecov bot commented Aug 10, 2018

Codecov Report

Merging #254 into master will increase coverage by 0.37%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #254      +/-   ##
==========================================
+ Coverage   70.14%   70.52%   +0.37%     
==========================================
  Files          41       41              
  Lines        1025     1038      +13     
  Branches      191      191              
==========================================
+ Hits          719      732      +13     
  Misses        240      240              
  Partials       66       66
Impacted Files Coverage Δ
...n/scala/io/archivesunleashed/util/TweetUtils.scala 96.15% <100%> (+3.84%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 62628b4...658f1fa. Read the comment docs.

assert(tweet.profileLocation() == null)
assert(tweet.profileName() == null)
assert(tweet.profileUrl() == null)
assert(tweet.profileTimezone() == null)

This comment has been minimized.

@greebie

greebie Aug 10, 2018

Contributor

Maybe use ".isEmpty" instead of == null, so scalastyle does not burp. Technically the return should be String instead of Null anyway.

@greebie

greebie Aug 10, 2018

Contributor

Maybe use ".isEmpty" instead of == null, so scalastyle does not burp. Technically the return should be String instead of Null anyway.

This comment has been minimized.

@ruebot

ruebot Aug 10, 2018

Member

For all of them?

@ruebot

ruebot Aug 10, 2018

Member

For all of them?

This comment has been minimized.

@greebie

greebie Aug 10, 2018

Contributor

Just for the assertions. Although this is strictly a style issue, so not mandatory. (e.g. assert(tweet.profileLocation().isEmpty))

@greebie

greebie Aug 10, 2018

Contributor

Just for the assertions. Although this is strictly a style issue, so not mandatory. (e.g. assert(tweet.profileLocation().isEmpty))

This comment has been minimized.

@ruebot

ruebot Aug 10, 2018

Member

It's out of scope for this PR, and should be a new ticket. Create a new ticket.

@ruebot

ruebot Aug 10, 2018

Member

It's out of scope for this PR, and should be a new ticket. Create a new ticket.

This comment has been minimized.

@greebie

greebie Aug 10, 2018

Contributor

Hmm. That weird - these should have been detected and resolved in #249. I will add the ticket and try to find out why scalastyle did not yell at me.

@greebie

greebie Aug 10, 2018

Contributor

Hmm. That weird - these should have been detected and resolved in #249. I will add the ticket and try to find out why scalastyle did not yell at me.

@ianmilligan1

Tested with new categories and all looks good – just one minor typo fix and this is ready to merge.

Show outdated Hide outdated src/main/scala/io/archivesunleashed/util/TweetUtils.scala
def text(): String = try { (tweet \ "text").extract[String] } catch { case e: Exception => ""}
/** Get the full_text. */
/** Get the the tweet full_text. */

This comment has been minimized.

@ianmilligan1

ianmilligan1 Aug 11, 2018

Member

double "the the" here

@ianmilligan1

ianmilligan1 Aug 11, 2018

Member

double "the the" here

Add additional tweet fields to TweetUtils; partially address #194.
- Adds:
  - retweet_count
  - favorite_count
  - in_reply_to_status_id_str
  - in_reply_to_user_id_str
  - in_reply_to_screen_name
  - source
  - user.protected
  - user.profile_image_url
  - user.description
  - user.location
  - user.name
  - user.url
  - user.time_zone
- Updates some doc comments
- Updates tests
@ruebot

This comment has been minimized.

Show comment
Hide comment
@ruebot

ruebot Aug 11, 2018

Member

@ianmilligan1 done! I rebased locally, so it's all a single commit with the commit message I want. So, feel free to squash and merge when you're ready.

Member

ruebot commented Aug 11, 2018

@ianmilligan1 done! I rebased locally, so it's all a single commit with the commit message I want. So, feel free to squash and merge when you're ready.

@ianmilligan1 ianmilligan1 merged commit e4cf9a7 into archivesunleashed:master Aug 11, 2018

3 checks passed

codecov/patch 100% of diff hit (target 70.14%)
Details
codecov/project 70.52% (+0.37%) compared to 62628b4
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@ruebot ruebot deleted the ruebot:issue-194 branch Aug 11, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment