{
  "name": "psyche-persona-service",
  "$schema": "../../../node_modules/nx/schemas/project-schema.json",
  "projectType": "application",
  "sourceRoot": "apps/psyche/persona-service/src",
  "tags": ["scope:psyche", "layer:service", "type:python", "runtime:fastapi", "feature:persona"],
  "targets": {
    "serve": {
      "executor": "nx:run-commands",
      "options": {
        "command": "poetry run uvicorn persona_service.main:app --reload --host 0.0.0.0 --port 8009",
        "cwd": "apps/psyche/persona-service"
      }
    },
    "serve-prod": {
      "executor": "nx:run-commands",
      "options": {
        "command": "poetry run uvicorn persona_service.main:app --host 0.0.0.0 --port 8009 --workers 4",
        "cwd": "apps/psyche/persona-service"
      }
    },
    "build": {
      "executor": "nx:run-commands",
      "options": {
        "command": "poetry build",
        "cwd": "apps/psyche/persona-service"
      },
      "outputs": ["{projectRoot}/dist"]
    },
    "install": {
      "executor": "nx:run-commands",
      "options": {
        "command": "poetry install",
        "cwd": "apps/psyche/persona-service"
      }
    },
    "install-dev": {
      "executor": "nx:run-commands",
      "options": {
        "command": "poetry install --with dev",
        "cwd": "apps/psyche/persona-service"
      }
    },
    "lint": {
      "executor": "nx:run-commands",
      "options": {
        "commands": ["poetry run ruff check src/", "poetry run mypy src/"],
        "cwd": "apps/psyche/persona-service",
        "parallel": false
      }
    },
    "format": {
      "executor": "nx:run-commands",
      "options": {
        "commands": ["poetry run black src/", "poetry run ruff check --fix src/"],
        "cwd": "apps/psyche/persona-service",
        "parallel": false
      }
    },
    "test": {
      "executor": "nx:run-commands",
      "options": {
        "command": "poetry run pytest",
        "cwd": "apps/psyche/persona-service"
      }
    },
    "test-unit": {
      "executor": "nx:run-commands",
      "options": {
        "command": "poetry run pytest -m unit",
        "cwd": "apps/psyche/persona-service"
      }
    },
    "test-integration": {
      "executor": "nx:run-commands",
      "options": {
        "command": "poetry run pytest -m integration",
        "cwd": "apps/psyche/persona-service"
      }
    },
    "test-cov": {
      "executor": "nx:run-commands",
      "options": {
        "command": "poetry run pytest --cov=persona_service --cov=persona_system --cov-report=html --cov-report=term-missing",
        "cwd": "apps/psyche/persona-service"
      },
      "outputs": ["{projectRoot}/htmlcov"]
    },
    "docker-build": {
      "executor": "nx:run-commands",
      "options": {
        "command": "docker build -t psyche-persona-service:latest -f Dockerfile ../..",
        "cwd": "apps/psyche/persona-service"
      }
    },
    "docker-run": {
      "executor": "nx:run-commands",
      "options": {
        "command": "docker run -p 8009:8009 --env-file .env psyche-persona-service:latest",
        "cwd": "apps/psyche/persona-service"
      }
    }
  }
}
