Skip to content

Commit a862721

Browse files
committed
fix: address OSS packaging review findings
Assisted-By: devx/f5505a8e-b863-4860-8951-135c4c748c11
1 parent 90283a9 commit a862721

21 files changed

Lines changed: 192 additions & 161 deletions

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
# Require Alexey Volkov and Volv Grebennikov to review changes in this lab repo.
1+
# Require Alexey Volkov and Volv Grebennikov to review changes in this repository.
22
* @Ark-kun @Volv-G

.github/workflows/ci.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
push:
6+
7+
jobs:
8+
test:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Check out repository
13+
uses: actions/checkout@v4
14+
15+
- name: Set up Python
16+
uses: actions/setup-python@v5
17+
with:
18+
python-version: "3.12"
19+
20+
- name: Set up uv
21+
uses: astral-sh/setup-uv@v5
22+
with:
23+
enable-cache: true
24+
25+
- name: Check lockfile
26+
run: uv lock --check
27+
28+
- name: Check whitespace
29+
run: git diff --check
30+
31+
- name: Run tests
32+
run: uv run pytest

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# tangle-cli
22

3-
[WIP] Private experimental/lab CLI for Tangle, the open-source ML pipeline orchestration platform.
3+
CLI for Tangle, the open-source ML pipeline orchestration platform.
44

