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.
local-whisper/pyinvoke/dev.py

32 lines
625 B
Python

2 years ago
from invoke import task
@task
def update_deps(c):
"""https://hynek.me/til/pip-tools-and-pyproject-toml/"""
pass
@task
def sync_env(c):
"""Synchronize dependencies."""
c.run("pip-sync dev_requirements.txt requirements.txt")
@task
def install_pre_commit(c):
"""Installs pre-commit hooks into your environment."""
c.run("pre-commit install --install-hooks")
@task
def build(c):
"""Builds wheel and source distributions of project."""
pass
2 years ago
@task
def serve_dev(c, port=9000):
2 years ago
"""Runs the FastAPI webservice"""
c.run(f"uvicorn local_whisper.webservice:app --reload --port {port}")