Skip to content

Calculates the past win rate between two First Robotics Competition teams over a specified range of seasons

License

Notifications You must be signed in to change notification settings

gabeStuk/FRC-Win-Rate-Calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Usage

  • Clone the repository and run run.bat/run.sh with cmd /k run.bat/bash run.sh/zsh run.sh or with python frcwr.py if you've already got pip up to date

    Cmd:

    git clone https://github.com/gabeStuk/FRC-Win-Rate-Calculator
    dir FRC-Win-Rate-Calculator
    cmd /K run.sh

    Bash:

    git clone https://github.com/gabeStuk/FRC-Win-Rate-Calculator
    cd FRC-Win-Rate-Calculator
    bash run.sh

    Zsh:

    git clone https://github.com/gabeStuk/FRC-Win-Rate-Calculator
    cd FRC-Win-Rate-Calculator
    zsh run.sh
  • If you run the program after cloning the repository (without the action), you will need to supply an api key. Go here to make an account and then scroll down to the Read API Keys, add a new key, and copy the X-TBA-Auth-Key value into the program's prompt

  • You can also run this program from the actions tab by triggering the Run Script action (you will need to fork the repository):

Screenshot 2024-04-24 194905 the output is located in the run-py job in the (4) Run Python step: Screenshot 2024-04-24 221159 Screenshot 2024-04-24 221219

Requirements

  • requires python (tested and verified for 3.12)
    • for most systems, the run.bat/run.sh script will automatically install pip with python -m ensurepip if not installed. However, WSL users will have to install pip seperately, which varies by distro, but here is a good article explaining the process for different package managers.
    • or just use the action

Notes

  • The run.bat/run.sh file is made explicitly to update pip, and therefore will not be necessary for further runs of the program. Use python frcwr.py for future runs instead.
  • The start year and end year are optional parameters. The start year defaults to the later of the two teams' rookie years, and the end year defaults to the current season.
  • If you look at the action yml or python script, you will see that the script supports cli with mandatory inputs of -team1 and -team2 (self explanatory), the -start and -end years (optional), and an optional input for the api -key (overrides cached/inputted api key). Note this is only if you execute the python file directly as referenced in Note 1.

About

Calculates the past win rate between two First Robotics Competition teams over a specified range of seasons

Resources

License

Stars

Watchers

Forks