Skip to content

Commit

Permalink
feat: make serve command optional
Browse files Browse the repository at this point in the history
  • Loading branch information
RogerHYang committed Oct 5, 2024
1 parent 5d667d5 commit a404161
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/tests/utils/testServer.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ console.log("PHOENIX_WORKING_DIR: ", process.env["PHOENIX_WORKING_DIR"]);

// Execute the server
// TODO: Might have to force install the phoenix server
const childProcess = exec("python -m phoenix.server.main serve");
const childProcess = exec("python -m phoenix.server.main");

childProcess.stdout.pipe(process.stdout);
childProcess.stderr.pipe(process.stderr);
2 changes: 1 addition & 1 deletion src/phoenix/server/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ def main() -> None:
)
demo_parser.add_argument("--simulate-streaming", action="store_true")

args = parser.parse_args()
args = parser.parse_args(sys.argv[1:] or ["serve"])
db_connection_str = (
args.database_url if args.database_url else get_env_database_connection_str()
)
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ def _server() -> Iterator[None]:
if get_env_database_connection_str().startswith("postgresql"):
# double-check for safety
assert get_env_database_schema()
command = f"{sys.executable} -m phoenix.server.main serve"
command = f"{sys.executable} -m phoenix.server.main"
process = Popen(command.split(), stdout=PIPE, stderr=STDOUT, text=True, env=os.environ)
log: List[str] = []
lock: Lock = Lock()
Expand Down

0 comments on commit a404161

Please sign in to comment.