vishaldhakad commited on
Commit
15e3224
·
1 Parent(s): 6327f84

fix: add pyproject.toml for openenv validate

Browse files
Files changed (5) hide show
  1. pyproject.toml +37 -9
  2. requirements.txt +1 -1
  3. server/__init__.py +0 -0
  4. server/app.py +27 -0
  5. uv.lock +0 -0
pyproject.toml CHANGED
@@ -1,14 +1,42 @@
 
 
 
 
1
  [project]
2
  name = "SecureCodeEnv"
3
- version = "0.1.0"
4
- description = "Hackathon project"
5
-
 
 
6
  dependencies = [
7
- "fastapi",
8
- "uvicorn",
9
- "openai"
 
 
 
 
 
 
 
 
10
  ]
11
 
12
- [build-system]
13
- requires = ["setuptools"]
14
- build-backend = "setuptools.build_meta"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [build-system]
2
+ requires = ["setuptools>=68.0", "wheel"]
3
+ build-backend = "setuptools.backends.legacy:build"
4
+
5
  [project]
6
  name = "SecureCodeEnv"
7
+ version = "2.0.0"
8
+ description = "An RL environment for training LLM agents to write production-ready, secure Python code."
9
+ readme = "README.md"
10
+ license = { text = "MIT" }
11
+ requires-python = ">=3.11"
12
  dependencies = [
13
+ "fastapi==0.115.0",
14
+ "uvicorn==0.30.6",
15
+ "pydantic==2.7.0",
16
+ "bandit==1.7.10",
17
+ "openai>=2.7.2",
18
+ "requests==2.32.3",
19
+ "python-multipart==0.0.9",
20
+ "httpx==0.27.0",
21
+ "bcrypt==4.1.3",
22
+ "PyJWT==2.8.0",
23
+ "openenv-core>=0.2.0",
24
  ]
25
 
26
+ [project.scripts]
27
+ server = "server.app:start"
28
+
29
+ [tool.setuptools.packages.find]
30
+ where = ["."]
31
+ include = ["app*", "graders*", "codegraph*", "sandbox*", "tasks*", "server*"]
32
+
33
+ [tool.openenv]
34
+ name = "SecureCodeEnv"
35
+ version = "2.0.0"
36
+ entrypoint = "app.main:app"
37
+ port = 7860
38
+ reset_endpoint = "/reset"
39
+ step_endpoint = "/step"
40
+ state_endpoint = "/state"
41
+ health_endpoint = "/health"
42
+ framework = "fastapi"
requirements.txt CHANGED
@@ -2,7 +2,7 @@ fastapi==0.115.0
2
  uvicorn==0.30.6
3
  pydantic==2.7.0
4
  bandit==1.7.10
5
- openai==1.40.0
6
  requests==2.32.3
7
  python-multipart==0.0.9
8
  httpx==0.27.0
 
2
  uvicorn==0.30.6
3
  pydantic==2.7.0
4
  bandit==1.7.10
5
+ openai>=2.7.2
6
  requests==2.32.3
7
  python-multipart==0.0.9
8
  httpx==0.27.0
server/__init__.py ADDED
File without changes
server/app.py ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ server/app.py — OpenEnv required server entry point.
3
+ Delegates to the main FastAPI application.
4
+ """
5
+ import uvicorn
6
+ import sys
7
+ import os
8
+
9
+ # Ensure project root is on path
10
+ sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
11
+
12
+ from app.main import app # noqa: F401 — re-exported for openenv
13
+
14
+
15
+ def start():
16
+ """Entry point for [project.scripts] server = 'server.app:start'"""
17
+ uvicorn.run(
18
+ "app.main:app",
19
+ host="0.0.0.0",
20
+ port=int(os.environ.get("PORT", 7860)),
21
+ workers=2,
22
+ log_level="info",
23
+ )
24
+
25
+
26
+ if __name__ == "__main__":
27
+ start()
uv.lock ADDED
The diff for this file is too large to render. See raw diff