3v324v23 commited on
Commit
b358ab7
·
1 Parent(s): be162b1

Final Fix: Multi-mode deployment compliance (main(), entry points, uv.lock)

Browse files
Files changed (3) hide show
  1. pyproject.toml +3 -0
  2. server/app.py +9 -0
  3. uv.lock +0 -0
pyproject.toml CHANGED
@@ -23,6 +23,9 @@ dependencies = [
23
  [project.urls]
24
  Homepage = "https://github.com/Levi710/PR-Review-Negotiation-Environment"
25
 
 
 
 
26
  [tool.setuptools.packages.find]
27
  where = ["."]
28
  include = ["server*", "models*", "app*"]
 
23
  [project.urls]
24
  Homepage = "https://github.com/Levi710/PR-Review-Negotiation-Environment"
25
 
26
+ [project.scripts]
27
+ server = "server.app:main"
28
+
29
  [tool.setuptools.packages.find]
30
  where = ["."]
31
  include = ["server*", "models*", "app*"]
server/app.py CHANGED
@@ -39,3 +39,12 @@ def state():
39
  if env._state is None:
40
  raise HTTPException(status_code=400, detail="No active episode. Call /reset first.")
41
  return env.state()
 
 
 
 
 
 
 
 
 
 
39
  if env._state is None:
40
  raise HTTPException(status_code=400, detail="No active episode. Call /reset first.")
41
  return env.state()
42
+
43
+ def main():
44
+ import uvicorn
45
+ import os
46
+ port = int(os.environ.get("PORT", 8000))
47
+ uvicorn.run(app, host="0.0.0.0", port=port)
48
+
49
+ if __name__ == "__main__":
50
+ main()
uv.lock ADDED
The diff for this file is too large to render. See raw diff