Skip to content

Commit

Permalink
chore: pin poetry to 1.6.1 (#93)
Browse files Browse the repository at this point in the history
  • Loading branch information
adubovik authored Jan 14, 2025
1 parent 7bbe2f5 commit 30f8c95
Showing 1 changed file with 28 additions and 20 deletions.
48 changes: 28 additions & 20 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,21 +1,29 @@
PORT = 5001
IMAGE_NAME = ai-dial-analytics-realtime
PORT ?= 5001
IMAGE_NAME ?= ai-dial-analytics-realtime
VENV ?= .venv
POETRY ?= $(VENV)/bin/poetry
POETRY_VERSION ?= 1.6.1
ARGS =


.PHONY: all build serve docker_build docker_serve lint format test test_all docs clean help
.PHONY: all init_env build serve docker_build docker_serve lint format test test_all docs clean help


all: build


build:
poetry build
init_env:
python -m venv $(VENV)
$(VENV)/bin/pip install poetry==$(POETRY_VERSION) --quiet


serve:
poetry install --only main
poetry run uvicorn aidial_analytics_realtime.app:app --port=$(PORT) --env-file .env
build: init_env
$(POETRY) build


serve: init_env
$(POETRY) install --only main
$(POETRY) run uvicorn aidial_analytics_realtime.app:app --reload --port=$(PORT) --env-file .env


docker_build:
Expand All @@ -26,24 +34,24 @@ docker_serve: docker_build
docker run --platform linux/amd64 --env-file ./.env --rm -p $(PORT):5000 $(IMAGE_NAME):dev


lint:
poetry install --only nox
poetry run nox -s lint
lint: init_env
$(POETRY) install --only nox
$(POETRY) run nox -s lint


format:
poetry install --only nox
poetry run nox -s format
format: init_env
$(POETRY) install --only nox
$(POETRY) run nox -s format


test:
poetry install --only nox
poetry run -- nox -s tests -- -m "not with_external" $(ARGS)
test: init_env
$(POETRY) install --only nox
$(POETRY) run -- nox -s tests -- -m "not with_external" $(ARGS)


test_all:
poetry install --only nox
poetry run -- nox -s tests -- $(ARGS)
test_all: init_env
$(POETRY) install --only nox
$(POETRY) run -- nox -s tests -- $(ARGS)


docs:
Expand Down

0 comments on commit 30f8c95

Please sign in to comment.