cwerner / fastclass

Little tools to download and then weed through images, delete and classify them into groups for building deep learning image datasets (based on crawler and tkinter)
Apache License 2.0
133 stars 25 forks source link

Flickr #29

Closed mpoisot closed 4 years ago

mpoisot commented 4 years ago

This adds Flickr support. The user just needs to include -c FLICKR when invoking fcd, as well as somehow set a FLICKR_API_KEY environment variable to their public Flickr api key.

I'm very new to Python and I haven't done many cross-fork pull requests, so please be patient with any silly mistakes. I'm using VS Code using the popular Python package, which installs autopep8 by default. This formats the code according to some "standard", but I have no idea how controversial formatting is in the Python world. I love formatters for my Ruby and Javascript projects so hopefully they're loved here too.

cwerner commented 4 years ago

Hi and thanks for your PR.

Not a flickr user myself, but I have received some requests for this functionality so I'm more than happy to include this!

I'm not super opinionated about formatting but use black for my newer projects. I just did not get around adding it to fastclass, yet. From my experience strict pep8 feels a bit much... However, I'm inclined to accept the change and push a black lint over the top of it.

mpoisot commented 4 years ago

Yeah I figured the formatting part could be an issue, but fortunately it's easy to undo. I will look into black as I didn't really love some of the formatting pep8 was doing, but also I'm not used to Python so it's hard to tell what's "ugly" and what's different compared to JS.

Is there a way to specify (and enforce) what formatter a project uses to avoid this of problem?

cwerner commented 4 years ago

I'm not super versed in these linters myself - but just at this moment I'm adding a pre-commit config to the repository that should run a black lint before any commit... Not 100% sure how this is supposed to be setup since I - until now - only used it on private repos where I was the only one contributing. I think I have to setup a CI and then black can be triggered automatically on any PR attempt.

Let's experiment and find out... 👍