ajtran303 / bball-stats

Project 2 of the Treehouse Python TechDegree

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Basketball Team Stats Tool

Getting Started

Installation

Clone and navigate into the repo:

git clone https://github.com/ajtran303/bball-stats.git
cd bball-stats

Run the tests

There should be 21 passing tests:

python3 -m unittest

I have tests for my functions that make stats, clean data, and balance teams. I do not have testa for the "view logic" in my dunder main statement. I would need to learn about mocking and stubbing user input in order to test those. For now I'm okay with testing the "implementation logic".

Generate a coverage report (optional)

  1. Activate a virtual environment to install the coverage package:
python3 -m venv .venv/
source .venv/bin/activate
pip install -r requirements.txt
  1. Generate the report and it should show 100% coverage on application.py:
coverage run -m unittest && coverage report
  1. When you are done, deactivate and remove your virtual environment.
deactivate && rm -rf .venv/

Example Usage

Start the program

From the command line:

python3 application.py

Navigate through the main menu by selecting an option:

Welcome to the Basketball Stats tool!
MAIN MENU

1) Display Team Stats
2) Quit

Enter an option:
_

Next, you will be prompted to select a team:

SELECT TEAM:
1) Panthers
2) Bandits
3) Warriors

Enter an option:
_

Selecting a valid option will display that team's statistics:

  • Total Players
  • Total Experienced Players
  • Total Inexperienced Players
  • Average Height of Players
  • Names of Players
  • Names of Guardians of Players

Selecting a non-valid option will prompt you to pick again!

Quitting the Program

Select option 2 at the MAIN MENU.

Or use the keyboard shortcut <control>+C to immediately quit.

About

Project 2 of the Treehouse Python TechDegree


Languages

Language:Python 100.0%