Fixes bugs and adds documentation for the proto directory.
Changes
Bug Fixes
proto/buf.yaml: fixed module path path: proto → path: . — buf.yaml is inside proto/, so the old path resolved to proto/proto/ (doesn't exist). buf lint and buf generate were broken.
services/grpc/data_service.py: added missing import grpc — grpc.StatusCode.NOT_FOUND was called without import, causing NameError at runtime on not-found paths.
services/grpc/credit_class_service.py: same fix — 5 occurrences of grpc.StatusCode.NOT_FOUND without import.
Documentation
proto/README.md — documents directory structure, both services (46 RPCs total), code generation workflow (Dockerfile.grpc + buf), linting, and how to add new RPCs.
Verification
buf.yaml path: . correctly resolves proto files at proto/common/, proto/data/v1/, proto/ecocredit/v1/
- Fix buf.yaml module path: 'proto' → '.' (buf.yaml is inside proto/)
- Add missing 'import grpc' to data_service.py and credit_class_service.py
(grpc.StatusCode.NOT_FOUND was used without import — NameError at runtime)
- Add proto/README.md documenting services, code generation, and workflow
Summary
Fixes bugs and adds documentation for the proto directory.
Changes
Bug Fixes
proto/buf.yaml: fixed module pathpath: proto→path: .— buf.yaml is inside proto/, so the old path resolved toproto/proto/(doesn't exist).buf lintandbuf generatewere broken.services/grpc/data_service.py: added missingimport grpc—grpc.StatusCode.NOT_FOUNDwas called without import, causingNameErrorat runtime on not-found paths.services/grpc/credit_class_service.py: same fix — 5 occurrences ofgrpc.StatusCode.NOT_FOUNDwithout import.Documentation
proto/README.md— documents directory structure, both services (46 RPCs total), code generation workflow (Dockerfile.grpc + buf), linting, and how to add new RPCs.Verification
path: .correctly resolves proto files atproto/common/,proto/data/v1/,proto/ecocredit/v1/import grpcconfirmed in both service files