Skip to content

Conversation

@SaurabhCodesAI
Copy link
Contributor

@SaurabhCodesAI SaurabhCodesAI commented Oct 14, 2025

Fixes

Description

This PR implements automation for Flickr data fetching as discussed in issue #164. The implementation follows the established patterns from existing fetch scripts.

Technical details

Files Changed:

  • scripts/1-fetch/flickr_fetch.py - New script to fetch CC license data from Flickr API
  • .github/workflows/1-fetch.yml - Added Flickr fetch job to the workflow

Key Features:

  • Fetches data for all 8 CC licenses (1, 2, 3, 4, 5, 6, 9, 10) as specified in pre-automation reference
  • License names sourced from official Flickr API: https://www.flickr.com/services/api/flickr.photos.licenses.getInfo.html
  • Follows the same patterns as github_fetch.py and gcs_fetch.py
  • Supports --dev mode for testing without API credentials
  • CSV output format: LICENSE_ID, LICENSE_NAME, COUNT

Command Options:

  • --limit - Limit photos per license (default: 100)
  • --enable-save - Save results to CSV
  • --enable-git - Enable git operations
  • --dev - Development mode with fake data

Tests

Tested in dev mode:

python scripts/1-fetch/flickr_fetch.py --dev --limit=10 --enable-save

All 8 licenses fetched correctly with proper CSV output.

Note: Unable to test with live Flickr API as they now require PRO subscription for API access. The implementation follows established project patterns and should work once credentials are available.

Screenshots

Checklist

  • I have read and understood the Developer Certificate of Origin (DCO), below, which covers the contents of this pull request (PR).
  • My pull request doesn't include code or content generated with AI.
  • My pull request has a descriptive title (not a vague title like Update index.md).
  • My pull request targets the default branch of the repository (main or master).
  • My commit messages follow best practices.
  • My code follows the established code style of the repository.
  • I added or updated tests for the changes I made (if applicable).
  • I added or updated documentation (if applicable).
  • I tried running the project locally and verified that there are no
    visible errors.

Developer Certificate of Origin

For the purposes of this DCO, "license" is equivalent to "license or public domain dedication," and "open source license" is equivalent to "open content license or public domain dedication."

Developer Certificate of Origin
Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.


Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

@SaurabhCodesAI SaurabhCodesAI requested review from a team as code owners October 14, 2025 23:53
@SaurabhCodesAI SaurabhCodesAI requested review from TimidRobot and possumbilities and removed request for a team October 14, 2025 23:53
Fetches CC license data for all 8 license types from Flickr API.

Includes GitHub Actions integration and CSV output.

Resolves creativecommons#164
@TimidRobot
Copy link
Member

@SaurabhCodesAI This pull request (PR) is unacceptable due to a failure to follow the PR template instructions.

@TimidRobot
Copy link
Member

@SaurabhCodesAI did you use any AI tools when creating scripts/1-fetch/flickr_fetch.py?

@TimidRobot TimidRobot self-assigned this Oct 15, 2025
@SaurabhCodesAI
Copy link
Contributor Author

@TimidRobot Thanks for checking the API pricing details and marking this as blocked.

About AI: No, I didn't use AI to write the code. I'm aware this project's guidelines prohibit AI generated code, and I respect that.

I have experience building multi API projects solo (you can check my GitHub profile). I studied gcs_fetch.py and github_fetch.py and followed those patterns for this implementation.

For context: In my personal projects, I use AI to generate detailed comments so others learning from my code can understand what each line does. But for actual contributions to open source projects, I follow the project's guidelines and write everything myself.

About the API access: I mentioned the Pro subscription issue 6 hours ago in my comment, but went ahead with the implementation thinking CC might have existing access. Should have asked you first, my mistake.

I'll close this PR since the data source isn't viable.

Next steps: I'd still like to contribute to this project. Would you be open to me spending more time going through the codebase and proposing a different feature or improvement? Or would you prefer I look into alternative platforms with free APIs that might work as data sources?

Thanks for your time and feedback on this.

@TimidRobot
Copy link
Member

TimidRobot commented Oct 15, 2025

@SaurabhCodesAI

Yeah, sorry about the API access. Flickr's documentation contradicts itself 😢

I'm also concerned that this PR is nearly identical to #194. How did that happen?

@SaurabhCodesAI
Copy link
Contributor Author

@TimidRobot About the similarity to #194: Honestly, I reviewed their PR because I wanted to make sure I was on the right track. I saw they submitted a PR without joining the discussion first, so I figured maybe they were experienced and knew exactly what to do.

When I looked at their code, I noticed it was missing licenses 1 and 9, and the license names didn't match the official Flickr API. That made me double check my own implementation to make sure I had all 8 licenses and the correct names.

Both PRs look similar because we both followed gcs_fetch.py and github_fetch.py as references, which makes sense for this project's structure.

The main differences:

  • Mine has all 8 CC licenses (1,2,3,4,5,6,9,10)
  • License names from official Flickr API
  • All static analysis checks passing

I wanted to make sure my implementation met the project's standards, especially since I saw someone else had already jumped in. If I'd been the only one working on it, I would have taken more time to plan it out carefully like you originally suggested.

No worries about the API situation, that outdated documentation got both of us!

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

Labels

None yet

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

[Feature] Automate Flickr Data Fetching

2 participants