Public Access
Fixing how uv is being used in the base image, adding Poe the Poet to everything.
Tests / Build and Push CICD Base Image (push) Successful in 1m2s
Tests / TSDoc Lint Check (push) Has been skipped
Tests / Trailing Whitespace Check (push) Has been skipped
Tests / End of File Check (push) Has been skipped
Tests / YAML Syntax Check (push) Has been skipped
Tests / TOML Syntax Check (push) Has been skipped
Tests / Mixed Line Ending Check (push) Has been skipped
Tests / TOML Formatting Check (push) Has been skipped
Tests / Ruff Linting (push) Has been skipped
Tests / ESLint Check (push) Has been skipped
Tests / Prettier Format Check (push) Has been skipped
Tests / TypeScript Type Check (push) Has been skipped
Tests / Backend Tests (push) Has been skipped
Tests / Frontend Tests (push) Has been skipped
Tests / Pyright Type Check (push) Has been skipped
Tests / Darglint Docstring Check (push) Has been skipped
Tests / Backend Doctests (push) Has been skipped
Tests / Integration Tests (push) Has been skipped
Tests / End-to-End Tests (push) Has been skipped
Tests / Build and Push CICD Complete Image (push) Failing after 20m37s
Tests / No Docstring Types Check (push) Has been skipped
Tests / Ruff Format Check (push) Has been skipped
Tests / Build and Push CICD Base Image (push) Successful in 1m2s
Tests / TSDoc Lint Check (push) Has been skipped
Tests / Trailing Whitespace Check (push) Has been skipped
Tests / End of File Check (push) Has been skipped
Tests / YAML Syntax Check (push) Has been skipped
Tests / TOML Syntax Check (push) Has been skipped
Tests / Mixed Line Ending Check (push) Has been skipped
Tests / TOML Formatting Check (push) Has been skipped
Tests / Ruff Linting (push) Has been skipped
Tests / ESLint Check (push) Has been skipped
Tests / Prettier Format Check (push) Has been skipped
Tests / TypeScript Type Check (push) Has been skipped
Tests / Backend Tests (push) Has been skipped
Tests / Frontend Tests (push) Has been skipped
Tests / Pyright Type Check (push) Has been skipped
Tests / Darglint Docstring Check (push) Has been skipped
Tests / Backend Doctests (push) Has been skipped
Tests / Integration Tests (push) Has been skipped
Tests / End-to-End Tests (push) Has been skipped
Tests / Build and Push CICD Complete Image (push) Failing after 20m37s
Tests / No Docstring Types Check (push) Has been skipped
Tests / Ruff Format Check (push) Has been skipped
Signed-off-by: Cliff Hill <xlorep@darkhelm.org>
This commit is contained in:
+104
-1
@@ -19,7 +19,8 @@ dev = [
|
||||
"yamllint>=1.35.0",
|
||||
"toml-sort>=0.23.0",
|
||||
"language-formatters-pre-commit-hooks>=2.14.0", # For pretty-format-toml
|
||||
"xdoctest>=1.1.0" # For doctest support
|
||||
"xdoctest>=1.1.0", # For doctest support
|
||||
"poethepoet>=0.24.0" # Task runner for unified development workflows
|
||||
]
|
||||
|
||||
[project]
|
||||
@@ -82,6 +83,108 @@ packages = ["src/backend"]
|
||||
[tool.hatch.version]
|
||||
path = "src/backend/__init__.py"
|
||||
|
||||
[tool.poe.tasks]
|
||||
build-cicd = {shell = "./scripts/build-cicd-local.sh", help = "Build both CI/CD images"}
|
||||
# === Docker CI/CD Image Tasks ===
|
||||
build-cicd-base = {shell = "./scripts/build-cicd-local.sh --base-only", help = "Build CI/CD base image only"}
|
||||
build-cicd-complete = {shell = "./scripts/build-cicd-local.sh --complete-only", help = "Build CI/CD complete image only"}
|
||||
build-cicd-force = {shell = "./scripts/build-cicd-local.sh --force", help = "Force rebuild CI/CD images"}
|
||||
build-if-dockerfile-changed = {shell = "if git diff --quiet HEAD~1 Dockerfile.cicd-base Dockerfile.cicd; then echo 'No Dockerfile changes, skipping build'; else poe build-cicd; fi", help = "Only build CI/CD images if Dockerfiles changed"}
|
||||
# === Local CI Simulation ===
|
||||
ci-format-check = [
|
||||
{shell = "cd backend && uv run ruff format --check ."},
|
||||
{shell = "cd frontend && yarn prettier --check src/"}
|
||||
]
|
||||
ci-full = ["ci-format-check", "lint", "type-check", "test-all", "docs-backend"]
|
||||
ci-quick = ["ci-format-check", "lint", "type-check"]
|
||||
# === Utility Tasks ===
|
||||
clean = [
|
||||
{shell = "cd backend && find . -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true"},
|
||||
{shell = "cd backend && find . -name '*.pyc' -delete 2>/dev/null || true"},
|
||||
{shell = "cd frontend && rm -rf node_modules/.cache dist coverage 2>/dev/null || true"},
|
||||
{shell = "docker system prune -f"}
|
||||
]
|
||||
deps-check = [
|
||||
{shell = "cd backend && uv pip check"},
|
||||
{shell = "cd frontend && yarn audit"}
|
||||
]
|
||||
# === Dependency Management ===
|
||||
deps-install = [
|
||||
{shell = "cd backend && uv sync --dev"},
|
||||
{shell = "cd frontend && yarn install"}
|
||||
]
|
||||
deps-update = [
|
||||
{shell = "cd backend && uv sync --upgrade --dev"},
|
||||
{shell = "cd frontend && yarn upgrade"}
|
||||
]
|
||||
# === Development Environment Tasks ===
|
||||
dev = {shell = "docker compose -f compose.dev.yml up -d", help = "Start development environment"}
|
||||
dev-down = {shell = "docker compose -f compose.dev.yml down", help = "Stop development environment"}
|
||||
dev-logs = {shell = "docker compose -f compose.dev.yml logs -f", help = "Follow development environment logs"}
|
||||
dev-restart = {shell = "docker compose -f compose.dev.yml restart", help = "Restart development environment"}
|
||||
# === Documentation Tasks ===
|
||||
docs-backend = {shell = "cd backend && uv run xdoctest --module backend", help = "Run backend docstring tests"}
|
||||
docs-check = {shell = "cd backend && uv run darglint backend/", help = "Check docstring quality"}
|
||||
format = ["format-backend", "format-frontend"]
|
||||
# === Code Formatting Tasks ===
|
||||
format-backend = {shell = "cd backend && uv run ruff format .", help = "Format backend Python code"}
|
||||
format-frontend = {shell = "cd frontend && yarn prettier --write src/", help = "Format frontend TypeScript code"}
|
||||
lint = ["lint-backend", "lint-frontend"]
|
||||
# === Linting Tasks ===
|
||||
lint-backend = {shell = "cd backend && uv run ruff check .", help = "Lint backend Python code"}
|
||||
lint-frontend = {shell = "cd frontend && yarn lint", help = "Lint frontend TypeScript code"}
|
||||
# === Parallel Execution for Speed ===
|
||||
lint-parallel = {shell = "poe lint-backend & poe lint-frontend & wait", help = "Run linting in parallel for speed"}
|
||||
# === CI/CD Tasks ===
|
||||
pre-commit-install = {shell = "pre-commit install", help = "Install pre-commit hooks"}
|
||||
pre-commit-run = {shell = "pre-commit run --all-files", help = "Run all pre-commit hooks"}
|
||||
pre-commit-update = {shell = "pre-commit autoupdate", help = "Update pre-commit hook versions"}
|
||||
# === Quality Gates (Mimics CI Pipeline) ===
|
||||
quality-gate = [
|
||||
{shell = "echo '🔍 Running quality gate checks...'"},
|
||||
"ci-format-check",
|
||||
"lint",
|
||||
"type-check",
|
||||
"test-unit",
|
||||
"docs-check",
|
||||
{shell = "echo '✅ All quality checks passed!'"}
|
||||
]
|
||||
reset = [
|
||||
"clean",
|
||||
{shell = "cd backend && rm -rf .venv 2>/dev/null || true"},
|
||||
{shell = "cd frontend && rm -rf node_modules 2>/dev/null || true"},
|
||||
"deps-install"
|
||||
]
|
||||
# === Development Setup (New Developer Onboarding) ===
|
||||
setup = [
|
||||
"deps-install",
|
||||
"pre-commit-install",
|
||||
"dev",
|
||||
{shell = "echo '✓ Development environment ready!'"},
|
||||
{shell = "echo ' - Frontend: http://localhost:3000'"},
|
||||
{shell = "echo ' - Backend API: http://localhost:8000'"},
|
||||
{shell = "echo ' - API Docs: http://localhost:8000/docs'"}
|
||||
]
|
||||
test-all = ["test-backend", "test-frontend", "test-integration"]
|
||||
# === Testing Tasks ===
|
||||
test-backend = {shell = "cd backend && uv run pytest", help = "Run backend unit tests"}
|
||||
test-backend-cov = {shell = "cd backend && uv run pytest --cov", help = "Run backend tests with coverage"}
|
||||
test-e2e = {shell = "cd frontend && yarn test:e2e", help = "Run end-to-end tests"}
|
||||
test-frontend = {shell = "cd frontend && yarn test", help = "Run frontend unit tests"}
|
||||
test-frontend-cov = {shell = "cd frontend && yarn test:coverage", help = "Run frontend tests with coverage"}
|
||||
test-full = ["test-backend-cov", "test-frontend-cov", "test-integration", "test-e2e"]
|
||||
# === Smart Conditional Tasks ===
|
||||
test-if-changed = {shell = "if git diff --quiet HEAD~1 backend/ frontend/; then echo 'No changes detected, skipping tests'; else poe test-unit; fi", help = "Only run tests if code has changed"}
|
||||
test-integration = {shell = "cd backend && uv run pytest tests/integration/", help = "Run backend integration tests"}
|
||||
test-parallel = {shell = "poe test-backend & poe test-frontend & wait", help = "Run unit tests in parallel for speed"}
|
||||
# === Comprehensive Testing ===
|
||||
test-unit = ["test-backend", "test-frontend"]
|
||||
type-check = ["type-check-backend", "type-check-frontend"]
|
||||
# === Type Checking Tasks ===
|
||||
type-check-backend = {shell = "cd backend && uv run pyright .", help = "Type check backend Python code"}
|
||||
type-check-frontend = {shell = "cd frontend && yarn type-check", help = "Type check frontend TypeScript code"}
|
||||
type-check-parallel = {shell = "poe type-check-backend & poe type-check-frontend & wait", help = "Run type checking in parallel for speed"}
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
addopts = [
|
||||
"--strict-markers",
|
||||
|
||||
Reference in New Issue
Block a user