You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
753 B
Python

from invoke import task
@task
def serve(c):
"""Serves the speech-collect application locally."""
c.run("LITESTAR_APP=speech_collect.app:app litestar run --port 8888 --host 0.0.0.0 --reload")
@task
def build_image(c, dev=True):
"""Builds the speech-collect container image."""
context_dir = c.run("pwd", hide=True).stdout.strip()
commit_sha = c.run("git rev-parse --short HEAD", hide=True).stdout.strip()
c.run(
f"docker build --build-arg='COMMIT_SHA={commit_sha}' -t speech-collect:{commit_sha}{'-dev' if dev else ''} {context_dir}"
)
@task
def delint(c):
"""Applies automated linters to project"""
c.run("isort ./speech_collect ./tests", pty=True)
c.run("black ./speech_collect ./tests", pty=True)