BenBrostoff / draftfast

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

Make pip module #63

Closed BenBrostoff closed 5 years ago

BenBrostoff commented 6 years ago

The API here seems interesting and could serve as a model.

sharkiteuthis commented 5 years ago

@BenBrostoff is this the next thing you're planning to tackle? I don't want to duplicate effort

BenBrostoff commented 5 years ago

@sharkiteuthis Yep, actually just started working on this so good timing. I'll open up a work-in-progress PR once I have more to show. Definitely let me know if you have thoughts on how this should be structured / it would be great to have you as a PR reviewer once this is ready.

sharkiteuthis commented 5 years ago

@BenBrostoff I'd be happy to. I really like the optimizer module interface you linked in the original issue.

It would be nice if we could make it a little more pythonic by implementing things like if "Russell Wilson" in roster:, move all of the print statements into their own functions so that whatever is importing and driving the optimizer is responsible for calling anything that prints to stdout, etc.

The docker setup shouldn't change, imo, since it's the dev docker setup, just need to add a test suite to check the module once it's install via pip.

sharkiteuthis commented 5 years ago

@BenBrostoff re: custom rules/functions -- I think we should create a Rule class, then subclass that into things like StackRule, GroupRule, LockedRule, BannedRule, TeamRule, etc.

Probably better to do that refactor after you merge #90 and I merge #93, though. What do you think?

BenBrostoff commented 5 years ago

@sharkiteuthis Realized I never responded to this - definitely yes on Rule* stuff. One of the benefits I'm already seeing from this refactor is that making everything class-based is a huge boon to productivity when I'm scripting stuff for different sports. With the CLI, you had to remember args and also how the internals worked to a certain degree; this way there is much better autocomplete on whatever IDE / editor you're using.

BenBrostoff commented 5 years ago

Closing because this is implemented. Let's move all discussion to #95