Full source paths.
This commit is contained in:
@@ -161,7 +161,7 @@ def _summary_from_program(name: str, comp: ProgramSpec, root: Path) -> Component
|
||||
# Infer runner from source directory
|
||||
runner = None
|
||||
if source:
|
||||
source_dir = root / source
|
||||
source_dir = Path(source)
|
||||
if (source_dir / "pyproject.toml").exists():
|
||||
runner = "python"
|
||||
elif source_dir.is_file():
|
||||
@@ -316,7 +316,7 @@ def _program_from_spec(
|
||||
source = comp.source
|
||||
runner = None
|
||||
if source:
|
||||
source_dir = root / source
|
||||
source_dir = Path(source)
|
||||
if (source_dir / "pyproject.toml").exists():
|
||||
runner = "python"
|
||||
elif source_dir.is_file():
|
||||
|
||||
@@ -30,8 +30,8 @@ def _tool_summary(
|
||||
# Infer runner from source directory
|
||||
runner = None
|
||||
source = comp.source
|
||||
if source and root:
|
||||
source_dir = root / source
|
||||
if source:
|
||||
source_dir = Path(source)
|
||||
if (source_dir / "pyproject.toml").exists():
|
||||
runner = "python"
|
||||
elif source_dir.is_file():
|
||||
|
||||
@@ -29,7 +29,7 @@ class TestToolsList:
|
||||
data = response.json()
|
||||
tool = next(t for t in data if t["id"] == "test-tool")
|
||||
assert tool["description"] == "Test tool"
|
||||
assert tool["source"] == "test-tool"
|
||||
assert tool["source"].endswith("/test-tool")
|
||||
assert tool["system_dependencies"] == ["pandoc"]
|
||||
|
||||
def test_installed_flag(self, client: TestClient) -> None:
|
||||
@@ -57,7 +57,7 @@ class TestToolDetail:
|
||||
assert response.status_code == 200
|
||||
data = response.json()
|
||||
assert data["id"] == "test-tool"
|
||||
assert data["source"] == "test-tool"
|
||||
assert data["source"].endswith("/test-tool")
|
||||
assert data["system_dependencies"] == ["pandoc"]
|
||||
|
||||
def test_no_docs(self, client: TestClient) -> None:
|
||||
|
||||
Reference in New Issue
Block a user