BenBrostoff / draftfast

A tool to automate and optimize DraftKings and FanDuel lineup construction.
287 stars 113 forks source link

[WIP] Group constraints #93

Closed sharkiteuthis closed 5 years ago

sharkiteuthis commented 5 years ago

So far just adding a groups file and parsing it, not implementing constraints

sharkiteuthis commented 5 years ago

@BenBrostoff this is still a WIP, but I generalized groups into Rules that are contained within an (iterable) RuleSet object. Next thing on my list is to write the code to check for certain rule conflicts up front, then write tests.

Actually implementing the rules as constraints is going to run into conflicts with the pip module work you're doing for sure, so I'll take a look at that tomorrow.

BenBrostoff commented 5 years ago

@sharkiteuthis Going to work on the pip module over the weekend and hopefully it can get merged it by Sunday 👍

sharkiteuthis commented 5 years ago

@BenBrostoff I'm going to pull your pip branch tonight and start merging this stuff into that branch instead, as well as refactoring everything into Rules and Rulesets.

BenBrostoff commented 5 years ago

FYI if you pick this up this weekend, I hate formatting stuff so I've just starting using autopep8. Once you have it globally:

autopep8 --in-place --aggressive ./draftfast/**/*.py