Skip to content

Commit

Permalink
Merge pull request #213 from BenBrostoff/apply-formatting
Browse files Browse the repository at this point in the history
Add formatting
  • Loading branch information
BenBrostoff authored Dec 23, 2023
2 parents 4ddb6cf + 14a121a commit ba2ebc6
Show file tree
Hide file tree
Showing 45 changed files with 2,022 additions and 2,033 deletions.
2 changes: 1 addition & 1 deletion draftfast/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
exposure,
pickem,
showdown,
constants
constants,
)

assert optimize
Expand Down
10 changes: 6 additions & 4 deletions draftfast/constants/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
from draftfast.constants.roster_size import ROSTER_SIZE_BY_SITE_BY_SPORT
from draftfast.constants.positions import (POSITIONS_BY_SITE_BY_LEAGUE,
NBA_GENERAL_POSITIONS,
MLB_GENERAL_POSITIONS,
WNBA_GENERAL_POSITIONS)
from draftfast.constants.positions import (
POSITIONS_BY_SITE_BY_LEAGUE,
NBA_GENERAL_POSITIONS,
MLB_GENERAL_POSITIONS,
WNBA_GENERAL_POSITIONS,
)
from draftfast.constants.salary_cap import SALARY_CAP_BY_SITE_BY_LEAGUE

assert ROSTER_SIZE_BY_SITE_BY_SPORT
Expand Down
249 changes: 122 additions & 127 deletions draftfast/constants/positions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,141 +2,136 @@


