Git Product home page Git Product logo

Comments (5)

TheLastGimbus avatar TheLastGimbus commented on July 24, 2024

Oh, jeez...

Oh, yes yes, you are very welcome here! I just really didn't ever expect this simple script to grow to any size like that...

plans to bring some high level unit test structure into place

I may repeat myself like 3rd time in those comments, but this script is really shitty to be honest. If I would write it righ now, nowing exactly what folder structure/edge cases there are, and how many people will use it, I would do this differently:

  • for now, it kinda "walks through" the files and does stuff with them
  • what I would do, is to generate some data strucutres from all input files and data, and then play with it

Tests? Yeah, we could write some of those 👍 Righ now, I'm just in the middle of writing a GitHub action that runs the script 30 times on sample folder and measures the time. Perhaps some way to quickly test individual functions, like find_json_for_file.

my takeout contains many edge cases

Could you name some? I already have a routine of "people give me their weird photos, I tell them to send me a donation add it in some PR. Maybe the last time you checked it was some old version - we have a lot of improvments now that protect from edge cases 🚀

I'd be super happy to contribute

You can wait till I merge those #62 and #63 and maybe I will add some documenation after that

I need to stop lying to myself that this project is done and finished, because it never will be xD - I will add some contributing.mg also

from googlephotostakeouthelper.

TheLastGimbus avatar TheLastGimbus commented on July 24, 2024

Yes, you can now watch me have fun at #66

from googlephotostakeouthelper.

sebastianludwig avatar sebastianludwig commented on July 24, 2024

Perhaps some way to quickly test individual functions, like find_json_for_file.

Fine grained tests on a function level would "manifest" the current structure and get in the way of refactorings like the data structure one you mentioned.

I already have a routine of "people give me their weird photos

Correct me if I'm wrong, but we actually only need file names, not the actual contents, right? Or do we also sometimes need the JSON file contents? (to be honest I haven't read the code in detail yet)

I need to stop lying to myself that this project is done and finished, because it never will be xD

I guess that's a given with Google as a moving target on the other side ^^

I'll try to find time this week to open a draft PR to sketch out a first basic test setup proposal.

from googlephotostakeouthelper.

TheLastGimbus avatar TheLastGimbus commented on July 24, 2024

we actually only need file names

Oh no no no, we use everything to get right photo data

I will make some general "what this script does" description in contributing.md - I can ping you when I'm done, so you won't waste your patiance reverse-engineering code

first basic test setup proposal

Currently, everything is like:

def main():
  varib = 0
  def other_fun():  # Functions inside main() function
    nonlocal varib  # Ton of global variables <3

So I don't know whtether that's really test-able, but I started to think about some general tests that would go like:

  • take folder with pngs (they don't have exifs), but with jsons
  • assert that they have correct dates
  • take folder with photos which' locations were edited in Google Photos editor
  • assert that their output exifs have this location
  • etc

If you want to help:

  1. Drop me your edge-case photos - maybe we can do something with them 👍
  2. Also you can give me some exaple photos with stuff to assert - weird formats, stuff where you edited location, duplicates etc

from googlephotostakeouthelper.

sebastianludwig avatar sebastianludwig commented on July 24, 2024

Oh no no no, we use everything to get right photo data

Everything being EXIF, the file JSON, the folder/album JSON aaand..? (btw, potential last resort fallback: the filename). The point I'm getting at is that we probably don't need the actual image data, like "the pixels". At least I, and I can imagine more people, will be more comfortable sharing their photos which will eventually be hosted in this repo if they don't contain any more potential private information than the filename, EXIF data and the JSON metadata (which could also be cleaned manually if necessary).

So I don't know whtether that's really test-able, but I started to think about some general tests that would go like:

Yep, that's pretty much what I had in mind. See #68

If you want to help:

  1. Drop me your edge-case photos - maybe we can do something with them 👍
  2. Also you can give me some exaple photos with stuff to assert - weird formats, stuff where you edited location, duplicates etc

Will do in #68 👍

from googlephotostakeouthelper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.