Fix new style config

This commit is contained in:
Tat Dat Duong
2025-04-11 00:04:44 +02:00
parent e0be9ae2ef
commit d06075cbcf
2 changed files with 7 additions and 2 deletions
+5 -1
View File
@@ -443,9 +443,13 @@ def _parse_node_version(version_str: str) -> int:
) from None
def _is_python_graph(spec: str) -> bool:
def _is_python_graph(spec: str | dict) -> bool:
"""Check if a graph is a Python graph based on the file extension."""
# handle new style config
if isinstance(spec, dict):
spec = spec.get("path")
file_path = spec.split(":")[0]
file_ext = os.path.splitext(file_path)[1]
return file_ext in [".py", ".pyx", ".pyd", ".pyi"]
+2 -1
View File
@@ -178,8 +178,9 @@ def test_dockerfile_command_basic() -> None:
"""Test the 'dockerfile' command with basic configuration."""
runner = CliRunner()
config_content = {
"node_version": "20", # Add any other necessary configuration fields
"python_version": "3.11",
"graphs": {"agent": "agent.py:graph"},
"dependencies": ["."],
}
with temporary_config_folder(config_content) as temp_dir: