diff --git a/app/package.json b/app/package.json index 3ea9bdcc77..0c98748739 100644 --- a/app/package.json +++ b/app/package.json @@ -108,9 +108,9 @@ "test:e2e:ui": "playwright test --ui", "dev": "pnpm run dev:server & pnpm run build:static && pnpm run build:relay && vite", "dev:ui": "pnpm run build:static && pnpm run build:relay && vite", - "dev:server": "source .env && python -m phoenix.server.main --dev serve", + "dev:server": "source .env && tox r -e phoenix_main -- --dev serve", "dev:server:test": "node ./tests/utils/testServer.mjs", - "dev:server:init": "python -m phoenix.server.main --dev serve --with-trace-fixtures=llama_index_rag --with-projects=demo_llama_index --force-fixture-ingestion", + "dev:server:init": "tox r -e phoenix_main -- --dev serve --with-trace-fixtures=llama_index_rag --with-projects=demo_llama_index --force-fixture-ingestion", "typecheck": "tsc --noEmit", "lint": "eslint ./src", "prettier": "prettier --write './src/**/*'", diff --git a/tox.ini b/tox.ini index 8f93e5404d..4f2d1e12bd 100644 --- a/tox.ini +++ b/tox.ini @@ -114,3 +114,15 @@ allowlist_externals = commands = unlink evals unlink otel + +[testenv:phoenix_main] +pass_env= + PHOENIX_PORT + PHOENIX_GRPC_PORT + PHOENIX_HOST_ROOT_PATH + PHOENIX_SQL_DATABASE_URL + PHOENIX_SQL_DATABASE_SCHEMA +commands_pre = + uv tool install --compile-bytecode --reinstall-package arize-phoenix arize-phoenix@. +commands = + uv tool run arize-phoenix {posargs:serve}