Mercurial > hg > nsaunier > traffic-intelligence
comparison scripts/delete-tables.py @ 1028:cc5cb04b04b0
major update using the trafficintelligence package name and install through pip
| author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
|---|---|
| date | Fri, 15 Jun 2018 11:19:10 -0400 |
| parents | 933670761a57 |
| children |
comparison
equal
deleted
inserted
replaced
| 1027:6129296848d3 | 1028:cc5cb04b04b0 |
|---|---|
| 1 #! /usr/bin/env python3 | 1 #! /usr/bin/env python3 |
| 2 | 2 |
| 3 import sys, argparse | 3 import sys, argparse |
| 4 | 4 |
| 5 import utils | 5 from trafficintelligence import utils, storage |
| 6 import storage | |
| 7 | 6 |
| 8 parser = argparse.ArgumentParser(description='The program deletes (drops) the tables in the database before saving new results (for objects, tables object_features and objects are dropped; for interactions, the tables interactions and indicators are dropped') | 7 parser = argparse.ArgumentParser(description='The program deletes (drops) the tables in the database before saving new results (for objects, tables object_features and objects are dropped; for interactions, the tables interactions and indicators are dropped') |
| 9 #parser.add_argument('configFilename', help = 'name of the configuration file') | 8 #parser.add_argument('configFilename', help = 'name of the configuration file') |
| 10 parser.add_argument('-d', dest = 'databaseFilename', help = 'name of the Sqlite database', required = True) | 9 parser.add_argument('-d', dest = 'databaseFilename', help = 'name of the Sqlite database', required = True) |
| 11 parser.add_argument('-t', dest = 'dataType', help = 'type of the data to remove', required = True, choices = ['object','interaction', 'bb', 'pois', 'prototype']) | 10 parser.add_argument('-t', dest = 'dataType', help = 'type of the data to remove', required = True, choices = ['object','interaction', 'bb', 'pois', 'prototype']) |
