steve-cli 1.1.3__tar.gz → 1.1.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {steve_cli-1.1.3 → steve_cli-1.1.4}/PKG-INFO +1 -1
- {steve_cli-1.1.3 → steve_cli-1.1.4}/pyproject.toml +1 -1
- {steve_cli-1.1.3 → steve_cli-1.1.4}/steve_cli/cli.py +23 -8
- {steve_cli-1.1.3 → steve_cli-1.1.4}/steve_cli/policies/client.py +10 -7
- {steve_cli-1.1.3 → steve_cli-1.1.4}/steve_cli/storage/trino.py +6 -0
- {steve_cli-1.1.3 → steve_cli-1.1.4}/steve_cli.egg-info/PKG-INFO +1 -1
- {steve_cli-1.1.3 → steve_cli-1.1.4}/README.md +0 -0
- {steve_cli-1.1.3 → steve_cli-1.1.4}/setup.cfg +0 -0
- {steve_cli-1.1.3 → steve_cli-1.1.4}/steve_cli/__init__.py +0 -0
- {steve_cli-1.1.3 → steve_cli-1.1.4}/steve_cli/auth.py +0 -0
- {steve_cli-1.1.3 → steve_cli-1.1.4}/steve_cli/decorators/__init__.py +0 -0
- {steve_cli-1.1.3 → steve_cli-1.1.4}/steve_cli/decorators/lineage_job.py +0 -0
- {steve_cli-1.1.3 → steve_cli-1.1.4}/steve_cli/lineage/__init__.py +0 -0
- {steve_cli-1.1.3 → steve_cli-1.1.4}/steve_cli/lineage/adapters/__init__.py +0 -0
- {steve_cli-1.1.3 → steve_cli-1.1.4}/steve_cli/lineage/adapters/composite.py +0 -0
- {steve_cli-1.1.3 → steve_cli-1.1.4}/steve_cli/lineage/adapters/dataproductregistry.py +0 -0
- {steve_cli-1.1.3 → steve_cli-1.1.4}/steve_cli/lineage/adapters/logging.py +0 -0
- {steve_cli-1.1.3 → steve_cli-1.1.4}/steve_cli/lineage/adapters/null.py +0 -0
- {steve_cli-1.1.3 → steve_cli-1.1.4}/steve_cli/lineage/adapters/openlineage.py +0 -0
- {steve_cli-1.1.3 → steve_cli-1.1.4}/steve_cli/lineage/collector.py +0 -0
- {steve_cli-1.1.3 → steve_cli-1.1.4}/steve_cli/lineage/port.py +0 -0
- {steve_cli-1.1.3 → steve_cli-1.1.4}/steve_cli/lineage/registry.py +0 -0
- {steve_cli-1.1.3 → steve_cli-1.1.4}/steve_cli/lineage/storage.py +0 -0
- {steve_cli-1.1.3 → steve_cli-1.1.4}/steve_cli/ontology.py +0 -0
- {steve_cli-1.1.3 → steve_cli-1.1.4}/steve_cli/policies/__init__.py +0 -0
- {steve_cli-1.1.3 → steve_cli-1.1.4}/steve_cli/storage/__init__.py +0 -0
- {steve_cli-1.1.3 → steve_cli-1.1.4}/steve_cli/storage/branch.py +0 -0
- {steve_cli-1.1.3 → steve_cli-1.1.4}/steve_cli/storage/lakekeeper.py +0 -0
- {steve_cli-1.1.3 → steve_cli-1.1.4}/steve_cli/storage/metadata/__init__.py +0 -0
- {steve_cli-1.1.3 → steve_cli-1.1.4}/steve_cli/storage/metadata/extractors/__init__.py +0 -0
- {steve_cli-1.1.3 → steve_cli-1.1.4}/steve_cli/storage/metadata/extractors/csv.py +0 -0
- {steve_cli-1.1.3 → steve_cli-1.1.4}/steve_cli/storage/metadata/extractors/excel.py +0 -0
- {steve_cli-1.1.3 → steve_cli-1.1.4}/steve_cli/storage/metadata/extractors/generic.py +0 -0
- {steve_cli-1.1.3 → steve_cli-1.1.4}/steve_cli/storage/metadata/extractors/json.py +0 -0
- {steve_cli-1.1.3 → steve_cli-1.1.4}/steve_cli/storage/metadata/extractors/parquet.py +0 -0
- {steve_cli-1.1.3 → steve_cli-1.1.4}/steve_cli/storage/metadata/port.py +0 -0
- {steve_cli-1.1.3 → steve_cli-1.1.4}/steve_cli/storage/metadata/registry.py +0 -0
- {steve_cli-1.1.3 → steve_cli-1.1.4}/steve_cli/storage/parquet.py +0 -0
- {steve_cli-1.1.3 → steve_cli-1.1.4}/steve_cli/storage/protocol.py +0 -0
- {steve_cli-1.1.3 → steve_cli-1.1.4}/steve_cli/storage/s3.py +0 -0
- {steve_cli-1.1.3 → steve_cli-1.1.4}/steve_cli/storage.py +0 -0
- {steve_cli-1.1.3 → steve_cli-1.1.4}/steve_cli/validation/__init__.py +0 -0
- {steve_cli-1.1.3 → steve_cli-1.1.4}/steve_cli/validation/adapters/__init__.py +0 -0
- {steve_cli-1.1.3 → steve_cli-1.1.4}/steve_cli/validation/adapters/great_expectations.py +0 -0
- {steve_cli-1.1.3 → steve_cli-1.1.4}/steve_cli/validation/adapters/null.py +0 -0
- {steve_cli-1.1.3 → steve_cli-1.1.4}/steve_cli/validation/adapters/validoopsie.py +0 -0
- {steve_cli-1.1.3 → steve_cli-1.1.4}/steve_cli/validation/port.py +0 -0
- {steve_cli-1.1.3 → steve_cli-1.1.4}/steve_cli/validation/registry.py +0 -0
- {steve_cli-1.1.3 → steve_cli-1.1.4}/steve_cli/vkg.py +0 -0
- {steve_cli-1.1.3 → steve_cli-1.1.4}/steve_cli.egg-info/SOURCES.txt +0 -0
- {steve_cli-1.1.3 → steve_cli-1.1.4}/steve_cli.egg-info/dependency_links.txt +0 -0
- {steve_cli-1.1.3 → steve_cli-1.1.4}/steve_cli.egg-info/entry_points.txt +0 -0
- {steve_cli-1.1.3 → steve_cli-1.1.4}/steve_cli.egg-info/requires.txt +0 -0
- {steve_cli-1.1.3 → steve_cli-1.1.4}/steve_cli.egg-info/top_level.txt +0 -0
|
@@ -59,8 +59,24 @@ class JobsConfig:
|
|
|
59
59
|
return job
|
|
60
60
|
return None
|
|
61
61
|
|
|
62
|
-
def
|
|
63
|
-
|
|
62
|
+
def _job_depths(self) -> dict[str, int]:
|
|
63
|
+
depths: dict[str, int] = {}
|
|
64
|
+
for job in self.jobs:
|
|
65
|
+
name = job.get("name", "")
|
|
66
|
+
parents = job.get("dependsOn", [])
|
|
67
|
+
depths[name] = max((depths.get(p, 0) for p in parents), default=-1) + 1
|
|
68
|
+
return depths
|
|
69
|
+
|
|
70
|
+
def list_jobs(self) -> List[questionary.Choice]:
|
|
71
|
+
depths = self._job_depths()
|
|
72
|
+
choices = []
|
|
73
|
+
for job in self.jobs:
|
|
74
|
+
name = job.get("name", "unnamed")
|
|
75
|
+
depth = depths.get(name, 0)
|
|
76
|
+
indent = " " * depth
|
|
77
|
+
prefix = "└─ " if depth > 0 else ""
|
|
78
|
+
choices.append(questionary.Choice(title=f"{indent}{prefix}{name}", value=name))
|
|
79
|
+
return choices
|
|
64
80
|
|
|
65
81
|
|
|
66
82
|
def run_job_command(job: Dict[str, Any]) -> int:
|
|
@@ -120,13 +136,13 @@ def jobs(ctx: click.Context, jobs_file: Optional[Path]):
|
|
|
120
136
|
if ctx.invoked_subcommand is not None:
|
|
121
137
|
return
|
|
122
138
|
config = JobsConfig(jobs_file)
|
|
123
|
-
|
|
124
|
-
if not
|
|
139
|
+
choices = config.list_jobs()
|
|
140
|
+
if not choices:
|
|
125
141
|
click.echo("❌ No jobs found in jobs.yaml")
|
|
126
142
|
return
|
|
127
143
|
choice = questionary.select(
|
|
128
144
|
"Select a job to run:",
|
|
129
|
-
choices=
|
|
145
|
+
choices=choices,
|
|
130
146
|
).ask()
|
|
131
147
|
if choice is None:
|
|
132
148
|
sys.exit(0)
|
|
@@ -140,9 +156,8 @@ def jobs(ctx: click.Context, jobs_file: Optional[Path]):
|
|
|
140
156
|
def jobs_list(jobs_file: Optional[Path]):
|
|
141
157
|
"""List all available jobs."""
|
|
142
158
|
config = JobsConfig(jobs_file)
|
|
143
|
-
job_names = config.list_jobs()
|
|
144
159
|
|
|
145
|
-
if not
|
|
160
|
+
if not config.jobs:
|
|
146
161
|
click.echo("❌ No jobs found in jobs.yaml")
|
|
147
162
|
return
|
|
148
163
|
|
|
@@ -951,7 +966,7 @@ def policies_apply(file: Path | None, validate: str | None):
|
|
|
951
966
|
policies_file = Path(file) if file else None
|
|
952
967
|
try:
|
|
953
968
|
branch, sanitized = PolicyClient().apply_from_file(policies_file, validate=validate)
|
|
954
|
-
click.secho(f"Branch: {branch} → schema
|
|
969
|
+
click.secho(f"Branch: {branch} → schema: {sanitized}", fg="cyan")
|
|
955
970
|
click.secho("Policies applied successfully.", fg="green")
|
|
956
971
|
except FileNotFoundError as e:
|
|
957
972
|
click.secho(str(e), fg="red", err=True)
|
|
@@ -33,6 +33,9 @@ def _expand_rules(rules: list[dict[str, Any]], sanitized_branch: str, workspace:
|
|
|
33
33
|
for entry in rule.get("columns", []):
|
|
34
34
|
if "schema" in entry:
|
|
35
35
|
entry["schema"] = _expand_schema(entry["schema"], sanitized_branch)
|
|
36
|
+
if workspace and "catalogs" not in entry:
|
|
37
|
+
tier = entry.get("tier", "bronze")
|
|
38
|
+
entry["catalogs"] = [f"{workspace}-{tier}"]
|
|
36
39
|
expanded.append(rule)
|
|
37
40
|
return expanded
|
|
38
41
|
|
|
@@ -122,20 +125,20 @@ class PolicyClient:
|
|
|
122
125
|
workspace_id = os.environ.get("WORKSPACE_ID")
|
|
123
126
|
workspace_name = os.environ.get("WORKSPACE_NAME", "")
|
|
124
127
|
|
|
125
|
-
seen: dict[str, list[str]] = {}
|
|
128
|
+
seen: dict[tuple[str, str], list[str]] = {} # (schema, tier) → tables
|
|
126
129
|
for rule in rules:
|
|
127
130
|
for entry in list(rule.get("tables", [])) + list(rule.get("columns", [])):
|
|
128
131
|
schema = entry.get("schema", "")
|
|
129
132
|
table = entry.get("table", "")
|
|
133
|
+
tier = entry.get("tier", "bronze")
|
|
130
134
|
if schema and table:
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
135
|
+
key = (schema, tier)
|
|
136
|
+
seen.setdefault(key, [])
|
|
137
|
+
if table not in seen[key]:
|
|
138
|
+
seen[key].append(table)
|
|
134
139
|
|
|
135
140
|
results: list[str] = []
|
|
136
|
-
for schema, tables in seen.items():
|
|
137
|
-
tier = "bronze"
|
|
138
|
-
ws_clean = workspace_name.lower().replace("-", "_") if workspace_name else ""
|
|
141
|
+
for (schema, tier), tables in seen.items():
|
|
139
142
|
catalog = f"{workspace_name}-{tier}" if workspace_name else f"minio-{tier}"
|
|
140
143
|
|
|
141
144
|
try:
|
|
@@ -213,6 +213,12 @@ class TrinoStorage:
|
|
|
213
213
|
rows: list[dict] = []
|
|
214
214
|
poll = 0
|
|
215
215
|
while True:
|
|
216
|
+
if data.get("error"):
|
|
217
|
+
err = data["error"]
|
|
218
|
+
raise OSError(
|
|
219
|
+
f"TrinoStorage: Trino query failed — {err.get('message', err)} "
|
|
220
|
+
f"(type={err.get('errorType')}, code={err.get('errorCode')}, sql: {sql[:120]!r})"
|
|
221
|
+
)
|
|
216
222
|
if "data" in data and "columns" in data:
|
|
217
223
|
col_names = [c["name"] for c in data["columns"]]
|
|
218
224
|
for row in data["data"]:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|