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.

21 lines
569 B
Python

from invoke import task
@task
def serve_dev(c, debugger=True, reload=True, threads=True, port=8888, host="0.0.0.0"):
"""Serves the htmx_contact.app locally"""
cmd = "flask --app ./htmx_contact/app.py run"
cmd += " --debug" if debugger else ""
cmd += " --reload" if reload else ""
cmd += " --with-threads" if threads else ""
cmd += f" --host {host}" if host else ""
cmd += f" --port {port}" if port else ""
print(cmd)
c.run(cmd, pty=True)
@task
def test(c):
"""executes test suite"""
c.run("pytest -vvv tests/", pty=True)