diff --git a/dev-requirements.in b/dev-requirements.in index 1e77b75..f0b797f 100644 --- a/dev-requirements.in +++ b/dev-requirements.in @@ -1,3 +1,5 @@ +-c ./requirements.txt + black invoke isort diff --git a/dev-requirements.txt b/dev-requirements.txt index b77b4f2..92594b8 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -12,6 +12,7 @@ cfgv==3.4.0 # via pre-commit click==8.1.7 # via + # -c ./requirements.txt # black # pip-tools coverage[toml]==7.3.2 @@ -21,7 +22,9 @@ coverage[toml]==7.3.2 distlib==0.3.7 # via virtualenv exceptiongroup==1.2.0 - # via pytest + # via + # -c ./requirements.txt + # pytest filelock==3.13.1 # via virtualenv identify==2.5.32 @@ -62,7 +65,9 @@ pytest==7.4.3 pytest-cov==4.1.0 # via -r dev-requirements.in pyyaml==6.0.1 - # via pre-commit + # via + # -c ./requirements.txt + # pre-commit ruff==0.1.6 # via -r dev-requirements.in shellcheck-py==0.9.0.5 @@ -76,7 +81,9 @@ tomli==2.0.1 # pyproject-hooks # pytest typing-extensions==4.8.0 - # via black + # via + # -c ./requirements.txt + # black virtualenv==20.24.7 # via pre-commit wheel==0.42.0 diff --git a/tasks.py b/tasks.py index 6fe2666..130eace 100644 --- a/tasks.py +++ b/tasks.py @@ -7,6 +7,19 @@ def serve(c): c.run("LITESTAR_APP=speech_collect.app:app litestar run --port 8888 --host 0.0.0.0 --reload") +@task +def update_deps(c): + """Updates depenencies""" + c.run("pip-compile requirements.in", pty=True) + c.run("pip-compile dev-requirements.in", pty=True) + + +@task +def sync_deps(c): + """Syncs local dependencies""" + c.run("pip-sync requirements.txt dev-requirements.txt") + + @task def build_image(c, dev=True): """Builds the speech-collect container image.""" @@ -20,5 +33,5 @@ def build_image(c, dev=True): @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) + c.run("isort ./speech_collect ./tests ./tasks.py", pty=True) + c.run("black ./speech_collect ./tests ./tasks.py", pty=True)