Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/tangle-cli/src/tangle_cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
try:
__version__ = metadata_version("tangle-cli")
except PackageNotFoundError:
__version__ = "0.1.8"
__version__ = "0.1.9"

__all__ = ["TangleDynamicDiscoveryClient", "__version__"]
1 change: 1 addition & 0 deletions packages/tangle-cli/src/tangle_cli/pipeline_hydrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -1157,6 +1157,7 @@ def _resolve_by_name_with_filters(
search_names,
verbose=False,
published_by=publisher,
include_deprecated=bool(version_constraint),
)
if not candidates:
self.log.info(f" Resolve: no candidates for name={component_name}")
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "tangle-cli"
version = "0.1.8"
version = "0.1.9"
description = "CLI for Tangle, the open-source ML pipeline orchestration platform"
readme = "README.md"
authors = [
Expand Down
2 changes: 1 addition & 1 deletion tests/test_packaging.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ def test_tangle_cli_wheel_supports_expert_no_deps_import_path_without_tangle_api
requires_dist = [line for line in metadata.splitlines() if line.startswith("Requires-Dist: ")]
assert not any(name.startswith("tangle_api/") for name in names)
assert "tangle_cli/openapi/openapi.json" not in names
assert "Version: 0.1.8" in metadata
assert "Version: 0.1.9" in metadata
assert "Requires-Dist: tangle-api==0.1.1" in requires_dist
assert not any("extra == 'native'" in line for line in requires_dist)
assert "Provides-Extra: native" in metadata
Expand Down
41 changes: 41 additions & 0 deletions tests/test_pipelines_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -1410,6 +1410,47 @@ def get_component_spec(self, digest):
"components": ["Thing", "[Official] Thing"],
"verbose": False,
"published_by": "alice@example.com",
"include_deprecated": True,
}
]


def test_pipeline_hydrator_resolve_config_name_without_version_excludes_deprecated(
tmp_path: Path,
):
from tangle_cli.pipeline_hydrator import PipelineHydrator

calls = []

class FakeClient:
def find_existing_components(self, components, **kwargs):
calls.append({"components": components, **kwargs})
return [SimpleNamespace(digest="sha256:active", version="2.0")]

def get_component_spec(self, digest):
assert digest == "sha256:active"
return SimpleNamespace(
data={
"name": "Thing",
"metadata": {"annotations": {"version": "2.0"}},
"implementation": {"container": {"image": "active"}},
}
)

digest, spec = PipelineHydrator(client=FakeClient())._resolve_from_config(
{"name": "Thing"},
"Pipeline.task",
tmp_path,
)

assert digest == "sha256:active"
assert spec["implementation"]["container"]["image"] == "active"
assert calls == [
{
"components": ["Thing", "[Official] Thing"],
"verbose": False,
"published_by": None,
"include_deprecated": False,
}
]

Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading