jldbc / pybaseball

Pull current and historical baseball statistics using Python (Statcast, Baseball Reference, FanGraphs)
MIT License
1.28k stars 334 forks source link

Code diet for Statcast + Date Iter #164

Closed schorrm closed 4 years ago

schorrm commented 4 years ago

This PR is trying to clean up the Statcast code. Functionality is mostly unchanged, with two exceptions:

  1. We now delegate the date thing to a specialized iterator (see date_range in utils). I think this cleans stuff up a lot.
  2. Instead of a complicated system of backoffs and recoveries, we now approach fault tolerance in large requests by yelling at people to turn their cache on if it is off. And it's probably a more fault tolerant approach anyway, to boot.
schorrm commented 4 years ago

@bdilday this makes a change to your dict, it's now dict of tuples instead of dict of dicts to make the code paths a bit simpler, if that's okay?

schorrm commented 4 years ago

Since yesterday was last day, I tweaked to that day. @bdilday , final sign-off?