forked from gatheringhallstudios/MHWorldData
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.py
24 lines (19 loc) · 832 Bytes
/
build.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import click
import sys
from mhdata import build
from mhdata.load import load_data_processed
# Python 3.6 dictionaries preserve insertion order,
# and python 3.7 officially added it to the spec.
# Older versions of python don't maintain order when importing data.
if sys.version_info < (3,6):
print(f"WARNING: You are running python version {sys.version}, " +
"but this application was designed for Python 3.6 and newer. ")
print("Earlier versions of Python will still build the project, but will not have a consistent build.")
print("When creating a final build, make sure to use a newer version of python.")
@click.command()
def build_cmd():
data = load_data_processed()
output_filename = 'mhw.db'
build.build_sql_database(output_filename, data)
if __name__ == '__main__':
build_cmd()