Skip to content

Commit

Permalink
Remove pandas helper function, move to superstore
Browse files Browse the repository at this point in the history
  • Loading branch information
timkpaine committed Feb 10, 2024
1 parent 6d638f9 commit 1ec60d2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 16 deletions.
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ def get_version(file, name="__version__"):
"pybind11>=2.4.0",
"pytest>=4.3.0",
"pytest-cov>=2.6.1",
"superstore",
"Sphinx>=1.8.4",
"sphinx-markdown-builder>=0.5.2",
] + requires
Expand Down
11 changes: 3 additions & 8 deletions tributary/tests/lazy/calculations/test_finance_lazy.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import pandas as pd
import superstore
import tributary.lazy as tl


class TestFinance:
def test_rsi(self):
try:
df = pd.DataFrame(pd.util.testing.getTimeSeriesData(20))
except AttributeError:
df = pd.DataFrame(pd._testing.getTimeSeriesData(20))
df = pd.DataFrame(superstore.getTimeSeriesData(20))
adjust = False
period = 14
delta = df["A"].diff().shift(-1)
Expand All @@ -34,10 +32,7 @@ def test_rsi(self):
assert n_rsi().tolist() == rsi.tolist()

def test_macd(self):
try:
df = pd.DataFrame(pd.util.testing.getTimeSeriesData(20))
except AttributeError:
df = pd.DataFrame(pd._testing.getTimeSeriesData(20))
df = pd.DataFrame(superstore.getTimeSeriesData(20))

period_fast = 12
period_slow = 26
Expand Down
11 changes: 3 additions & 8 deletions tributary/tests/streaming/calculations/test_finance_streaming.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import pandas as pd
import superstore
import tributary.streaming as ts


class TestFinance:
def test_rsi(self):
try:
vals = pd.DataFrame(pd.util.testing.getTimeSeriesData(20))
except AttributeError:
vals = pd.DataFrame(pd._testing.getTimeSeriesData(20))
vals = pd.DataFrame(superstore.getTimeSeriesData(20))
adjust = False
period = 14
delta = vals["A"].diff().shift(-1)
Expand All @@ -28,10 +26,7 @@ def test_rsi(self):
assert abs(x - y) < 0.001

def test_macd(self):
try:
vals = pd.DataFrame(pd.util.testing.getTimeSeriesData(20))
except AttributeError:
vals = pd.DataFrame(pd._testing.getTimeSeriesData(20))
vals = pd.DataFrame(superstore.getTimeSeriesData(20))
period_fast = 12
period_slow = 26
signal = 9
Expand Down

0 comments on commit 1ec60d2

Please sign in to comment.