avgupta456 / statbotics

📈 Modernizing Data Analytics for FRC Robotics
https://statbotics.io/
MIT License
64 stars 10 forks source link

get_matches() ignores the elim input #192

Closed INeedCaffeine closed 1 year ago

INeedCaffeine commented 1 year ago

When I set the elims=True on a get_matches() call, I still get back stats for a teams qualifier matches. This can easily be seen running this script:

import statbotics

sb = statbotics.Statbotics()

elim_matches = sb.get_matches( team = 6413, event = "2022azva", elims = True ) 

for match in elim_matches:
    print( f'Match code: {match[ "key" ]}' )

results in this output:

Match code: 2022azva_qm4 Match code: 2022azva_qm10 Match code: 2022azva_qm14 Match code: 2022azva_qm19 Match code: 2022azva_qm25 Match code: 2022azva_qm30 Match code: 2022azva_qm39 Match code: 2022azva_qm46 Match code: 2022azva_qm49 Match code: 2022azva_qm54 Match code: 2022azva_qm65 Match code: 2022azva_qm69 Match code: 2022azva_qf2m1 Match code: 2022azva_qf2m2

Only the last 2 entries are elimination matches. The others are all qualifiers.

avgupta456 commented 1 year ago

Hi, thanks for raising this issue. I realized this was due to a small naming mismatch between "playoff" and "elims" in my codebase. If you update to version 2.0.3, this issue should be resolved.

pip install --upgrade statbotics

import statbotics

sb = statbotics.Statbotics()

elim_matches = sb.get_matches( team = 6413, event = "2022azva", elims = True ) 

for match in elim_matches:
    print( f'Match code: {match[ "key" ]}' )

Now results in the following output

Match code: 2022azva_qf2m1
Match code: 2022azva_qf2m2

Feel free to reopen this issue if you are still running into this problem.