Paramveer singh commited on
Commit
91ba8ea
·
1 Parent(s): e5bb9f2

Final: Restored multi-mode structure

Browse files
Files changed (5) hide show
  1. Dockerfile +1 -1
  2. openenv.yaml +1 -1
  3. pyproject.toml +10 -14
  4. server/__init__.py +0 -0
  5. main.py → server/app.py +1 -1
Dockerfile CHANGED
@@ -15,4 +15,4 @@ COPY . .
15
  EXPOSE 7860
16
 
17
  # Start the FastAPI server using Uvicorn
18
- CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
 
15
  EXPOSE 7860
16
 
17
  # Start the FastAPI server using Uvicorn
18
+ CMD ["uvicorn", "server.app:app", "--host", "0.0.0.0", "--port", "7860"]
openenv.yaml CHANGED
@@ -1,4 +1,4 @@
1
  name: data-privacy-env
2
  version: 1.0.0
3
  type: environment
4
- entry_point: main:app
 
1
  name: data-privacy-env
2
  version: 1.0.0
3
  type: environment
4
+ entry_point: server.app:app
pyproject.toml CHANGED
@@ -1,28 +1,24 @@
1
  [build-system]
2
- requires = ["setuptools>=61.0", "wheel"]
3
  build-backend = "setuptools.build_meta"
4
 
5
  [project]
6
  name = "data-privacy-env"
7
  version = "1.0.0"
8
- description = "A spec-compliant OpenEnv for PII remediation and GDPR tasks."
9
  readme = "README.md"
10
  requires-python = ">=3.10"
11
  dependencies = [
12
- "fastapi>=0.104.0",
13
- "pydantic>=2.0.0",
14
- "uvicorn>=0.24.0",
15
- "openai>=1.0.0",
16
- "openenv-core>=0.2.0"
17
  ]
18
 
19
  [project.scripts]
20
- # This tells the validator how to run your environment
21
- server = "main:main"
22
 
23
  [tool.setuptools]
24
- # Since your files (env.py, models.py, main.py) are in the root
25
- py-modules = ["env", "models", "main"]
26
-
27
- [tool.setuptools.exclude-package-data]
28
- "*" = ["*.pyc", "__pycache__/*"]
 
1
  [build-system]
2
+ requires = ["setuptools>=61.0"]
3
  build-backend = "setuptools.build_meta"
4
 
5
  [project]
6
  name = "data-privacy-env"
7
  version = "1.0.0"
8
+ description = "PII Remediation Environment"
9
  readme = "README.md"
10
  requires-python = ">=3.10"
11
  dependencies = [
12
+ "fastapi",
13
+ "uvicorn",
14
+ "pydantic",
15
+ "openai",
16
+ "openenv-core"
17
  ]
18
 
19
  [project.scripts]
20
+ server = "server.app:main"
 
21
 
22
  [tool.setuptools]
23
+ packages = ["server"]
24
+ py-modules = ["env", "models"]
 
 
 
server/__init__.py ADDED
File without changes
main.py → server/app.py RENAMED
@@ -24,7 +24,7 @@ async def root():
24
  # 4. The 'main' function required by the pyproject.toml entry point
25
  # The validator calls this to spin up your environment programmatically
26
  def main():
27
- uvicorn.run("main:app", host="0.0.0.0", port=7860, reload=False)
28
 
29
  if __name__ == "__main__":
30
  main()
 
24
  # 4. The 'main' function required by the pyproject.toml entry point
25
  # The validator calls this to spin up your environment programmatically
26
  def main():
27
+ uvicorn.run("server.app:app", host="0.0.0.0", port=7860, reload=False)
28
 
29
  if __name__ == "__main__":
30
  main()