|
|
@ -34,20 +34,6 @@ def fix_eof(c):
|
|
|
|
c.run("pre-commit run end-of-file-fixer --all-files", pty=True)
|
|
|
|
c.run("pre-commit run end-of-file-fixer --all-files", pty=True)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@task
|
|
|
|
|
|
|
|
def start_redis(c):
|
|
|
|
|
|
|
|
"""Runs the Redis integration environment."""
|
|
|
|
|
|
|
|
print("Starting Redis")
|
|
|
|
|
|
|
|
c.run("docker compose -f docker-compose-redis.yml up -d")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@task
|
|
|
|
|
|
|
|
def stop_redis(c):
|
|
|
|
|
|
|
|
"""Stops the Redis integration environent."""
|
|
|
|
|
|
|
|
print("Stopping Redis")
|
|
|
|
|
|
|
|
c.run("docker compose -f docker-compose-redis.yml down")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@task
|
|
|
|
@task
|
|
|
|
def init_db(c):
|
|
|
|
def init_db(c):
|
|
|
|
"""Initialize the database."""
|
|
|
|
"""Initialize the database."""
|
|
|
@ -72,7 +58,7 @@ def apply_migration(c, revision="head"):
|
|
|
|
|
|
|
|
|
|
|
|
@task(help={"username": "A username", "email": "The user's email"})
|
|
|
|
@task(help={"username": "A username", "email": "The user's email"})
|
|
|
|
def add_user(c, username="", email=""):
|
|
|
|
def add_user(c, username="", email=""):
|
|
|
|
"""Adds a dummy user to the application Database"""
|
|
|
|
"""Adds a dummy user to the application database"""
|
|
|
|
if not (username and email):
|
|
|
|
if not (username and email):
|
|
|
|
raise ValueError("You must provide a username and email")
|
|
|
|
raise ValueError("You must provide a username and email")
|
|
|
|
from project.database import SessionLocal
|
|
|
|
from project.database import SessionLocal
|
|
|
|