{
  "name": "psyche-perception-engine",
  "$schema": "../../../node_modules/nx/schemas/project-schema.json",
  "sourceRoot": "apps/psyche/perception-engine/src",
  "projectType": "application",
  "tags": ["scope:psyche", "layer:service", "type:python", "runtime:fastapi", "gpu:optional"],
  "targets": {
    "serve": {
      "executor": "nx:run-commands",
      "options": {
        "cwd": "apps/psyche/perception-engine",
        "command": "poetry run uvicorn perception_engine.main:app --reload --host 0.0.0.0 --port 8004"
      }
    },
    "serve-prod": {
      "executor": "nx:run-commands",
      "options": {
        "cwd": "apps/psyche/perception-engine",
        "command": "poetry run uvicorn perception_engine.main:app --host 0.0.0.0 --port 8004 --workers 4"
      }
    },
    "build": {
      "executor": "nx:run-commands",
      "outputs": ["{projectRoot}/dist"],
      "options": {
        "cwd": "apps/psyche/perception-engine",
        "commands": ["poetry build"]
      }
    },
    "install": {
      "executor": "nx:run-commands",
      "options": {
        "cwd": "apps/psyche/perception-engine",
        "command": "poetry install"
      }
    },
    "install-all": {
      "executor": "nx:run-commands",
      "options": {
        "cwd": "apps/psyche/perception-engine",
        "command": "poetry install --extras all"
      }
    },
    "lint": {
      "executor": "nx:run-commands",
      "options": {
        "cwd": "apps/psyche/perception-engine",
        "commands": ["poetry run ruff check src/", "poetry run mypy src/"]
      }
    },
    "format": {
      "executor": "nx:run-commands",
      "options": {
        "cwd": "apps/psyche/perception-engine",
        "commands": ["poetry run black src/", "poetry run ruff check --fix src/"]
      }
    },
    "test": {
      "executor": "nx:run-commands",
      "options": {
        "cwd": "apps/psyche/perception-engine",
        "command": "poetry run pytest"
      }
    },
    "test-no-gpu": {
      "executor": "nx:run-commands",
      "options": {
        "cwd": "apps/psyche/perception-engine",
        "command": "poetry run pytest -m 'not gpu'"
      }
    },
    "test-cov": {
      "executor": "nx:run-commands",
      "outputs": ["{projectRoot}/htmlcov"],
      "options": {
        "cwd": "apps/psyche/perception-engine",
        "command": "poetry run pytest --cov=perception_engine --cov-report=html"
      }
    },
    "docker-build": {
      "executor": "nx:run-commands",
      "options": {
        "cwd": "apps/psyche/perception-engine",
        "command": "docker build -t psyche-perception-engine:latest ."
      }
    },
    "docker-run": {
      "executor": "nx:run-commands",
      "options": {
        "cwd": "apps/psyche/perception-engine",
        "command": "docker run --gpus all -p 8004:8004 --env-file .env psyche-perception-engine:latest"
      }
    }
  }
}
