chore(backend): move SQL lint requirements to backend root
This commit is contained in:
1 parent
88c14b627e
commit
1535c19b8c
4 files changed
+5
-1
No files matched your search
+1
-1
@@ -6,7 +6,7 @@ GO_TOOL := $(GO) tool
|
||||
API_DIR := $(abspath ../api)
|
||||
ROOT_DIR := $(abspath ..)
|
||||
API_PREPARED ?= 0
|
||||
QUALITY_REQUIREMENTS ?= scripts/requirements-quality.txt
|
||||
QUALITY_REQUIREMENTS ?= requirements-quality.txt
|
||||
QUALITY_VENV ?= $(CURDIR)/.venv-quality
|
||||
QUALITY_PYTHON ?= $(QUALITY_VENV)/bin/python
|
||||
QUALITY_STAMP := $(QUALITY_VENV)/.deps.stamp
|
||||
|
||||
File renamed without changes.
@@ -66,6 +66,8 @@ datamodel-code-generator 0.83.0 reads api/ml/openapi.bundle.yml and writes ml/sr
|
||||
|
||||
## Code boundaries
|
||||
|
||||
SQL linter dependencies are listed in `backend/requirements-quality.txt` beside `.sqlfluff`. The `make -C backend lint-sql` command installs them in the local `.venv-quality` environment and checks migrations and queries. Running the Go service does not require this environment.
|
||||
|
||||
Go follows domain, usecase, port, adapter, and bootstrap boundaries. The HTTP adapter mounts the generated ogen handler in chi. SQL belongs in backend/db/queries/; schema changes belong in backend/db/migrations/. sqlc output and wire_gen.go are generated.
|
||||
|
||||
Shared backend settings live in backend/config/. The service uses go-logkit 0.6.0 through its slog bridge and go-httpkit 0.7.0 for request IDs, request logging, and panic recovery. It retains custom Prometheus middleware because it bounds method labels and uses chi route patterns; go-httpkit/metrics accepts the raw method name as a label.
|
||||
|
||||
@@ -66,6 +66,8 @@ Python-генератор datamodel-code-generator 0.83.0 читает api/ml/op
|
||||
|
||||
## Код и слои
|
||||
|
||||
Зависимости SQL-линтера перечислены в `backend/requirements-quality.txt` рядом с `.sqlfluff`. Команда `make -C backend lint-sql` устанавливает их в локальное окружение `.venv-quality` и проверяет миграции и запросы. Для запуска Go-сервиса это окружение не требуется.
|
||||
|
||||
Go следует границам domain, usecase, port, adapter и bootstrap. HTTP adapter монтирует generated ogen handler в chi. SQL принадлежит backend/db/queries/, изменения схемы - backend/db/migrations/. sqlc output и wire_gen.go сгенерированы.
|
||||
|
||||
Общие backend параметры находятся в backend/config/. Используются go-logkit 0.6.0 через slog bridge и go-httpkit 0.7.0 для request ID, request logging и panic recovery. Собственный Prometheus middleware сохраняется: он ограничивает method labels и использует chi route patterns; go-httpkit/metrics принимает исходное имя метода как label.
|
||||
|
||||
Reference in new issue
Block a user