Skip to content

League-Advisor/league-advisor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

89 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

League Advisor

We are deployed on GitHub!

League Advisor


CLI Program

This CLI program consists of a frontend written in python.

The program provides recommended item builds based on the user's team and enemy team composition.

League of Legends is a fast-paced MOBA game, once pre-match stage is complete and enemy team composition is revealed, a player has to start planning their build path for the entire match.

Every and each champion has an ideal build path that brings out the best of the character, but they still need to keep in mind who are they facing on the opposite side.

A player often has to do lots of mental math in order to figure out what should they go for and in which order, while keeping in mind the frequent adjustment and changes that champions and items go through almost every other week.


Features and Tests

CLI program that provides the following:

• Preview the welcoming message and the list of options and ask the user which option he want to preview.

• Preview the Rules of the League of Legends Game if the user choose to preview the rules.

• The user want to preview the champions and the items in the game.

• The user want to preview the optimal items for the champion in General.

• The user want to know which items are optimal with respect to his team champions also with respect to the enemy team champions.


User Stories

GitHub Projects


Wireframes

league_advisor_wireframe_1 league_advisor_wireframe_2 league_advisor_wireframe_3 league_advisor_wireframe_4 league_advisor_wireframe_5


Domain Model

Domain_Model


Project Directory Tree

.
├── LICENSE
├── README.md
├── assets
│   ├── Domain_Model_old.png
│   ├── domain_model.png
│   ├── league_advisor_wireframe_1.png
│   ├── league_advisor_wireframe_2.png
│   ├── league_advisor_wireframe_3.png
│   ├── league_advisor_wireframe_4.png
│   └── league_advisor_wireframe_5.png
├── league_advisor
│   ├── __pycache__
│   │   ├── discover.cpython-39.pyc
│   │   ├── input_handler.cpython-39.pyc
│   │   ├── league_advisor.cpython-39.pyc
│   │   ├── league_browser.cpython-39.pyc
│   │   ├── league_scraper.cpython-39.pyc
│   │   ├── match_data_analysis.cpython-39.pyc
│   │   ├── ranked_items.cpython-39.pyc
│   │   ├── solo_items.cpython-39.pyc
│   │   └── test.cpython-39.pyc
│   ├── discover.py
│   ├── input_handler.py
│   ├── league_advisor.py
│   ├── league_browser.py
│   ├── league_scraper.py
│   ├── match-data-analysis.ipynb
│   ├── match_data_analysis.py
│   ├── match_data_scraper.py
│   ├── ranked_items.py
│   ├── solo_items.py
│   ├── string_assets
│   │   ├── __pycache__
│   │   │   ├── champs.cpython-39.pyc
│   │   │   ├── champs_color.cpython-39.pyc
│   │   │   ├── colors.cpython-39.pyc
│   │   │   ├── items.cpython-39.pyc
│   │   │   ├── items_color.cpython-39.pyc
│   │   │   └── menu_strings.cpython-39.pyc
│   │   ├── analyzed_item.json
│   │   ├── champions.json
│   │   ├── champions.py
│   │   ├── champs.py
│   │   ├── champs_color.py
│   │   ├── colors.py
│   │   ├── filtered_data.json
│   │   ├── games.json
│   │   ├── html.html
│   │   ├── items.json
│   │   ├── items.py
│   │   ├── items_color.py
│   │   ├── match.json
│   │   ├── match_data_analysis.csv
│   │   ├── menu_strings.py
│   │   └── string_file.txt
│   └── test.py
├── poetry.lock
├── pyproject.toml
├── requirements.md
└── tests
    ├── __pycache__
    │   ├── flo.cpython-39.pyc
    │   ├── test_browser_recieve_champions.cpython-39-pytest-6.2.5.pyc
    │   ├── test_discover.cpython-39-pytest-6.2.5.pyc
    │   ├── test_input_handler.cpython-39-pytest-6.2.5.pyc
    │   ├── test_league_advisor.cpython-39-pytest-6.2.5.pyc
    │   ├── test_league_browser.cpython-39-pytest-6.2.5.pyc
    │   ├── test_league_scraper.cpython-39-pytest-6.2.5.pyc
    │   ├── test_match_data_analysis.cpython-39-pytest-6.2.5.pyc
    │   ├── test_match_scraper.cpython-39-pytest-6.2.5.pyc
    │   ├── test_module_browser_recieve_champions.cpython-39-pytest-6.2.5.pyc
    │   ├── test_module_discover.cpython-39-pytest-6.2.5.pyc
    │   ├── test_module_league_scraper.cpython-39-pytest-6.2.5.pyc
    │   ├── test_module_match_scraper.cpython-39-pytest-6.2.5.pyc
    │   ├── test_module_solo_items.cpython-39-pytest-6.2.5.pyc
    │   ├── test_sim_discover.cpython-39-pytest-6.2.5.pyc
    │   ├── test_sim_input_handler.cpython-39-pytest-6.2.5.pyc
    │   ├── test_sim_league_advisor.cpython-39-pytest-6.2.5.pyc
    │   ├── test_sim_league_browser.cpython-39-pytest-6.2.5.pyc
    │   ├── test_sim_ranked_item.cpython-39-pytest-6.2.5.pyc
    │   ├── test_sim_solo_item.cpython-39-pytest-6.2.5.pyc
    │   ├── test_solo_items.cpython-39-pytest-6.2.5.pyc
    │   ├── test_solo_items_AAA.cpython-39-pytest-6.2.5.pyc
    │   ├── test_solo_items_b.cpython-39-pytest-6.2.5.pyc
    │   └── test_solo_items_sim.cpython-39-pytest-6.2.5.pyc
    ├── flo.py
    ├── simulations
    │   ├── browser_recieve_champions_info.sim.txt
    │   ├── browser_recieve_champions_start.sim.txt
    │   ├── color_mode.sim.txt
    │   ├── discover_method.sim.txt
    │   ├── discover_method_any_key.txt
    │   ├── discover_method_quit.txt
    │   ├── help_color.sim.txt
    │   ├── help_user.sim.txt
    │   ├── input_handler_else.sim.txt
    │   ├── leaguebrowser_receive_item_method_classes.sim.txt
    │   ├── leaguebrowser_receive_item_method_classes_backmenu.sim.txt
    │   ├── leaguebrowser_receive_item_method_names.sim.txt
    │   ├── leaguebrowser_receive_item_method_nanes_backmenu.sim.txt
    │   ├── leaguebrowser_receive_user_input_method_item.sim.txt
    │   ├── leaguebrowser_receive_user_input_method_quit.sim.txt
    │   ├── matchdata_analyzer.sim.txt
    │   ├── quetter.sim.txt
    │   ├── ranked_error_color.sim.txt
    │   ├── ranked_item_color_r.sim.txt
    │   ├── solo_champion.sim.txt
    │   ├── solo_champion_back.sim.txt
    │   ├── solo_champion_back_color.sim.txt
    │   ├── solo_champion_color.sim.txt
    │   ├── solo_champion_error.sim.txt
    │   ├── solo_champion_error_color.sim.txt
    │   ├── solo_champion_quit.sim.txt
    │   ├── solo_champion_quit_color.sim.txt
    │   └── welcome_screen.sim.txt
    ├── test_match_data_analysis.py
    ├── test_module_browser_recieve_champions.py
    ├── test_module_discover.py
    ├── test_module_league_scraper.py
    ├── test_module_match_scraper.py
    ├── test_module_solo_items.py
    ├── test_sim_discover.py
    ├── test_sim_input_handler.py
    ├── test_sim_league_advisor.py
    ├── test_sim_league_browser.py
    ├── test_sim_ranked_item.py
    └── test_sim_solo_item.py

Tools Used

VS Code GitHub Projects

- Python
- Pytest
- Poetry
- PyEnv
- pytest-cov
- flake8
- black
- bs4
- Requests
- dotenv
- jupyterlab
- pandas
- difflib
- collections
- builtins

Recent Updates

V 0.1

Project created - 2 Nov 2021

V 0.2

Software Requirements - 3 Nov 2021

V 0.3

User Stories,Domain Model and Wireframes - 4 Nov 2021

V 0.4

league_advisor and input_handler modules - 5 Nov 2021

V 0.4.1

_input_handler unittests and ascii art and color codes- 6 Nov 2021

V 0.5

discover module and unittests - 6 Nov 2021

V 0.6

scrape module and unittests - 7 Nov 2021

V 0.6.1

browser module and get_items method, receive_user_input - 7 Nov 2021

V 0.6.2

receive_champions method for browser module - 7 Nov 2021

V 0.6.2.1

print champion figures in champion browser - 7 Nov 2021

V 0.6.3

added flo simulation logic module - 7 Nov 2021

V 0.6.4

adding some simulation tests - 7 Nov 2021

V 0.6.5

extended champion browser print functionality - 8 Nov 2021

V 0.6.6

adding simulation tests for receive_items method - 8 Nov 2021

V 0.7

solo_items and unit tests -7 Nov 2021

V 0.8.0

adding match_data_scraper and ranked_items modules and games data json file - 7 Nov 2021

V 0.8.1

adding match_scraper, get_match_data_by_id, and filter_match_data methods to match_data_scraper module - 8 Nov 2021

V 0.8.2

adding data analysis method for ranked module inprogress - 8 Nov 2021

V 0.8.3

extended match_scraper functionality to handle larger data queries and added mroe unittests - 9 Nov 2021

V 0.8.4

data_analyzer method for MatchData class - 9 Nov 2021

v 0.8.5

adding the ranked item module and prompt_user method,handle_user_input method,handle_user_choice method - 8 Nov 2021

V 0.9.0

implementing color mode in league champion browser feature - 9 Nov 2021

V 0.9.1

implemented color mode in champions browser - 9 Nov 2021

v 0.9.2

updating the ranked item module to handle both team and the proper check for them weather in numbers of champions also the repeated champion in both team or repeated name in same team - 9 Nov 2021

V 0.9.3

adding color mode to other features and polishing them - 9 Nov 2021

V0.9.3.1

test: adding automated unit tests for input_handler and solo_item modules - 9 Nov 2021

V 0.9.9.4

""refactor:implementing color mode into ranked champion and formatting prints"" - 10 Nov 2021

V 0.9.5

discover module unittests - 9 Nov 2021

V0.9.5.1

fix: added the ability to test colored text and edited assets - 10 Nov 2021

V 0.9.7

match data analysis module unittests - 9 Nov 2021

V 0.9.8

test: recieve_champions method for LeagueBrowser class module unittests

V 0.9.8.1

fix: fixed automated unittests - 10 Nov 2021

V 0.9.9.1

refactor: refactor the ranked module in basic mode and color mode - 10 Nov 2021

V 0.9.9.2

docs: fixed docstrings - 10 Nov 2021

V 0.9.9.3

test: added tests for solo champion - 10 Nov 2021

V 0.9.9.4

test: fix the test for match data analysis module after refactoring the module - 10 Nov 2021

V 0.9.9.5

refactor:implementing color mode into ranked champion and formatting prints - 10 Nov 2021

V 0.9.9.6

docs: adding domain model image and get started section to the README- 10 Nov 2021

V 0.9.9.7

refactor:updating the ranked item with color and add automated test - 10 Nov 2021

V 0.9.9.8

testing match data analysis module - 10 Nov 2021

V 0.9.9.9

refactor:refactore the ranked item with color and add automated tests - 10 Nov 2021

V 1.0

docs: added project tree and test coverage - 11 Nov 2021


Getting Started

Clone this repository to your local machine.

Set the program repo locally on your machine: 

`$ git clone [email protected]:League-Advisor/league-advisor.git`

---------------------------------------------------------------

Navigate to the repo's directory and install required  dependencies:

`$ poetry install`

---------------------------------------------------------------

Run the your code editor of choice

`$ code .`

---------------------------------------------------------------

Run poetry shell

`$ poetry shell`

---------------------------------------------------------------

For the first time using the program, or if you have deleted the included data files, go to `match_data_scraper.py` and uncomment the entire module.

Add your RIOT API key to .env file as shown in .env.sample.

Be sure to read the warnings carefully.

Run the module, this step may take some time and cosume data:

`$ python -m league_advisor.match_data_scraper`

Once it's done, comment the module again to avoid running it again by accident.
---------------------------------------------------------------

Run the core module and enjoy your easy access to all you need from LeagueAdvisor:

`$ python -m league_advisor.league_advisor`

Change Log

v0.1: created project repo and setup tooling for project management - 2 Nov 2021

v0.2: docs: Adding the software requermints and adding domain model - 3 Nov 2021

v0.3: docs: Adding user stories ,update domain model and wireframes - 4 Nov 2021

v0.4: feat: adding league_advisor and input_handler modules - 5 Nov 2021

v0.4.1: feat: adding unittests and ascii art and color codes - 6 Nov 2021

v0.5: feat: adding discover module and it's unittests - 6 Nov 2021

v0.6: feat: adding scrape module and it's unittests - 7 Nov 2021

v0.6.1: feat: adding browser module and get_items method, receive_user_input - 7 Nov 2021

v0.6.2: feat: adding receive_champions method for browser module - 7 Nov 2021

v06.2.1: feat: adding champion figures to champion browser - 7 Nov 2021

v0.6.1: feat: adding browser module and receive_items method, receive_user_input- 7 Nov 2021

v0.6.3: added flo simulation logic module - 7 Nov 2021

v0.6.4: test: adding some simulation tests- 7 Nov 2021

v0.6.4.1: feat: 90% compleated from receive_items method in browser module- 7 Nov 2021

v0.6.4.2: test: simulation tests for receive_items method in browser module- 8 Nov 2021

v0.6.5 extended champion browser print functionality - 8 Nov 2021

v0.6.6 adding simulation tests for receive_items method - 8 Nov 2021

v0.7: feat: adding solo_items and unit tests -7 Nov 2021

v0.8.0: feat: adding match_data_scraper and ranked_items modules games data json file - 7 Nov 2021