5-
This lab repo is used to iterate on the next CLI shape before promoting changes to the public OSS package. The CLI is built with [Cyclopts](https://cyclopts.readthedocs.io/) and is intentionally split into two command families:
5+
This repository contains the public Tangle CLI package. The CLI is built with [Cyclopts](https://cyclopts.readthedocs.io/) and is intentionally split into two command families:
66

77
- `tangle api ...` — pure OpenAPI wrappers around Tangle backend endpoints.
88
- `tangle sdk ...` — hand-written SDK, local, and compound commands that may call the API or may run entirely locally.
@@ -263,7 +263,7 @@ configs:
263263
name: Second component
264264
```
265265
266-
Batch `publish-all`, Slack notification flags, dbt generation, from-container generation, and backend-specific search-v2 workflows remain out of this OSS lab CLI slice.
266+
Batch `publish-all`, notification integrations, dbt generation, from-container generation, and backend-specific advanced search workflows remain out of this OSS CLI package.
267267

268268
### Pipelines and pipeline runs
269269

@@ -360,7 +360,7 @@ At runtime, more `tangle api ...` commands become available in two ways:
360360

361361
## Generated model extension pattern
362362

363-
Generated models use a private generated base plus a stable public subclass. For example, codegen emits this shape for a model with a handwritten extension:
363+
Generated models use a generated implementation base plus a stable public subclass. For example, codegen emits this shape for a model with a handwritten extension:
364364

365365
```python
366366
class _ComponentSpecGenerated(TangleGeneratedModel):

packages/tangle-cli/src/tangle_cli/artifacts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ class ArtifactManager(TangleCliHandler):
8585
"""Read-only artifact metadata manager.
8686
8787
Downstream packages can inject an already-authenticated client or a lazy
88-
``client_factory`` (for example, one that applies Shopify auth). The manager
88+
``client_factory`` (for example, one that applies provider auth). The manager
8989
keeps the same read-only constraints as the module-level helpers: it never
9090
downloads artifact contents, signs URLs, writes files, or mutates artifacts.
9191
"""

packages/tangle-cli/src/tangle_cli/component_from_func.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1616,8 +1616,7 @@ def build_component_dict(
16161616
command = pip_install + ["sh", "-ec", shell_bootstrap, python_source]
16171617

16181618
# Tangle's schema rejects ``description: null``, so fall back to a generic
1619-
# placeholder when the function has no docstring. See
1620-
# https://github.com/Shopify/discovery/issues/28703. Users can override by
1619+
# placeholder when the function has no docstring. Users can override by
16211620
# adding a docstring to the function (its first paragraph becomes the
16221621
# description — see ``extract_function_spec``).
16231622
description = spec.description or f"{spec.component_name} component"
@@ -1848,7 +1847,7 @@ def _path_annotation(path: Path) -> str:
18481847
# TaskEnv authoring-violation (§3.5): fail LOUD with the actionable
18491848
# guidance instead of swallowing it into a warning + False. A silent
18501849
# False would only resurface later as a confusing missing/broken
1851-
# component at hydrate or the real-Oasis run, defeating the
1850+
# component at hydrate or backend run time, defeating the
18521851
# "fail fast with a clear generator error" intent. Every OTHER failure
18531852
# keeps the conservative warn + return False behaviour below.
18541853
raise

packages/tangle-cli/src/tangle_cli/component_publisher.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
33
This module intentionally mirrors the generic publisher behavior from
44
``tangle-deploy`` while depending only on OSS ``tangle_cli`` primitives and the
5-
checked-in/generated static API client. Shopify-specific auth wrappers, Slack
5+
checked-in/generated static API client. Provider-specific auth wrappers,
66
notification plumbing, and a separate ``publish-all`` CLI are kept downstream.
77
"""
88

@@ -89,8 +89,8 @@ class ComponentPublishHook(Protocol):
8989
"""Extension hook for downstream publishers.
9090
9191
Downstream packages can implement one or more methods to observe publish
92-
batches (for example, to send Slack summaries) without OSS importing or
93-
knowing about those systems. Implementations that need richer metadata may
92+
batches (for example, to send notification summaries) without OSS importing
93+
or knowing about those systems. Implementations that need richer metadata may
9494
add ``context: ComponentPublishContext | None = None`` as a keyword
9595
parameter; hooks without that parameter continue to work.
9696
"""
@@ -143,10 +143,10 @@ def __init__(
143143
"""Initialize the ComponentPublisher.
144144
145145
Args mirror the generic ``tangle-deploy`` publisher shape, with
146-
Shopify/Slack-specific fields intentionally omitted. ``client_factory``
147-
is a downstream seam for lazily constructing a custom authenticated
148-
client; subclasses may also override :meth:`_get_client` for more
149-
control.
146+
provider-specific notification/auth fields intentionally omitted.
147+
``client_factory`` is a downstream seam for lazily constructing a custom
148+
authenticated client; subclasses may also override :meth:`_get_client`
149+
for more control.
150150
"""
151151

152152
super().__init__(

packages/tangle-cli/src/tangle_cli/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
API-contract dataclasses for the Tangle (Oasis) Cloud Pipelines API.
2+
API-contract dataclasses for the Tangle Cloud Pipelines API.
33
44
These dataclasses model the shapes of HTTP request/response bodies on the
55
Tangle API — ``PipelineRun``, ``ComponentSpec``, container state, artifacts,

packages/tangle-cli/src/tangle_cli/pipeline_hydrator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
This module is intentionally a close OSS port of
44
``tangle_deploy.pipeline_hydrator``. The generic reference-resolution code and
55
method names are preserved where possible so future upstream diffs are easy to
6-
compare. Shopify/Oasis-only infrastructure integrations are omitted, and
6+
compare. Provider-specific infrastructure integrations are omitted, and
77
Docker/from-container materialization paths raise explicit unsupported errors.
88
"""
99

packages/tangle-cli/src/tangle_cli/pipeline_run_details.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
"""Pipeline-run details and graph-state serialization helpers.
22
33
These helpers are native-free and keep provider-specific log enrichment out of
4-
OSS. Downstreams can call them with their authenticated API client and layer
5-
Observe/GCP/Slack output through ``PipelineRunHooks.fetch_logs`` or wrappers.
4+
OSS. Downstreams can call them with their authenticated API client and layer
5+
provider-specific log output through ``PipelineRunHooks.fetch_logs`` or wrappers.
66
"""
77

88
from __future__ import annotations

packages/tangle-cli/src/tangle_cli/pipeline_run_manager.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
33
This module ports the OSS-safe parts of tangle-deploy's runner/run details
44
commands while keeping downstream-specific behavior behind hooks. The default
5-
implementation uses only the public Tangle API and local files; Shopify/GCP,
6-
Slack, scheduler, mutex, run-as annotation defaults, and alternate log backends
7-
are intentionally extension points rather than OSS behavior.
5+
implementation uses only the public Tangle API and local files; cloud storage,
6+
notifications, scheduler, mutex, run-as annotation defaults, and alternate log
7+
backends are intentionally extension points rather than OSS behavior.
88
"""
99

1010
from __future__ import annotations
@@ -299,10 +299,10 @@ class PipelineWaitPoll:
299299
class PipelineRunHooks:
300300
"""Overridable seams for downstream tangle-deploy behavior.
301301
302-
Subclasses can override these methods to add Shopify auth wrappers, gs://
303-
loading, JOB_CONFIG time input, run-as annotations, mutex/schedule behavior,
304-
graceful shutdown, Slack notifications, Observe/GCP logs, or from-container
305-
runtime defaults without forking the generic pipeline-run manager.
302+
Subclasses can override these methods to add provider-specific auth wrappers,
303+
cloud-object loading, JOB_CONFIG time input, run-as annotations,
304+
mutex/schedule behavior, graceful shutdown, notifications, hosted logs, or
305+
from-container runtime defaults without forking the generic pipeline-run manager.
306306
"""
307307

308308
logger: Logger = field(default_factory=get_default_logger)

0 commit comments

Comments
 (0)