diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..e3e3c5a --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1 @@ +include schrutepy/data/schrute.csv diff --git a/data/schrute.csv b/schrutepy/data/schrute.csv similarity index 100% rename from data/schrute.csv rename to schrutepy/data/schrute.csv diff --git a/data/schrute.feather b/schrutepy/data/schrute.feather similarity index 100% rename from data/schrute.feather rename to schrutepy/data/schrute.feather diff --git a/schrutepy/schrutepy.py b/schrutepy/schrutepy.py index f7476e0..23bf0fe 100644 --- a/schrutepy/schrutepy.py +++ b/schrutepy/schrutepy.py @@ -1,4 +1,5 @@ import pandas +from importlib import resources def load_schrute(): @@ -6,7 +7,7 @@ def load_schrute(): The entire script transcriptions from The Office in pandas dataframe format. """ - full_path = "https://github.com/bradlindblad/schrutepy/raw/master/data/schrute.csv" + full_path = resources.files("schrutepy") / "data" / "schrute.csv" df = pandas.read_csv(full_path) df = df.drop("Unnamed: 0", axis=1) diff --git a/setup.py b/setup.py index ccaf093..a35bafb 100644 --- a/setup.py +++ b/setup.py @@ -16,6 +16,7 @@ url="https://github.com/bradlindblad/schrutepy", packages=find_packages(), install_requires=requirements, + include_package_data=True, classifiers=[ "Programming Language :: Python :: 3.6", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)",