diff --git a/app.db b/app.db new file mode 100644 index 0000000..6096b4d Binary files /dev/null and b/app.db differ diff --git a/app/app.db b/app/app.db index 39f99b2..d6bc9e1 100644 Binary files a/app/app.db and b/app/app.db differ diff --git a/app/main.py b/app/main.py index dbcb5b2..bef7f48 100644 --- a/app/main.py +++ b/app/main.py @@ -1,6 +1,6 @@ import os import dotenv -from benchmark.utils import Files +from benchmark.Utils import Files from flask import ( Blueprint, render_template, @@ -60,7 +60,6 @@ def set_benchmark(benchmark_id): def config(): os.chdir(current_user.benchmark.folder) env = dotenv.dotenv_values(".env") - print(env) return render_template("config.html", config_env=env) diff --git a/dbseed_docker.py b/dbseed_docker.py new file mode 100644 index 0000000..0e8859c --- /dev/null +++ b/dbseed_docker.py @@ -0,0 +1,44 @@ +from app.models import Benchmark, db, User +from app import app + +app = app.create_app() + +with app.app_context(): + db.drop_all() + db.create_all() + b = Benchmark( + name="discretizbench", + folder="/app/discretizbench", + description="Experiments with local discretization and Bayesian classifiers", + ) + db.session.add(b) + b = Benchmark( + name="odtebench", + folder="/app/odtebench", + description="Experiments with STree and Ensemble classifiers", + ) + db.session.add(b) + b = Benchmark( + name="covbench", + folder="/app/covbench", + description="Experiments with COVID-19 dataset", + ) + db.session.add(b) + u = User( + username="rmontanana", + email="rmontanana@gmail.com", + admin=True, + benchmark_id=1, + ) + u.set_password("patata") + u1 = User( + username="guest", + email="guest@example.com", + admin=False, + benchmark_id=1, + ) + u1.set_password("guest") + db.session.add(b) + db.session.add(u) + db.session.add(u1) + db.session.commit()