{
  "name": "psyche-orchestrator",
  "$schema": "../../../node_modules/nx/schemas/project-schema.json",
  "sourceRoot": "apps/psyche/orchestrator/src",
  "projectType": "application",
  "tags": [
    "scope:psyche",
    "layer:service",
    "type:python",
    "runtime:fastapi",
    "feature:orchestrator"
  ],
  "targets": {
    "serve": {
      "executor": "nx:run-commands",
      "options": {
        "cwd": "apps/psyche/orchestrator",
        "command": "poetry run uvicorn orchestrator.main:app --reload --host 0.0.0.0 --port 8007"
      }
    },
    "serve-prod": {
      "executor": "nx:run-commands",
      "options": {
        "cwd": "apps/psyche/orchestrator",
        "command": "poetry run uvicorn orchestrator.main:app --host 0.0.0.0 --port 8007 --workers 4"
      }
    },
    "build": {
      "executor": "nx:run-commands",
      "outputs": ["{projectRoot}/dist"],
      "options": {
        "cwd": "apps/psyche/orchestrator",
        "commands": ["poetry build"]
      }
    },
    "install": {
      "executor": "nx:run-commands",
      "options": {
        "cwd": "apps/psyche/orchestrator",
        "command": "poetry install"
      }
    },
    "install-all": {
      "executor": "nx:run-commands",
      "options": {
        "cwd": "apps/psyche/orchestrator",
        "command": "poetry install --extras all"
      }
    },
    "lint": {
      "executor": "nx:run-commands",
      "options": {
        "cwd": "apps/psyche/orchestrator",
        "commands": ["poetry run ruff check src/", "poetry run mypy src/"]
      }
    },
    "format": {
      "executor": "nx:run-commands",
      "options": {
        "cwd": "apps/psyche/orchestrator",
        "commands": ["poetry run black src/", "poetry run ruff check --fix src/"]
      }
    },
    "test": {
      "executor": "nx:run-commands",
      "options": {
        "cwd": "apps/psyche/orchestrator",
        "command": "poetry run pytest"
      }
    },
    "test-unit": {
      "executor": "nx:run-commands",
      "options": {
        "cwd": "apps/psyche/orchestrator",
        "command": "poetry run pytest -m 'not integration and not grpc'"
      }
    },
    "test-integration": {
      "executor": "nx:run-commands",
      "options": {
        "cwd": "apps/psyche/orchestrator",
        "command": "poetry run pytest -m integration"
      }
    },
    "test-cov": {
      "executor": "nx:run-commands",
      "outputs": ["{projectRoot}/htmlcov"],
      "options": {
        "cwd": "apps/psyche/orchestrator",
        "command": "poetry run pytest --cov=orchestrator --cov-report=html"
      }
    },
    "migrate": {
      "executor": "nx:run-commands",
      "options": {
        "cwd": "apps/psyche/orchestrator",
        "command": "poetry run alembic upgrade head"
      }
    },
    "migrate-create": {
      "executor": "nx:run-commands",
      "options": {
        "cwd": "apps/psyche/orchestrator",
        "command": "poetry run alembic revision --autogenerate -m"
      }
    },
    "docker-build": {
      "executor": "nx:run-commands",
      "options": {
        "cwd": "apps/psyche/orchestrator",
        "command": "docker build -t psyche-orchestrator:latest ."
      }
    },
    "docker-run": {
      "executor": "nx:run-commands",
      "options": {
        "cwd": "apps/psyche/orchestrator",
        "command": "docker run -p 8007:8007 -p 50051:50051 --env-file .env psyche-orchestrator:latest"
      }
    }
  }
}
