# Path: src/helper_functions.py
# def grab_vector(connection, cmd, *args):
#     return [x[0] for x in connection.execute(cmd, *args).fetchall()]
# 
# def grab_all(connection, cmd, *args):
#     return connection.execute(cmd, *args).fetchall()


import sqlite3
import logging
import argparse
import collections
from src.helper_functions import grab_vector, grab_all

desc = "Make a report of level 1 sequences"
parser = argparse.ArgumentParser(description=desc)
parser.add_argument('-f', '--force', default=False, action='store_true')
cargs = vars(parser.parse_args())

# Start the logger
logging.root.setLevel(logging.INFO)

# Connect to the database and add structure info
f_seq_database = "database/sequence.db"
seq_conn = sqlite3.connect(f_seq_database, check_same_thread=False)

# Find the level 1 sequence_ids with at least 4 terms

# Path: src/helper_functions.py
# def grab_vector(connection, cmd, *args):
#     return [x[0] for x in connection.execute(cmd, *args).fetchall()]
# 
# def grab_all(connection, cmd, *args):
#     return connection.execute(cmd, *args).fetchall()


# Path: verification/raw_dump_lvl1.py
import sqlite3
import logging
import argparse
import collections
from src.helper_functions import grab_vector, grab_all


desc = "Make a report of level 1 sequences"
parser = argparse.ArgumentParser(description=desc)
parser.add_argument('-f', '--force', default=False, action='store_true')
cargs = vars(parser.parse_args())

# Start the logger
logging.root.setLevel(logging.INFO)

# Connect to the database and add structure info
f_seq_database = "database/sequence.db"
seq_conn = sqlite3.connect(f_seq_database, check_same_thread=False)

# Find the level 1 sequence_ids with at least 4 terms

cmd_search = '''SELECT sequence_id FROM stat_sequence