From b50d2ab7418b29aff068f8f96b1fcd22dc7ca1ee Mon Sep 17 00:00:00 2001 From: leo <260626284+cameledev@users.noreply.github.com> Date: Tue, 25 Aug 2026 17:28:07 +0200 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F(devex)=20update=20Makefile?= =?UTF-8?q?=20lint=20targets?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The make lint target did not cover the summary and agents components. Update the linting workflow to include both services and harmonize Makefile target names. Harmonize Docker compose user declarations. --- CHANGELOG.md | 1 + Makefile | 57 ++++++++++++++++++++++++++++++------------ compose.yml | 2 ++ src/summary/Dockerfile | 3 ++- 4 files changed, 46 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7ff7947b..dad692e4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ and this project adheres to - ⬆️(frontend) upgrade @tanstack/react-query from 5.101.1 to 5.101.4 - ⬆️(frontend) upgrade @pandacss/preset-panda from 1.11.3 to 1.12.0 - ⬆️(frontend) upgrade posthog-js from 1.404.1 to 1.409.5 +- 🩹(makefile) change target of lint to also cover summary and agents ## [1.28.0] - 2026-08-24 diff --git a/Makefile b/Makefile index 2e5ae839..dad9579e 100644 --- a/Makefile +++ b/Makefile @@ -39,14 +39,16 @@ DB_PORT = 5432 DOCKER_UID = $(shell id -u) DOCKER_GID = $(shell id -g) DOCKER_USER = $(DOCKER_UID):$(DOCKER_GID) -COMPOSE = DOCKER_USER=$(DOCKER_USER) docker compose -COMPOSE_EXEC = $(COMPOSE) exec -COMPOSE_EXEC_APP = $(COMPOSE_EXEC) app-dev -COMPOSE_RUN = $(COMPOSE) run --rm -COMPOSE_RUN_APP = $(COMPOSE_RUN) app-dev -COMPOSE_RUN_LINT = $(COMPOSE_RUN) --no-deps app-dev -COMPOSE_RUN_CROWDIN = $(COMPOSE_RUN) crowdin crowdin -WAIT_DB = @$(COMPOSE_RUN) dockerize -wait tcp://$(DB_HOST):$(DB_PORT) -timeout 60s +COMPOSE = DOCKER_USER=$(DOCKER_USER) docker compose +COMPOSE_EXEC = $(COMPOSE) exec +COMPOSE_EXEC_APP = $(COMPOSE_EXEC) app-dev +COMPOSE_RUN = $(COMPOSE) run --rm +COMPOSE_RUN_APP = $(COMPOSE_RUN) app-dev +COMPOSE_RUN_LINT_BACK = $(COMPOSE_RUN) --no-deps app-dev +COMPOSE_RUN_LINT_AGENTS = $(COMPOSE_RUN) --no-deps multi-user-transcriber-dev +COMPOSE_RUN_LINT_SUMMARY = $(COMPOSE_RUN) --no-deps app-summary-dev +COMPOSE_RUN_CROWDIN = $(COMPOSE_RUN) crowdin crowdin +WAIT_DB = @$(COMPOSE_RUN) dockerize -wait tcp://$(DB_HOST):$(DB_PORT) -timeout 60s # -- Backend MANAGE = $(COMPOSE_RUN_APP) python manage.py @@ -56,9 +58,13 @@ MAIL_NPM = $(COMPOSE_RUN) -w /app/src/mail node npm LINT_RUFF_FORMAT = ruff format . LINT_RUFF_CHECK = ruff check . --fix LINT_PYLINT = pylint meet demo core -LINT_BACK = echo 'lint:ruff-format started…' && $(LINT_RUFF_FORMAT) \ - && echo 'lint:ruff-check started…' && $(LINT_RUFF_CHECK) \ - && echo 'lint:pylint started…' && $(LINT_PYLINT) +LINT_BACK = echo 'lint:back:ruff-format started…' && $(LINT_RUFF_FORMAT) \ + && echo 'lint:back:ruff-check started…' && $(LINT_RUFF_CHECK) \ + && echo 'lint:back:pylint started…' && $(LINT_PYLINT) +LINT_AGENTS = echo 'lint:agents:ruff-format started…' && $(LINT_RUFF_FORMAT) \ + && echo 'lint:agents:ruff-check started…' && $(LINT_RUFF_CHECK) +LINT_SUMMARY = echo 'lint:summary:ruff-format started…' && $(LINT_RUFF_FORMAT) \ + && echo 'lint:summary:ruff-check started…' && $(LINT_RUFF_CHECK) # -- Frontend PATH_FRONT = ./src/frontend @@ -107,6 +113,7 @@ build: ## build the project containers @$(MAKE) build-backend @$(MAKE) build-frontend @$(MAKE) build-agents + @$(MAKE) build-summary .PHONY: build build-backend: ## build the app-dev container @@ -122,6 +129,10 @@ build-agents: ## build the multi-user-transcriber agent container @$(COMPOSE) build multi-user-transcriber-dev .PHONY: build-agents +build-summary: ## build the app-summary-dev container + @$(COMPOSE) build app-summary-dev +.PHONY: build-summary + down: ## stop and remove containers, networks, images, and volumes @$(COMPOSE) down .PHONY: down @@ -198,23 +209,37 @@ demo: ## flush db then create a demo for load testing purpose @$(MANAGE) create_demo .PHONY: demo -lint: ## lint back-end python sources - @$(COMPOSE_RUN_LINT) sh -c "$(LINT_BACK)" +lint: ## lint all python sources (back-end, agents, summary) + @$(MAKE) lint-back + @$(MAKE) lint-agents + @$(MAKE) lint-summary .PHONY: lint +lint-back: ## lint back-end python sources + @$(COMPOSE_RUN_LINT_BACK) sh -c "$(LINT_BACK)" +.PHONY: lint-back + +lint-agents: ## lint agents python sources + @$(COMPOSE_RUN_LINT_AGENTS) sh -c "$(LINT_AGENTS)" +.PHONY: lint-agents + +lint-summary: ## lint summary python sources + @$(COMPOSE_RUN_LINT_SUMMARY) sh -c "$(LINT_SUMMARY)" +.PHONY: lint-summary + lint-ruff-format: ## format back-end python sources with ruff @echo 'lint:ruff-format started…' - @$(COMPOSE_RUN_LINT) $(LINT_RUFF_FORMAT) + @$(COMPOSE_RUN_LINT_BACK) $(LINT_RUFF_FORMAT) .PHONY: lint-ruff-format lint-ruff-check: ## lint back-end python sources with ruff @echo 'lint:ruff-check started…' - @$(COMPOSE_RUN_LINT) $(LINT_RUFF_CHECK) + @$(COMPOSE_RUN_LINT_BACK) $(LINT_RUFF_CHECK) .PHONY: lint-ruff-check lint-pylint: ## lint back-end python sources with pylint only on changed files from main @echo 'lint:pylint started…' - @$(COMPOSE_RUN_LINT) $(LINT_PYLINT) + @$(COMPOSE_RUN_LINT_BACK) $(LINT_PYLINT) .PHONY: lint-pylint test: ## run project tests; pass extra pytest args via ARGS, e.g. `make test ARGS="-vv"` diff --git a/compose.yml b/compose.yml index 76fedbd6..0eab13fa 100644 --- a/compose.yml +++ b/compose.yml @@ -249,6 +249,7 @@ services: build: context: ./src/agents target: development + user: ${DOCKER_USER:-1000} command: ["python", "metadata_collector.py", "dev"] env_file: - env.d/development/metadata_collector @@ -267,6 +268,7 @@ services: build: context: ./src/agents target: development + user: ${DOCKER_USER:-1000} env_file: - env.d/development/multi_user_transcriber volumes: diff --git a/src/summary/Dockerfile b/src/summary/Dockerfile index 84c8c52f..595dc8a7 100644 --- a/src/summary/Dockerfile +++ b/src/summary/Dockerfile @@ -17,7 +17,8 @@ FROM base AS development WORKDIR /app COPY . . -RUN pip install --no-cache-dir -e ".[dev]" || pip install --no-cache-dir -e . + +RUN pip install --no-cache-dir -e ".[dev]" CMD ["uvicorn", "summary.main:app", "--host", "0.0.0.0", "--port", "8000", "--reload"]