Closed methenol closed 6 years ago
Hold off on committing this... I'm getting a cast error at the end of the run on the df.to_sql call in hypersearch. Thought it was because I didn't clear my runs between tag v0.1 and v0.2 but either setup_runs needs to be adjusted or my table got messed up in the transition. I'll look into this after work today. Temporarily commenting out the df.to_sql portion of hypersearch in my local build so it'll hopefully get a run in while I'm at work.
I used dropdb runs followed by createdb runs and executed setup_runs_table
Made a commit with the following in data.py
def setup_runs_table():
"""Run this function once during project setup (see README). Or just copy/paste the SQL into your runs database
"""
conn_runs = engine_runs.connect()
conn_runs.execute("""
create table if not exists runs
(
id uuid not null,
hypers jsonb not null,
returns double precision[],
signals double precision[],
prices double precision[],
uniques double precision[]
);
""")
I haven't looked into the visualization code, nor have I tested if it works with v0.2 yet. If the columns are hard coded they may need to be updated. I'll take a look in a few days and see if I find anything that needs adjusting.
Closing this PR
restores setup_runs_table() from v0.1