Add development toolchain baseline
This commit is contained in:
parent
392e888170
commit
1094a015dd
11
Makefile
11
Makefile
|
|
@ -1,6 +1,6 @@
|
|||
PYTHON ?= python3
|
||||
|
||||
.PHONY: generate-proto test lint format
|
||||
.PHONY: generate-proto test lint format typecheck
|
||||
|
||||
generate-proto:
|
||||
$(PYTHON) tools/gen_proto.py
|
||||
|
|
@ -9,8 +9,11 @@ test:
|
|||
$(PYTHON) -m pytest
|
||||
|
||||
lint:
|
||||
ruff check src tests
|
||||
black --check src tests
|
||||
$(PYTHON) -m ruff check src tests
|
||||
$(PYTHON) -m black --check src tests
|
||||
|
||||
format:
|
||||
black src tests
|
||||
$(PYTHON) -m black src tests
|
||||
|
||||
typecheck:
|
||||
$(PYTHON) -m pyright
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"include": ["src", "tests"],
|
||||
"exclude": [".venv", ".codex", "**/__pycache__", "build", "dist"],
|
||||
"extraPaths": ["src"],
|
||||
"venvPath": ".",
|
||||
"venv": ".venv",
|
||||
"typeCheckingMode": "standard",
|
||||
"pythonVersion": "3.11"
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
def test_imports():
|
||||
import app.main.app
|
||||
import app.runtime.config.loader
|
||||
import app.runtime.config.models
|
||||
import app.shared.contracts.proto.v1
|
||||
|
||||
assert app.main.app.__name__ == "app.main.app"
|
||||
assert app.runtime.config.loader.__name__ == "app.runtime.config.loader"
|
||||
assert app.runtime.config.models.__name__ == "app.runtime.config.models"
|
||||
assert app.shared.contracts.proto.v1.__name__ == "app.shared.contracts.proto.v1"
|
||||
Loading…
Reference in New Issue