POSITIONS_BY_SITE_BY_LEAGUE = {
'DRAFT_KINGS': {
'NBA': [
['PG', 1, 3],
['SG', 1, 3],
['SF', 1, 3],
['PF', 1, 3],
['C', 1, 2]
],
'NBA_SHOWDOWN': [
['CPT', 1, 1],
['FLEX', 5, 5],
],
'WNBA': [
['PG', 1, 3],
['SG', 1, 3],
['SF', 1, 4],
['PF', 1, 4],
],
'NFL': get_nfl_positions(),
'NFL_SHOWDOWN': get_nfl_showdown_positions(dk=True),
'MLB': [
['SP', 0, 2],
['RP', 0, 2],
['C', 1, 1],
['1B', 1, 1],
['2B', 1, 1],
['3B', 1, 1],
['SS', 1, 1],
['OF', 3, 3],
],
'SOCCER': [
['F', 2, 3],
['M', 2, 3],
['D', 2, 3],
['GK', 1, 2],
],
'EL': [
['G', 2, 3],
['F', 3, 4],
],
'NHL': [
['C', 2, 3],
['W', 3, 4],
['D', 2, 3],
['G', 1, 1],
],
'NHL_SHOWDOWN': [
['FLEX', 6, 6],
],
'MLB_SHOWDOWN': [
['CPT', 1, 1],
['FLEX', 5, 5],
],
'XFL': [
['QB', 1, 1],
['RB', 1, 3],
['WR', 2, 4],
['DST', 1, 1]
],
'TEN': [
['P', 6, 6],
],
'PGA': [
['G', 6, 6],
],
'PGA_CAPTAIN': [
['CPT', 1, 1],
['G', 5, 5],
],
'CSGO_SHOWDOWN': [
['CPT', 1, 1],
['FLEX', 5, 5],
],
'F1_SHOWDOWN': [
['CPT', 1, 1],
['D', 4, 4],
['CNSTR', 1, 1],
],
'NASCAR': [
['D', 6, 6],
]
"DRAFT_KINGS": {
"NBA": [
["PG", 1, 3],
["SG", 1, 3],
["SF", 1, 3],
["PF", 1, 3],
["C", 1, 2],
],
"NBA_SHOWDOWN": [
["CPT", 1, 1],
["FLEX", 5, 5],
],
"WNBA": [
["PG", 1, 3],
["SG", 1, 3],
["SF", 1, 4],
["PF", 1, 4],
],
"NFL": get_nfl_positions(),
"NFL_SHOWDOWN": get_nfl_showdown_positions(dk=True),
"MLB": [
["SP", 0, 2],
["RP", 0, 2],
["C", 1, 1],
["1B", 1, 1],
["2B", 1, 1],
["3B", 1, 1],
["SS", 1, 1],
["OF", 3, 3],
],
"SOCCER": [
["F", 2, 3],
["M", 2, 3],
["D", 2, 3],
["GK", 1, 2],
],
"EL": [
["G", 2, 3],
["F", 3, 4],
],
"NHL": [
["C", 2, 3],
["W", 3, 4],
["D", 2, 3],
["G", 1, 1],
],
"NHL_SHOWDOWN": [
["FLEX", 6, 6],
],
"MLB_SHOWDOWN": [
["CPT", 1, 1],
["FLEX", 5, 5],
],
"XFL": [["QB", 1, 1], ["RB", 1, 3], ["WR", 2, 4], ["DST", 1, 1]],
"TEN": [
["P", 6, 6],
],
"PGA": [
["G", 6, 6],
],
"PGA_CAPTAIN": [
["CPT", 1, 1],
["G", 5, 5],
],
"CSGO_SHOWDOWN": [
["CPT", 1, 1],
["FLEX", 5, 5],
],
"F1_SHOWDOWN": [
["CPT", 1, 1],
["D", 4, 4],
["CNSTR", 1, 1],
],
"NASCAR": [
["D", 6, 6],
],
},
"FAN_DUEL": {
"NBA": [
["PG", 2, 2],
["SG", 2, 2],
["SF", 2, 2],
["PF", 2, 2],
["C", 1, 1],
],
"MLB": [
["P", 1, 1],
["1B", 1, 2], # TODO - allow C or 1B
["2B", 1, 2],
["3B", 1, 2],
["SS", 1, 2],
["OF", 3, 4],
],
"MLB_MVP": [
["MVP", 1, 1],
["STAR", 1, 1],
["UTIL", 3, 3],
],
"NBA_MVP": [
["MVP", 1, 1],
["STAR", 1, 1],
["PRO", 1, 1],
["UTIL", 2, 2],
],
"WNBA": [
["G", 3, 3],
["F", 4, 4],
],
"NFL": get_nfl_positions(d_abbrev="D"),
"NFL_MVP": get_nfl_showdown_positions(fd=True),
"NASCAR": [
["D", 5, 5],
],
"PGA": [
["G", 6, 6],
],
},
'FAN_DUEL': {
'NBA': [
['PG', 2, 2],
['SG', 2, 2],
['SF', 2, 2],
['PF', 2, 2],
['C', 1, 1],
],
'MLB': [
['P', 1, 1],
['1B', 1, 2], # TODO - allow C or 1B
['2B', 1, 2],
['3B', 1, 2],
['SS', 1, 2],
['OF', 3, 4],
],
'MLB_MVP': [
['MVP', 1, 1],
['STAR', 1, 1],
['UTIL', 3, 3],
],
'NBA_MVP': [
['MVP', 1, 1],
['STAR', 1, 1],
['PRO', 1, 1],
['UTIL', 2, 2],
],
'WNBA': [
['G', 3, 3],
['F', 4, 4],
],
'NFL': get_nfl_positions(d_abbrev='D'),
'NFL_MVP': get_nfl_showdown_positions(fd=True),
'NASCAR': [
['D', 5, 5],
],
'PGA': [
['G', 6, 6],
],
}
}

NBA_GENERAL_POSITIONS = [
['G', 3, 4],
['F', 3, 4],
['C', 1, 2],
["G", 3, 4],
["F", 3, 4],
["C", 1, 2],
]

MLB_GENERAL_POSITIONS = [
['P', 2, 2],
["P", 2, 2],
]

WNBA_GENERAL_POSITIONS = [
['G', 2, 3],
['F', 3, 4],
["G", 2, 3],
["F", 3, 4],
]
60 changes: 30 additions & 30 deletions draftfast/constants/roster_size.py
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
ROSTER_SIZE_BY_SITE_BY_SPORT = {
'DRAFT_KINGS': {
'NFL': 9,
'NFL_SHOWDOWN': 6,
'MLB_SHOWDOWN': 6,
'NBA': 8,
'NBA_SHOWDOWN': 6,
'WNBA': 6,
'MLB': 10,
'SOCCER': 8,
'EL': 6,
'NHL': 9,
'NHL_SHOWDOWN': 6,
'XFL': 7,
'TEN': 6,
'PGA': 6,
'PGA_CAPTAIN': 6,
'CSGO_SHOWDOWN': 6,
'NASCAR': 6,
'F1_SHOWDOWN': 6,
"DRAFT_KINGS": {
"NFL": 9,
"NFL_SHOWDOWN": 6,
"MLB_SHOWDOWN": 6,
"NBA": 8,
"NBA_SHOWDOWN": 6,
"WNBA": 6,
"MLB": 10,
"SOCCER": 8,
"EL": 6,
"NHL": 9,
"NHL_SHOWDOWN": 6,
"XFL": 7,
"TEN": 6,
"PGA": 6,
"PGA_CAPTAIN": 6,
"CSGO_SHOWDOWN": 6,
"NASCAR": 6,
"F1_SHOWDOWN": 6,
},
"FAN_DUEL": {
"NFL": 9,
"NFL_MVP": 5,
"MLB_MVP": 5,
"NBA_MVP": 5,
"NBA": 9,
"MLB": 9,
"WNBA": 7,
"NASCAR": 5,
"PGA": 6,
},
'FAN_DUEL': {
'NFL': 9,
'NFL_MVP': 5,
'MLB_MVP': 5,
'NBA_MVP': 5,
'NBA': 9,
'MLB': 9,
'WNBA': 7,
'NASCAR': 5,
'PGA': 6,
}
}
Loading

0 comments on commit ba2ebc6

Please sign in to comment.