Skip to content

Commit 2ae5fb0

Browse files
committed
build process with context detection
1 parent bcd9186 commit 2ae5fb0

File tree

5 files changed

+280
-69
lines changed

5 files changed

+280
-69
lines changed

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ dependencies = [
2121
"rich>=13.0.0",
2222
"pyyaml>=6.0",
2323
"huggingface_hub>=0.20.0",
24+
"tomli>=2.3.0",
25+
"tomli-w>=1.2.0",
2426
]
2527

2628
[project.scripts]

src/openenv_cli/_validation.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,10 @@ def validate_multi_mode_deployment(env_path: Path) -> tuple[bool, list[str]]:
8383

8484
# Check required dependencies
8585
deps = pyproject.get("project", {}).get("dependencies", [])
86-
required_deps = ["fastapi", "uvicorn", "pydantic", "requests"]
86+
required_deps = ["openenv-core", "fastapi", "uvicorn", "pydantic", "requests"]
8787
missing_deps = []
8888
for required in required_deps:
89-
if not any(required in dep for dep in deps):
89+
if not any(required in dep.lower() for dep in deps):
9090
missing_deps.append(required)
9191

9292
if missing_deps:
@@ -97,9 +97,9 @@ def validate_multi_mode_deployment(env_path: Path) -> tuple[bool, list[str]]:
9797
if not server_app.exists():
9898
issues.append("Missing server/app.py")
9999
else:
100-
# Check for main() function
100+
# Check for main() function (flexible - with or without parameters)
101101
app_content = server_app.read_text(encoding="utf-8")
102-
if "def main():" not in app_content:
102+
if "def main(" not in app_content:
103103
issues.append("server/app.py missing main() function")
104104

105105
# Check if main() is callable

0 commit comments

Comments
 (0)