Configuring the new tag for pyPI release
This commit is contained in:
parent
11831b9769
commit
a9a07204dc
@ -9,7 +9,7 @@ def get_data():
|
|||||||
return dat
|
return dat
|
||||||
|
|
||||||
def get_dataframe():
|
def get_dataframe():
|
||||||
dat = common.get_dataframe('data/AirPassengers.csv',
|
dat = common.get_dataframe('AirPassengers.csv',
|
||||||
'https://github.com/petroniocandido/pyFTS/raw/8f20f3634aa6a8f58083bdcd1bbf93795e6ed767/pyFTS/data/AirPassengers.csv',
|
'https://github.com/petroniocandido/pyFTS/raw/8f20f3634aa6a8f58083bdcd1bbf93795e6ed767/pyFTS/data/AirPassengers.csv',
|
||||||
sep=",")
|
sep=",")
|
||||||
return dat
|
return dat
|
||||||
|
@ -10,7 +10,7 @@ def get_data():
|
|||||||
|
|
||||||
|
|
||||||
def get_dataframe():
|
def get_dataframe():
|
||||||
dat = common.get_dataframe('data/Enrollments.csv',
|
dat = common.get_dataframe('Enrollments.csv',
|
||||||
'https://github.com/petroniocandido/pyFTS/raw/8f20f3634aa6a8f58083bdcd1bbf93795e6ed767/pyFTS/data/Enrollments.csv',
|
'https://github.com/petroniocandido/pyFTS/raw/8f20f3634aa6a8f58083bdcd1bbf93795e6ed767/pyFTS/data/Enrollments.csv',
|
||||||
sep=";")
|
sep=";")
|
||||||
return dat
|
return dat
|
||||||
|
@ -18,7 +18,7 @@ import pandas as pd
|
|||||||
|
|
||||||
|
|
||||||
def get_dataframe():
|
def get_dataframe():
|
||||||
dat = common.get_dataframe('data/INMET.csv.bz2',
|
dat = common.get_dataframe('INMET.csv.bz2',
|
||||||
'https://github.com/petroniocandido/pyFTS/raw/8f20f3634aa6a8f58083bdcd1bbf93795e6ed767/pyFTS/data/INMET.csv.bz2',
|
'https://github.com/petroniocandido/pyFTS/raw/8f20f3634aa6a8f58083bdcd1bbf93795e6ed767/pyFTS/data/INMET.csv.bz2',
|
||||||
sep=";", compression='bz2')
|
sep=";", compression='bz2')
|
||||||
dat["DataHora"] = pd.to_datetime(dat["DataHora"], format='%d/%m/%Y %H:%M')
|
dat["DataHora"] = pd.to_datetime(dat["DataHora"], format='%d/%m/%Y %H:%M')
|
||||||
|
@ -10,7 +10,7 @@ def get_data(field):
|
|||||||
|
|
||||||
|
|
||||||
def get_dataframe():
|
def get_dataframe():
|
||||||
dat = common.get_dataframe('data/NASDAQ.csv.bz2',
|
dat = common.get_dataframe('NASDAQ.csv.bz2',
|
||||||
'https://github.com/petroniocandido/pyFTS/raw/8f20f3634aa6a8f58083bdcd1bbf93795e6ed767/pyFTS/data/NASDAQ.csv.bz2',
|
'https://github.com/petroniocandido/pyFTS/raw/8f20f3634aa6a8f58083bdcd1bbf93795e6ed767/pyFTS/data/NASDAQ.csv.bz2',
|
||||||
sep=";", compression='bz2')
|
sep=";", compression='bz2')
|
||||||
return dat
|
return dat
|
||||||
|
@ -10,7 +10,7 @@ def get_data(field):
|
|||||||
|
|
||||||
|
|
||||||
def get_dataframe():
|
def get_dataframe():
|
||||||
dat = common.get_dataframe('data/SONDA_BSB.csv.bz2',
|
dat = common.get_dataframe('SONDA_BSB.csv.bz2',
|
||||||
'https://github.com/petroniocandido/pyFTS/raw/8f20f3634aa6a8f58083bdcd1bbf93795e6ed767/pyFTS/data/SONDA_BSB.csv.bz2',
|
'https://github.com/petroniocandido/pyFTS/raw/8f20f3634aa6a8f58083bdcd1bbf93795e6ed767/pyFTS/data/SONDA_BSB.csv.bz2',
|
||||||
sep=";", compression='bz2')
|
sep=";", compression='bz2')
|
||||||
dat["datahora"] = pd.to_datetime(dat["datahora"], format='%Y-%m-%d %H:%M:%S')
|
dat["datahora"] = pd.to_datetime(dat["datahora"], format='%Y-%m-%d %H:%M:%S')
|
||||||
|
@ -4,7 +4,7 @@ import numpy as np
|
|||||||
|
|
||||||
|
|
||||||
def get_dataframe():
|
def get_dataframe():
|
||||||
dat = common.get_dataframe('data/SP500.csv.bz2',
|
dat = common.get_dataframe('SP500.csv.bz2',
|
||||||
'https://github.com/petroniocandido/pyFTS/raw/8f20f3634aa6a8f58083bdcd1bbf93795e6ed767/pyFTS/data/SP500.csv.bz2',
|
'https://github.com/petroniocandido/pyFTS/raw/8f20f3634aa6a8f58083bdcd1bbf93795e6ed767/pyFTS/data/SP500.csv.bz2',
|
||||||
sep=",", compression='bz2')
|
sep=",", compression='bz2')
|
||||||
dat = np.array(dat["Avg"])
|
dat = np.array(dat["Avg"])
|
||||||
|
@ -10,7 +10,7 @@ def get_data():
|
|||||||
|
|
||||||
|
|
||||||
def get_dataframe():
|
def get_dataframe():
|
||||||
dat = common.get_dataframe('data/TAIEX.csv.bz2',
|
dat = common.get_dataframe('TAIEX.csv.bz2',
|
||||||
'https://github.com/petroniocandido/pyFTS/raw/8f20f3634aa6a8f58083bdcd1bbf93795e6ed767/pyFTS/data/TAIEX.csv.bz2',
|
'https://github.com/petroniocandido/pyFTS/raw/8f20f3634aa6a8f58083bdcd1bbf93795e6ed767/pyFTS/data/TAIEX.csv.bz2',
|
||||||
sep=",", compression='bz2')
|
sep=",", compression='bz2')
|
||||||
dat["Date"] = pd.to_datetime(dat["Date"])
|
dat["Date"] = pd.to_datetime(dat["Date"])
|
||||||
|
@ -6,8 +6,8 @@ from pathlib import Path
|
|||||||
from urllib import request
|
from urllib import request
|
||||||
|
|
||||||
|
|
||||||
def get_dataframe(path, url, sep=";", compression='infer'):
|
def get_dataframe(filename, url, sep=";", compression='infer'):
|
||||||
filename = pkg_resources.resource_filename('pyFTS', path)
|
#filename = pkg_resources.resource_filename('pyFTS', path)
|
||||||
tmp_file = Path(filename)
|
tmp_file = Path(filename)
|
||||||
|
|
||||||
if tmp_file.is_file():
|
if tmp_file.is_file():
|
||||||
|
@ -8,7 +8,7 @@ def get_data():
|
|||||||
return dat
|
return dat
|
||||||
|
|
||||||
def get_dataframe():
|
def get_dataframe():
|
||||||
dat = common.get_dataframe('data/sunspots.csv',
|
dat = common.get_dataframe('sunspots.csv',
|
||||||
'https://github.com/petroniocandido/pyFTS/raw/8f20f3634aa6a8f58083bdcd1bbf93795e6ed767/pyFTS/data/sunspots.csv',
|
'https://github.com/petroniocandido/pyFTS/raw/8f20f3634aa6a8f58083bdcd1bbf93795e6ed767/pyFTS/data/sunspots.csv',
|
||||||
sep=",")
|
sep=",")
|
||||||
return dat
|
return dat
|
||||||
|
@ -106,7 +106,8 @@ class TimeGridPartitioner(partitioner.Partitioner):
|
|||||||
ax.set_xlim([0, self.season.value])
|
ax.set_xlim([0, self.season.value])
|
||||||
ticks = []
|
ticks = []
|
||||||
x = []
|
x = []
|
||||||
for s in self.sets:
|
for key in self.sets.keys():
|
||||||
|
s = self.sets[key]
|
||||||
if s.type == 'composite':
|
if s.type == 'composite':
|
||||||
for ss in s.sets:
|
for ss in s.sets:
|
||||||
self.plot_set(ax, ss)
|
self.plot_set(ax, ss)
|
||||||
|
@ -66,28 +66,29 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 4,
|
"execution_count": 2,
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
"name": "stdout",
|
"ename": "PermissionError",
|
||||||
"output_type": "stream",
|
"evalue": "[Errno 13] Permission denied: '/usr/local/lib/python3.6/dist-packages/pyFTS/data/Enrollments.csv'",
|
||||||
"text": [
|
"output_type": "error",
|
||||||
"/home/petronio/dados/Dropbox/Doutorado/Codigos/pyFTSsource/pyFTS/notebooks/teste\n"
|
"traceback": [
|
||||||
|
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
|
||||||
|
"\u001b[0;31mPermissionError\u001b[0m Traceback (most recent call last)",
|
||||||
|
"\u001b[0;32m<ipython-input-2-c717b3ec41cd>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mpyFTS\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdata\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mEnrollments\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 2\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 3\u001b[0;31m \u001b[0menrollments\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mEnrollments\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mget_data\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 4\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
|
||||||
|
"\u001b[0;32m/usr/local/lib/python3.6/dist-packages/pyFTS/data/Enrollments.py\u001b[0m in \u001b[0;36mget_data\u001b[0;34m()\u001b[0m\n\u001b[1;32m 5\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 6\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0mget_data\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 7\u001b[0;31m \u001b[0mdat\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mget_dataframe\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 8\u001b[0m \u001b[0mdat\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mnp\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0marray\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mdat\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m\"Enrollments\"\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 9\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mdat\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
||||||
|
"\u001b[0;32m/usr/local/lib/python3.6/dist-packages/pyFTS/data/Enrollments.py\u001b[0m in \u001b[0;36mget_dataframe\u001b[0;34m()\u001b[0m\n\u001b[1;32m 13\u001b[0m dat = common.get_dataframe('data/Enrollments.csv',\n\u001b[1;32m 14\u001b[0m \u001b[0;34m'https://github.com/petroniocandido/pyFTS/raw/8f20f3634aa6a8f58083bdcd1bbf93795e6ed767/pyFTS/data/Enrollments.csv'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 15\u001b[0;31m sep=\";\")\n\u001b[0m\u001b[1;32m 16\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mdat\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
||||||
|
"\u001b[0;32m/usr/local/lib/python3.6/dist-packages/pyFTS/data/common.py\u001b[0m in \u001b[0;36mget_dataframe\u001b[0;34m(path, url, sep, compression)\u001b[0m\n\u001b[1;32m 14\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mpd\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mread_csv\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfilename\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0msep\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0msep\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcompression\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mcompression\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 15\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 16\u001b[0;31m \u001b[0mrequest\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0murlretrieve\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0murl\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mfilename\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 17\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mpd\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mread_csv\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfilename\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0msep\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0msep\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcompression\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mcompression\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 18\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
|
||||||
|
"\u001b[0;32m/usr/lib/python3.6/urllib/request.py\u001b[0m in \u001b[0;36murlretrieve\u001b[0;34m(url, filename, reporthook, data)\u001b[0m\n\u001b[1;32m 256\u001b[0m \u001b[0;31m# Handle temporary file setup.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 257\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mfilename\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 258\u001b[0;31m \u001b[0mtfp\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mopen\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfilename\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m'wb'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 259\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 260\u001b[0m \u001b[0mtfp\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mtempfile\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mNamedTemporaryFile\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mdelete\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;32mFalse\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
||||||
|
"\u001b[0;31mPermissionError\u001b[0m: [Errno 13] Permission denied: '/usr/local/lib/python3.6/dist-packages/pyFTS/data/Enrollments.csv'"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"source": [
|
"source": [
|
||||||
"#from pyFTS.data import Enrollments\n",
|
"from pyFTS.data import Enrollments\n",
|
||||||
"\n",
|
"\n",
|
||||||
"#enrollments = Enrollments.get_data()\n",
|
"enrollments = Enrollments.get_data()\n",
|
||||||
"\n",
|
|
||||||
"import pandas as pd\n",
|
|
||||||
"import numpy as np\n",
|
|
||||||
"import os\n",
|
|
||||||
"import pkg_resources\n",
|
|
||||||
"from pathlib import Path\n",
|
|
||||||
"from urllib import request\n",
|
|
||||||
"\n"
|
"\n"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
File diff suppressed because one or more lines are too long
29
setup.py
29
setup.py
@ -1,30 +1,4 @@
|
|||||||
from distutils.core import setup
|
from distutils.core import setup
|
||||||
from distutils.command.install import install as _install
|
|
||||||
|
|
||||||
|
|
||||||
class install(_install):
|
|
||||||
def run(self):
|
|
||||||
_install.run(self)
|
|
||||||
|
|
||||||
from pyFTS.data import INMET,Enrollments,AirPassengers,NASDAQ,SONDA,SP500,sunspots,TAIEX
|
|
||||||
print("Downloading data assets:")
|
|
||||||
print("TAIEX")
|
|
||||||
TAIEX.get_data()
|
|
||||||
print("sunspots")
|
|
||||||
sunspots.get_data()
|
|
||||||
print("SP500")
|
|
||||||
SP500.get_dataframe()
|
|
||||||
print("SONDA")
|
|
||||||
SONDA.get_dataframe()
|
|
||||||
print("NASDAQ")
|
|
||||||
NASDAQ.get_dataframe()
|
|
||||||
print("AirPassengers")
|
|
||||||
AirPassengers.get_data()
|
|
||||||
print("Enrollments")
|
|
||||||
Enrollments.get_data()
|
|
||||||
print("INMET")
|
|
||||||
INMET.get_dataframe()
|
|
||||||
|
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='pyFTS',
|
name='pyFTS',
|
||||||
@ -35,7 +9,7 @@ setup(
|
|||||||
#package_data={'pyFTS.data': ['*.csv','*.csv.bz2']},
|
#package_data={'pyFTS.data': ['*.csv','*.csv.bz2']},
|
||||||
#data_files=[('data', ['pyFTS/data/Enrollments.csv', 'pyFTS/data/AirPassengers.csv'])],
|
#data_files=[('data', ['pyFTS/data/Enrollments.csv', 'pyFTS/data/AirPassengers.csv'])],
|
||||||
#include_package_data=True,
|
#include_package_data=True,
|
||||||
version='1.2.0',
|
version='1.2.1',
|
||||||
description='Fuzzy Time Series for Python',
|
description='Fuzzy Time Series for Python',
|
||||||
author='Petronio Candido L. e Silva',
|
author='Petronio Candido L. e Silva',
|
||||||
author_email='petronio.candido@gmail.com',
|
author_email='petronio.candido@gmail.com',
|
||||||
@ -48,5 +22,4 @@ setup(
|
|||||||
'Programming Language :: Python :: 3.5',
|
'Programming Language :: Python :: 3.5',
|
||||||
'Programming Language :: Python :: 3.6',
|
'Programming Language :: Python :: 3.6',
|
||||||
],
|
],
|
||||||
cmdclass={'install': install},
|
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user