faker icon indicating copy to clipboard operation
faker copied to clipboard

WIP: #2505 Replace LoremPixel with LoremFlickr

Open yagosansz opened this issue 3 years ago • 4 comments

Summary

Fixes: #2505

LoremPixel is no longer available, therefore we are replacing it with LoremFlickr.

In order to mark this as resolved, we might need to complete the following:

  • [x] Add Tests for LoremFlickr on test_lorem_flickr.rb
  • [ ] Replace LoremPixel with LoremFlickr here
  • [ ] Complete "TODOs" here

Questions

I've added a couple tests to test_lorem_flickr.rb as part of my first commit. Would it be wise to add more tests to cover the other public methods for LoremFlickr before we actually replace it?

A couple other stuff I don't fully understand - my apologies in advance:

  1. What do we mean by "Make dimensions change" here?
  2. What do we mean by "Dynamic image sizes" here?
  3. What are the "indices" being referred to here and how are they defined?

Thanks! 😄

yagosansz avatar Aug 28 '22 03:08 yagosansz

I think for the first two questions, it's about letting the user specifiy the dimentions of the image to generate, as the sizes are hardcoded near those comments.

for the indices, that comes from the Twitter API: https://developer.twitter.com/en/docs/twitter-api/premium/data-dictionary/object-model/entities#media

Zeragamba avatar Aug 29 '22 12:08 Zeragamba

I've added a couple tests to test_lorem_flickr.rb as part of my first commit. Would it be wise to add more tests to cover the other public methods for LoremFlickr before we actually replace it?

Tests are always a good thing to do. If you want to cover more scenarios, go ahead :+1:

It's okay to not understand things, feel free to ask :)

About your questions, I wanted to add beyond to what @Zeragamba said that perhaps addressing those TODOs could be done in a separate PR. They could be a follow up from this one, IMO.

What do you think?

stefannibrasil avatar Sep 01 '22 00:09 stefannibrasil

Hi @stefannibrasil and @Zeragamba! Thank you so much for the kind replies and providing more details 😄

Yes, if that's fine I can complete this one and create a separate Issue/PR to address the TODOs.

yagosansz avatar Sep 01 '22 01:09 yagosansz

It would be nice if the two TODOs about allowing the user to set the dimensions of the image could be fixed with these changes, but not required.

The issue with indices is unrelated and should definitely be done in a new PR.

Zeragamba avatar Sep 01 '22 11:09 Zeragamba

@yagosansz are you still interested in working on this? Thanks!

stefannibrasil avatar Oct 03 '22 03:10 stefannibrasil

Hi @stefannibrasil, I'm still interested but I can't find the time to continue working on it - my apologies 😢

It may be best if the pull requested is assigned to a different person.

yagosansz avatar Oct 09 '22 01:10 yagosansz

@yagosansz . I can maybe try to continue from where you have stopped, that is if it is okay by you.

uzorjchibuzor avatar Oct 11 '22 11:10 uzorjchibuzor

@uzorjchibuzor for sure! Please feel free to continue the work and to make any changes you think are necessary 🤙

yagosansz avatar Oct 12 '22 13:10 yagosansz

hi @uzorjchibuzor thanks for the help! I added a comment on the issue #2505 to add a deprecation warning first. Do you mind taking a look at the comments there before moving on with this? You could get started with the 2 tasks described there.

I will close this PR for now since it's a draft and the issue needs to be updated. Drop your questions or comments in the issue. Thank you!

stefannibrasil avatar Oct 12 '22 15:10 stefannibrasil

I will look at the issue to know first and proceed accordingly.

uzorjchibuzor avatar Oct 12 '22 15:10 uzorjchibuzor