dmaclean / dfs-python

Tools for DFS data collection and projection creation.
11 stars 2 forks source link

Make all FP calculations a single command #14

Closed dmaclean closed 10 years ago

dmaclean commented 10 years ago

Right now the CLI accepts a site argument to specify which site to calculate FPs for. This should be changed so no site argument is accepted, but the logic just runs in a loop for each site.

dmaclean commented 10 years ago

For now it's easier to just enter a command that runs the script four times in succession, each with a different site.

dmaclean commented 10 years ago

This script needs some serious refactoring. It's slow as all hell now that the _fantasypoints table has about 4MM rows and and _game_totalsbasic is close to 1MM.

dmaclean commented 10 years ago

Instead of running the calculation for all sites in a single call to save time, I decided to just add a season parameter that specifies which season to grab _game_totalsbasic and _fantasypoints rows for. Grabbing based on season will only fetch a small subset of the total table rows and cuts down each run from ~2 minutes to < 10 seconds.

Files modified: