Skip to content

Commit

Permalink
Change name to sportsipy
Browse files Browse the repository at this point in the history
To avoid confusion from users of the sports-reference website, this
project needs to be renamed to something other than sportsreference,
indicating it is not an official project.

Signed-Off-By: Robert Clark <[email protected]>
  • Loading branch information
roclark committed Jan 1, 2021
1 parent 22a45ea commit e5f8646
Show file tree
Hide file tree
Showing 225 changed files with 672 additions and 672 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. Ubuntu 18.04]
- Sportsreference Version [e.g. 0.2.0 or commit hash if using code]
- Sportsipy Version: [e.g. 0.6.0 or commit hash if using code]

**Additional context**
Add any other context about the problem here. If applicable, also include links to any pages on www.sports-reference.com that are believed to be causing this issue.
6 changes: 3 additions & 3 deletions .github/workflows/pushtests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Sportsreference push tests
name: Sportsipy push tests

on: [push, pull_request]

Expand All @@ -23,10 +23,10 @@ jobs:
pip install -r requirements.txt
- name: Run unit and integration tests with pytest
run: |
py.test --cov=sportsreference --cov-report term-missing --cov-report xml tests/integration/ tests/unit/
py.test --cov=sportsipy --cov-report term-missing --cov-report xml tests/integration/ tests/unit/
- name: Lint with pycodestyle
run: |
pycodestyle sportsreference/ tests/integration/ tests/unit/
pycodestyle sportsipy/ tests/integration/ tests/unit/
- name: Upload coverage to Codecov
if: matrix.operating-system == 'ubuntu-latest' && matrix.python-version == '3.8'
uses: codecov/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# Building files
build*
dist*
sportsreference.egg-info*
sportsipy.egg-info*

# VirtualEnv
bin/*
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Contributing
`Sportsreference` is an open-source project created for the community where
`Sportsipy` is an open-source project created for the community where
contributions are encouraged. I ask that anyone who wishes to contribute to
please read and follow the guidelines listed below. As the project grows and
changes, so too will this document. If any items are no longer relevant or need
Expand All @@ -13,7 +13,7 @@ Code of Conduct should be reported to the project maintainers.
## How Can I Contribute?
Contributions from the community make open-source projects awesome and
developers, data scientists, hobbyists, and more are encouraged to contribute to
`sportsreference`. The following are some examples on how to contribute to this
`sportsipy`. The following are some examples on how to contribute to this
project.

### Reporting bugs
Expand Down
68 changes: 34 additions & 34 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
Sportsreference: A free sports API written for python
######################################################
.. image:: https://github.com/roclark/sportsreference/workflows/Sportsreference%20push%20tests/badge.svg
:target: https://github.com/roclark/sportsreference/actions
.. image:: https://readthedocs.org/projects/sportsreference/badge/?version=latest
:target: https://sportsreference.readthedocs.io/en/latest/?badge=latest
Sportsipy: A free sports API written for python
###############################################
.. image:: https://github.com/roclark/sportsipy/workflows/Sportsipy%20push%20tests/badge.svg
:target: https://github.com/roclark/sportsipy/actions
.. image:: https://readthedocs.org/projects/sportsipy/badge/?version=latest
:target: https://sportsipy.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status
.. image:: https://img.shields.io/pypi/v/sportsreference.svg
:target: https://pypi.org/project/sportsreference
.. image:: https://img.shields.io/pypi/v/sportsipy.svg
:target: https://pypi.org/project/sportsipy

.. contents::

Sportsreference is a free python API that pulls the stats from
Sportsipy is a free python API that pulls the stats from
www.sports-reference.com and allows them to be easily be used in python-based
applications, especially ones involving data analytics and machine learning.

Sportsreference exposes a plethora of sports information from major sports
Sportsipy exposes a plethora of sports information from major sports
leagues in North America, such as the MLB, NBA, College Football and Basketball,
NFL, and NHL. Sportsreference also now supports Professional Football (or
NFL, and NHL. Sportsipy also now supports Professional Football (or
Soccer) for thousands of teams from leagues around the world. Every sport has
its own set of valid API queries ranging from the list of teams in a league, to
the date and time of a game, to the total number of wins a team has secured
Expand All @@ -26,24 +26,24 @@ picture of how a team has performed during a game or throughout a season.
Installation
============

The easiest way to install `sportsreference` is by downloading the latest
The easiest way to install `sportsipy` is by downloading the latest
released binary from PyPI using PIP. For instructions on installing PIP, visit
`PyPA.io <https://pip.pypa.io/en/stable/installing/>`_ for detailed steps on
installing the package manager for your local environment.

Next, run::

pip install sportsreference
pip install sportsipy

to download and install the latest official release of `sportsreference` on
your machine. You now have the latest stable version of `sportsreference`
to download and install the latest official release of `sportsipy` on
your machine. You now have the latest stable version of `sportsipy`
installed and can begin using it following the examples below!

If the bleeding-edge version of `sportsreference` is desired, clone this
If the bleeding-edge version of `sportsipy` is desired, clone this
repository using git and install all of the package requirements with PIP::

git clone https://github.com/roclark/sportsreference
cd sportsreference
git clone https://github.com/roclark/sportsipy
cd sportsipy
pip install -r requirements.txt

Once complete, create a Python wheel for your default version of Python by
Expand All @@ -62,16 +62,16 @@ Examples
The following are a few examples showcasing how easy it can be to collect
an abundance of metrics and information from all of the tracked leagues. The
examples below are only a miniscule subset of the total number of statistics
that can be pulled using sportsreference. Visit the documentation on
`Read The Docs <http://sportsreference.readthedocs.io/en/latest/>`_ for a
that can be pulled using sportsipy. Visit the documentation on
`Read The Docs <http://sportsipy.readthedocs.io/en/latest/>`_ for a
complete list of all information exposed by the API.

Get instances of all NHL teams for the 2018 season
--------------------------------------------------

.. code-block:: python
from sportsreference.nhl.teams import Teams
from sportsipy.nhl.teams import Teams
teams = Teams(2018)
Expand All @@ -80,7 +80,7 @@ Print every NBA team's name and abbreviation

.. code-block:: python
from sportsreference.nba.teams import Teams
from sportsipy.nba.teams import Teams
teams = Teams()
for team in teams:
Expand All @@ -91,7 +91,7 @@ Get a specific NFL team's season information

.. code-block:: python
from sportsreference.nfl.teams import Teams
from sportsipy.nfl.teams import Teams
teams = Teams()
lions = teams('DET')
Expand All @@ -101,7 +101,7 @@ Print the date of every game for a NCAA Men's Basketball team

.. code-block:: python
from sportsreference.ncaab.schedule import Schedule
from sportsipy.ncaab.schedule import Schedule
purdue_schedule = Schedule('purdue')
for game in purdue_schedule:
Expand All @@ -112,7 +112,7 @@ Print the number of interceptions by the away team in a NCAA Football game

.. code-block:: python
from sportsreference.ncaaf.boxscore import Boxscore
from sportsipy.ncaaf.boxscore import Boxscore
championship_game = Boxscore('2018-01-08-georgia')
print(championship_game.away_interceptions)
Expand All @@ -122,7 +122,7 @@ Get a Pandas DataFrame of all stats for a MLB game

.. code-block:: python
from sportsreference.mlb.boxscore import Boxscore
from sportsipy.mlb.boxscore import Boxscore
game = Boxscore('BOS201806070')
df = game.dataframe
Expand All @@ -132,34 +132,34 @@ Find the number of goals a football team has scored

.. code-block:: python
from sportsreference.fb.team import Team
from sportsipy.fb.team import Team
tottenham = Team('Tottenham Hotspur')
print(tottenham.goals_scored)
Documentation
=============

Two blog posts detailing the creation and basic usage of `sportsreference` can
Two blog posts detailing the creation and basic usage of `sportsipy` can
be found on The Medium at the following links:

- `Part 1: Creating a public sports API <https://medium.com/clarktech-sports/python-sports-analytics-made-simple-part-1-14569d6e9a86>`_
- `Part 2: Pull any sports metric in 10 lines of Python <https://medium.com/clarktech-sports/python-sports-analytics-made-simple-part-2-40e591a7f3db>`_

The second post in particular is a great guide for getting started with
`sportsreference` and is highly recommended for anyone who is new to the
`sportsipy` and is highly recommended for anyone who is new to the
package.

Complete documentation is hosted on
`readthedocs.org <http://sportsreference.readthedocs.io/en/latest>`_. Refer to
`readthedocs.org <http://sportsipy.readthedocs.io/en/latest>`_. Refer to
the documentation for a full list of all metrics and information exposed by
sportsreference. The documentation is auto-generated using Sphinx based on the
docstrings in the sportsreference package.
sportsipy. The documentation is auto-generated using Sphinx based on the
docstrings in the sportsipy package.

Testing
=======

Sportsreference contains a testing suite which aims to test all major portions
Sportsipy contains a testing suite which aims to test all major portions
of code for proper functionality. To run the test suite against your
environment, ensure all of the requirements are installed by running::

Expand All @@ -169,7 +169,7 @@ Next, start the tests by running py.test while optionally including coverage
flags which identify the amount of production code covered by the testing
framework::

py.test --cov=sportsreference --cov-report term-missing tests/
py.test --cov=sportsipy --cov-report term-missing tests/

If the tests were successful, it will return a green line will show a message at
the end of the output similar to the following::
Expand Down
2 changes: 1 addition & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SPHINXPROJ = sportsreference
SPHINXPROJ = sportsipy
SOURCEDIR = .
BUILDDIR = _build

Expand Down
12 changes: 6 additions & 6 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

# -- Project information -----------------------------------------------------

project = u'sportsreference'
project = u'sportsipy'
copyright = u'2018, Robert Clark'
author = u'Robert Clark'

Expand Down Expand Up @@ -109,7 +109,7 @@
# -- Options for HTMLHelp output ---------------------------------------------

# Output file base name for HTML help builder.
htmlhelp_basename = 'sportsreferencedoc'
htmlhelp_basename = 'sportsipydoc'


# -- Options for LaTeX output ------------------------------------------------
Expand All @@ -136,7 +136,7 @@
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'sportsreference.tex', u'sportsreference Documentation',
(master_doc, 'sportsipy.tex', u'sportsipy Documentation',
u'Author', 'manual'),
]

Expand All @@ -146,7 +146,7 @@
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'sportsreference', u'sportsreference Documentation',
(master_doc, 'sportsipy', u'sportsipy Documentation',
[author], 1)
]

Expand All @@ -157,8 +157,8 @@
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'sportsreference', u'sportsreference Documentation',
author, 'sportsreference', 'One line description of project.',
(master_doc, 'sportsipy', u'sportsipy Documentation',
author, 'sportsipy', 'One line description of project.',
'Miscellaneous'),
]

Expand Down
10 changes: 5 additions & 5 deletions docs/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ Examples
========

Thanks to the broad range of metrics that are pulled from sports-reference.com,
there are multiple ways you can use the `sportsreference` package. This page has
there are multiple ways you can use the `sportsipy` package. This page has
multiple examples beyond those listed on the home page to demonstrate some cool
things you can do which leverage the tool. This page is by no means exhaustive
and the examples aren't necessarily the most efficient in the hope of providing
the most clarity.

In general, most examples shown for a specific sport are applicable for all
sports currently supported by `sportsreference`.
sports currently supported by `sportsipy`.

Finding Tallest Players
-----------------------
Expand All @@ -18,7 +18,7 @@ and height in inches.

.. code-block:: python
from sportsreference.nba.teams import Teams
from sportsipy.nba.teams import Teams
def get_height_in_inches(height):
feet, inches = height.split('-')
Expand Down Expand Up @@ -52,7 +52,7 @@ Save the combined stats for each team to both a CSV and Pickle file.

.. code-block:: python
from sportsreference.ncaab.teams import Teams
from sportsipy.ncaab.teams import Teams
for team in Teams():
team.dataframe.to_csv('%s.csv' % team.abbreviation.lower())
Expand All @@ -65,7 +65,7 @@ print their name and the win total.

.. code-block:: python
from sportsreference.mlb.teams import Teams
from sportsipy.mlb.teams import Teams
def print_most_wins(year, wins):
most_wins = max(wins, key=wins.get)
Expand Down
Loading

0 comments on commit e5f8646

Please sign in to comment.