Added back dependency and resolved flake8 errors.

This commit is contained in:
AuroraTradingTeam
2017-11-07 22:25:31 +00:00
parent 985fcb737c
commit 8c9ee64485
6 changed files with 11 additions and 20 deletions
+1 -5
View File
@@ -4,11 +4,7 @@
language: python
python:
- 3.5
- 3.4
- 3.3
- 2.7
- 2.6
# command to install dependencies, e.g. pip install -r requirements.txt --use-mirrors
install: pip install -U tox-travis
+1 -1
View File
@@ -1,6 +1,5 @@
#!/bin/python
import requests
import json
from datetime import datetime
API_URL = "https://min-api.cryptocompare.com/data/"
@@ -55,6 +54,7 @@ def get_coinlist():
return requests.get(url).json()
def get_histo(period, fsym, tsym, e, limit=None, toTs=None):
"""Return historical prices.
+4 -9
View File
@@ -6,6 +6,7 @@ from libcryptomarket.api.cryptocompare_api import (
get_histo, CryptocompareHisto
)
def get_historical_prices(source='cryptocompare', symbol=None, exchange=None,
period=None, limit=0, from_time=None, to_time=None):
"""Get historical prices.
@@ -30,9 +31,9 @@ def get_historical_prices(source='cryptocompare', symbol=None, exchange=None,
raise ValueError("Input parameter exchange cannot be None.")
if ((limit > 0) +
((from_time is not None) or (to_time is not None)) > 1):
raise ValuError("Only accept input parameter limit, or from_time"
" and to_time pair.")
((from_time is not None) or (to_time is not None)) > 1):
raise ValueError("Only accept input parameter limit, or from_time"
" and to_time pair.")
# Parse from (first 3) and to (last 3) symbol from the parameter
# symbol.
@@ -69,9 +70,3 @@ def get_historical_prices(source='cryptocompare', symbol=None, exchange=None,
return data.sort_values(['r_time'])
else:
raise ValueError("No source is called {0}".format(source))
+2 -1
View File
@@ -10,4 +10,5 @@ Sphinx==1.4.8
pytest==2.9.2
pytest-runner==2.11.1
pandas>=0.20.0
pandas>=0.20.0
requests
+2 -1
View File
@@ -12,7 +12,8 @@ with open('HISTORY.rst') as history_file:
history = history_file.read()
requirements = [
'pandas>=0.20.0'
'pandas>=0.20.0',
'requests'
]
setup_requirements = [
+1 -3
View File
@@ -1,11 +1,9 @@
[tox]
envlist = py33, py34, py35, flake8
envlist = py35, flake8
[travis]
python =
3.5: py35
3.4: py34
3.3: py33
[testenv:flake8]
basepython=python