Skip to content

Commit

Permalink
Add fast DB gen at initial startup
Browse files Browse the repository at this point in the history
  • Loading branch information
rbaltrusch committed Aug 12, 2022
1 parent 58f5dd6 commit 4c25cba
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions desktop_shop/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,20 @@
@author: Korean_Crimson
"""
import os

from desktop_shop.datagen import generate_data

from .gui import app
from .gui import db_conn
from .gui import init

# fast db generation if not present
if not os.path.isdir("main.db"):
generate_data.generate(
hash_iterations=1, transactions=100_000, users=10_000, products=20
)

try:
init.init()
app.views_dict['main_menu'].pack()
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

setuptools.setup(
name="desktop_shop",
version="1.0.0",
version="1.0.1",
description="Desktop shop application",
long_description=project_dir.joinpath("README.md").read_text(encoding="utf-8"),
long_description_content_type="text/markdown",
Expand Down

0 comments on commit 4c25cba

Please sign in to comment.