From 9f5b5ac0c98d9a9023b3527e5b360b139c2a7c1d Mon Sep 17 00:00:00 2001 From: Andres Pitta Date: Sun, 22 Mar 2020 19:26:09 -0700 Subject: [PATCH 1/3] feat: added dependencies to the readme file and instructions on how to install them --- README.md | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 79 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c95c471..9416888 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,83 @@ The official documentation is currently in development and not available now. We +### Dependencies + +Before installing the package make sure your working environment complies with the following dependecies: + +- Python 3.7 + +- Pandas 1.0.1 or higher. To install the lastest release of the package via conda-forge channels use: + +```sh +conda install pandas +``` +or via PyPI: + +```sh +pip install --upgrade pandas +``` + +- Pytest 5.3.5 or higher. To install the lastest release of the package via conda-forge channels use: + +```sh +conda install pytest +``` + +or via PyPI: + +```sh +pip install --upgrade pytest +``` + +- Numpy 1.18.1 or higher. To install the lastest release of the package via conda-forge channels use: + +```sh +conda install numpy +``` + +or via PyPI: + +```sh +pip install --upgrade numpy +``` + +- Altair 4.0.1. To install this specific realese via conda-forge channels use: + +```sh +conda install altair=4.0.1 +``` + +or via PyPI: + +```sh +pip install --upgrade altair==4.0.1 +``` + +- Selenium 5.3.5 or higher. To install the lastest realese of this package via conda-forge channels use: + +```sh +conda install selenium +``` + +- Request 2.23.0 or higher. To install the lastest realese of this package via conda-forge channels use: + +```sh +conda install requests +``` + +or via PyPI: + +```sh +pip install --upgrade requests +``` + +- Python-semantic-release 4.10.0 or higher. To install the lastest realese of this package via PyPI use: + +```sh +pip install --upgrade python-semantic-release +``` + ### Usage and Testing Instructions/Requirements The `pysketball` package uses the Selenium tool as part of its `nba_scraper` function. Thus, it is necessary to install a webdriver for Selenium's automated driver web browsing. @@ -118,8 +195,8 @@ With the scraped data in the form of a `pandas.DataFrame` called `nba_2018_regul >>> from pysketball.nba_ranking import nba_ranking >>> from pysketball.nba_team_stats import nba_team_stats >>> # Scrape regular season 2018/19 and return a dataframe while storing it as csv file called "nba_2018_regular.csv" ->>> nba_boxplot(nba_2018_regular, position= "POS", teams= None, stats= "GP") ->>> nba_ranking(nba_2018_regular, 'PLAYER' , 'GP', top = 2, ascending = False, fun = 'mean') +>>> nba_boxplot(nba_2018_regular, position= 'POS', teams= None, stats= 'GP') +>>> nba_ranking(nba_2018_regular, 'NAME' , 'GP', top = 2, ascending = False, fun = 'mean') >>> nba_team_stats.nba_team_stats(nba_2018_regular, stats_filter = ['GP', '3PM', 'FT%'],teams_filter = ['UTAH', 'PHX', 'DET'],positions_filter = ['C', 'PG']) ``` From 901d425e5f7659c62f508e3c534ec38cda54ca11 Mon Sep 17 00:00:00 2001 From: Andres Pitta Date: Sun, 22 Mar 2020 19:32:58 -0700 Subject: [PATCH 2/3] feat: changed nba_ranking error message --- pysketball/nba_ranking.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pysketball/nba_ranking.py b/pysketball/nba_ranking.py index 9a321e8..6b86b46 100644 --- a/pysketball/nba_ranking.py +++ b/pysketball/nba_ranking.py @@ -63,7 +63,7 @@ def nba_ranking(data, column, by, top=10, ascending=True, fun='mean'): # The descending argument should be a boolean if (fun not in ['sum', 'mean']): - raise TypeError("The fun argument should be either var or mean") + raise TypeError("The fun argument should be either sum or mean") # Checks if the column exists in the dataframe if column not in data.columns: From 845954ced32354bb6897a1e122266d4cd15ef825 Mon Sep 17 00:00:00 2001 From: Andres Pitta Date: Sun, 22 Mar 2020 19:46:17 -0700 Subject: [PATCH 3/3] feat: changed path instructions on chromedriver --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9416888..714bd4b 100644 --- a/README.md +++ b/README.md @@ -150,7 +150,7 @@ whereis chromedriver With that, add it to your PATH in your `.bashrc` file for Linux and Mac users. ```sh -export PATH=":$PATH" +export PATH=":$PATH" ``` For Windows, please refer to this [article guide for instructions on adding PATH variables](https://helpdeskgeek.com/windows-10/add-windows-path-environment-variable/).