v0.8.1 feat: adding match_scraper, get_match_data_by_id, and filter_match_data methods to match_data_scraper module - 8 Nov 2021

v0.8.2 feat : data analysis method for ranked module inprogress - 8 Nov 2021

v0.8.3 feat: extended match_scraper functionality to handle larger data queries and added mroe unittests - 9 Nov 2021

v0.8.4 feat : data_analyzer method for MatchData class - 9 Nov 2021

v0.8.5 _feat: adding ranked_item, get user choice and comapre it with the list of champions and then send it to data analysis module to pick the optimal items for the user with respect to user team champions also with respect to enemy team champions _ - 8 Nov 2021

v0.9.0: feat: implementing color mode in league champion browser feature - 9 Nov 2021

v0.9.1 feat: implemented color mode in champions browser - 9 Nov 2021

v0.9.2 feat: updating ranked item module to handle the both user and enemy teams also check if champion names are in the game also check if there is a repeated name in side both team - 9 Nov 2021

v0.9.3 refactor: adding color mode to other features and polishing them - 9 Nov 2021

v0.9.3.1 test: adding automated unit tests for input_handler and solo_item modules - 9 Nov 2021

v0.9.5 test: discover module unittests - 9 Nov 2021

v0.9.5.1 fix: added the ability to test colored text and edited assets - 10 Nov 2021

v0.9.7 test: match data analysis module unittests - 10 Nov 2021

v0.9.8 test: recieve_champions method for LeagueBrowser class module unittests - 10 Nov 2021

v0.9.8.1 fix: fixed automated unittests - 10 Nov 2021

v0.9.8.2 docs: fixed docstrings - 10 Nov 2021

v0.9.9.1 refactor: refactor the ranked module in basic mode and color mode_ - 10 Nov 2021

v0.9.9.2 docs: fixed docstrings - 10 Nov 2021

v0.9.9.3 test: added tests for solo champion - 10 Nov 2021

v0.9.9.4 refactor:implementing color mode into ranked champion and formatting prints - 10 Nov 2021

v0.9.9.6 refactor:ranked item module and impleminting the color mode and add automated test - 10 Nov 2021

v0.9.9.4 test: fix the test for match data analysis module after refactoring the module - 10 Nov 2021

v0.9.9.5 refactor:implementing color mode into ranked champion and formatting prints - 10 Nov 2021

v0.9.9.6 docs: adding domain model image and get started section to the README- 10 Nov 2021

v0.9.9.7 refactor:ranked item module and impleminting the color mode and add automated test - 10 Nov 2021

v0.9.9.8 test: testing match data analysis module - 10 Nov 2021

v0.9.9.9 refactor:ranked item module and impleminting the color mode and add automated tests - 10 Nov 2021

v1.0 docs: added project tree and test coverage - 11 Nov 2021


Testing Coverage

----------- coverage: platform linux, python 3.9.5-final-0 -----------
Name                                             Stmts   Miss  Cover
--------------------------------------------------------------------
league_advisor/discover.py                          16      1    94%
league_advisor/input_handler.py                     60      9    85%
league_advisor/league_advisor.py                    28      2    93%
league_advisor/league_browser.py                   182     43    76%
league_advisor/league_scraper.py                    17      0   100%
league_advisor/match_data_analysis.py              163      2    99%
league_advisor/ranked_items.py                     105     25    76%
league_advisor/solo_items.py                        90      6    93%
league_advisor/string_assets/champs.py               1      0   100%
league_advisor/string_assets/champs_color.py         2      0   100%
league_advisor/string_assets/colors.py              21      0   100%
league_advisor/string_assets/items.py                1      0   100%
league_advisor/string_assets/items_color.py          2      0   100%
league_advisor/string_assets/menu_strings.py         2      0   100%
tests/flo.py                                        44      0   100%
tests/test_match_data_analysis.py                   21      0   100%
tests/test_module_browser_recieve_champions.py       3      0   100%
tests/test_module_discover.py                        9      0   100%
tests/test_module_league_scraper.py                 13      0   100%
tests/test_module_match_scraper.py                   0      0   100%
tests/test_module_solo_items.py                     21      0   100%
tests/test_sim_discover.py                          14      0   100%
tests/test_sim_input_handler.py                     75      0   100%
tests/test_sim_league_advisor.py                    10      0   100%
tests/test_sim_league_browser.py                    32      0   100%
tests/test_sim_ranked_item.py                       10      0   100%
tests/test_sim_solo_item.py                         34      0   100%
--------------------------------------------------------------------
TOTAL                                              976     88    91%

Authors

  • Bashar Taamneh
  • Du'a Jaradat
  • Ehab Ahmad
  • Mohammed Al-Hanbali

About

The program provides recommended item builds based on the user's team and enemy team composition.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •