steve-cli 0.5.3__tar.gz → 0.5.5__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-0.5.3 → steve_cli-0.5.5}/PKG-INFO +1 -1
- {steve_cli-0.5.3 → steve_cli-0.5.5}/pyproject.toml +1 -1
- {steve_cli-0.5.3 → steve_cli-0.5.5}/steve_cli/auth.py +0 -4
- {steve_cli-0.5.3 → steve_cli-0.5.5}/steve_cli/policies/client.py +3 -16
- {steve_cli-0.5.3 → steve_cli-0.5.5}/steve_cli/storage/trino.py +10 -1
- {steve_cli-0.5.3 → steve_cli-0.5.5}/steve_cli.egg-info/PKG-INFO +1 -1
- {steve_cli-0.5.3 → steve_cli-0.5.5}/README.md +0 -0
- {steve_cli-0.5.3 → steve_cli-0.5.5}/setup.cfg +0 -0
- {steve_cli-0.5.3 → steve_cli-0.5.5}/steve_cli/__init__.py +0 -0
- {steve_cli-0.5.3 → steve_cli-0.5.5}/steve_cli/cli.py +0 -0
- {steve_cli-0.5.3 → steve_cli-0.5.5}/steve_cli/decorators/__init__.py +0 -0
- {steve_cli-0.5.3 → steve_cli-0.5.5}/steve_cli/decorators/lineage_job.py +0 -0
- {steve_cli-0.5.3 → steve_cli-0.5.5}/steve_cli/lineage/__init__.py +0 -0
- {steve_cli-0.5.3 → steve_cli-0.5.5}/steve_cli/lineage/adapters/__init__.py +0 -0
- {steve_cli-0.5.3 → steve_cli-0.5.5}/steve_cli/lineage/adapters/composite.py +0 -0
- {steve_cli-0.5.3 → steve_cli-0.5.5}/steve_cli/lineage/adapters/dataproductregistry.py +0 -0
- {steve_cli-0.5.3 → steve_cli-0.5.5}/steve_cli/lineage/adapters/logging.py +0 -0
- {steve_cli-0.5.3 → steve_cli-0.5.5}/steve_cli/lineage/adapters/null.py +0 -0
- {steve_cli-0.5.3 → steve_cli-0.5.5}/steve_cli/lineage/adapters/openlineage.py +0 -0
- {steve_cli-0.5.3 → steve_cli-0.5.5}/steve_cli/lineage/collector.py +0 -0
- {steve_cli-0.5.3 → steve_cli-0.5.5}/steve_cli/lineage/port.py +0 -0
- {steve_cli-0.5.3 → steve_cli-0.5.5}/steve_cli/lineage/registry.py +0 -0
- {steve_cli-0.5.3 → steve_cli-0.5.5}/steve_cli/lineage/storage.py +0 -0
- {steve_cli-0.5.3 → steve_cli-0.5.5}/steve_cli/ontology.py +0 -0
- {steve_cli-0.5.3 → steve_cli-0.5.5}/steve_cli/policies/__init__.py +0 -0
- {steve_cli-0.5.3 → steve_cli-0.5.5}/steve_cli/storage/__init__.py +0 -0
- {steve_cli-0.5.3 → steve_cli-0.5.5}/steve_cli/storage/metadata/__init__.py +0 -0
- {steve_cli-0.5.3 → steve_cli-0.5.5}/steve_cli/storage/metadata/extractors/__init__.py +0 -0
- {steve_cli-0.5.3 → steve_cli-0.5.5}/steve_cli/storage/metadata/extractors/csv.py +0 -0
- {steve_cli-0.5.3 → steve_cli-0.5.5}/steve_cli/storage/metadata/extractors/excel.py +0 -0
- {steve_cli-0.5.3 → steve_cli-0.5.5}/steve_cli/storage/metadata/extractors/generic.py +0 -0
- {steve_cli-0.5.3 → steve_cli-0.5.5}/steve_cli/storage/metadata/extractors/json.py +0 -0
- {steve_cli-0.5.3 → steve_cli-0.5.5}/steve_cli/storage/metadata/extractors/parquet.py +0 -0
- {steve_cli-0.5.3 → steve_cli-0.5.5}/steve_cli/storage/metadata/port.py +0 -0
- {steve_cli-0.5.3 → steve_cli-0.5.5}/steve_cli/storage/metadata/registry.py +0 -0
- {steve_cli-0.5.3 → steve_cli-0.5.5}/steve_cli/storage/parquet.py +0 -0
- {steve_cli-0.5.3 → steve_cli-0.5.5}/steve_cli/storage/protocol.py +0 -0
- {steve_cli-0.5.3 → steve_cli-0.5.5}/steve_cli/storage/s3.py +0 -0
- {steve_cli-0.5.3 → steve_cli-0.5.5}/steve_cli/storage.py +0 -0
- {steve_cli-0.5.3 → steve_cli-0.5.5}/steve_cli/validation/__init__.py +0 -0
- {steve_cli-0.5.3 → steve_cli-0.5.5}/steve_cli/validation/adapters/__init__.py +0 -0
- {steve_cli-0.5.3 → steve_cli-0.5.5}/steve_cli/validation/adapters/great_expectations.py +0 -0
- {steve_cli-0.5.3 → steve_cli-0.5.5}/steve_cli/validation/adapters/null.py +0 -0
- {steve_cli-0.5.3 → steve_cli-0.5.5}/steve_cli/validation/adapters/validoopsie.py +0 -0
- {steve_cli-0.5.3 → steve_cli-0.5.5}/steve_cli/validation/port.py +0 -0
- {steve_cli-0.5.3 → steve_cli-0.5.5}/steve_cli/validation/registry.py +0 -0
- {steve_cli-0.5.3 → steve_cli-0.5.5}/steve_cli/vkg.py +0 -0
- {steve_cli-0.5.3 → steve_cli-0.5.5}/steve_cli.egg-info/SOURCES.txt +0 -0
- {steve_cli-0.5.3 → steve_cli-0.5.5}/steve_cli.egg-info/dependency_links.txt +0 -0
- {steve_cli-0.5.3 → steve_cli-0.5.5}/steve_cli.egg-info/entry_points.txt +0 -0
- {steve_cli-0.5.3 → steve_cli-0.5.5}/steve_cli.egg-info/requires.txt +0 -0
- {steve_cli-0.5.3 → steve_cli-0.5.5}/steve_cli.egg-info/top_level.txt +0 -0
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
3
|
import json
|
|
4
|
-
import os
|
|
5
4
|
from pathlib import Path
|
|
6
5
|
from typing import Optional
|
|
7
6
|
|
|
@@ -61,9 +60,6 @@ def _get_workspace_entry(workspace_id: Optional[str]) -> dict:
|
|
|
61
60
|
|
|
62
61
|
|
|
63
62
|
def get_token(workspace_id: Optional[str] = None) -> Optional[str]:
|
|
64
|
-
env_token = os.getenv("STEVE_TOKEN")
|
|
65
|
-
if env_token:
|
|
66
|
-
return env_token
|
|
67
63
|
return _get_workspace_entry(workspace_id).get("token")
|
|
68
64
|
|
|
69
65
|
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
3
|
import json
|
|
4
|
-
import os
|
|
5
4
|
from pathlib import Path
|
|
6
5
|
from typing import Any
|
|
7
6
|
|
|
@@ -18,22 +17,10 @@ class PolicyClient:
|
|
|
18
17
|
workspace_id: str | None = None,
|
|
19
18
|
):
|
|
20
19
|
from steve_cli.auth import get_service_url, get_token
|
|
21
|
-
resolved_via_proxy = False
|
|
22
20
|
if endpoint is None:
|
|
23
|
-
|
|
24
|
-
endpoint = (
|
|
25
|
-
os.environ.get("PCP_ENDPOINT")
|
|
26
|
-
or pcp_url
|
|
27
|
-
or "http://policy-control-plane:3010"
|
|
28
|
-
)
|
|
29
|
-
resolved_via_proxy = bool(pcp_url and not os.environ.get("PCP_ENDPOINT"))
|
|
21
|
+
endpoint = get_service_url("pcp", workspace_id) or "http://policy-control-plane:3010"
|
|
30
22
|
self.endpoint = endpoint.rstrip("/")
|
|
31
|
-
|
|
32
|
-
self.token = token
|
|
33
|
-
elif resolved_via_proxy:
|
|
34
|
-
self.token = get_token(workspace_id) or os.environ.get("PCP_TOKEN", "")
|
|
35
|
-
else:
|
|
36
|
-
self.token = os.environ.get("PCP_TOKEN", "")
|
|
23
|
+
self.token = token or get_token(workspace_id) or ""
|
|
37
24
|
|
|
38
25
|
def __trpc(self, method: str, path: str, payload: dict | None = None) -> dict:
|
|
39
26
|
url = f"{self.endpoint}/api/trpc/{path}"
|
|
@@ -55,7 +42,7 @@ class PolicyClient:
|
|
|
55
42
|
except httpx.ConnectError as e:
|
|
56
43
|
raise EnvironmentError(
|
|
57
44
|
f"Cannot reach Policy Control Plane at {self.endpoint} — "
|
|
58
|
-
f"
|
|
45
|
+
f"run `steve login` to configure credentials"
|
|
59
46
|
) from e
|
|
60
47
|
|
|
61
48
|
def register_pdp(self, name: str, endpoint: str, pdp_type: str = "opa", is_default: bool = True) -> dict:
|
|
@@ -26,7 +26,16 @@ class TrinoStorage:
|
|
|
26
26
|
self._workspace_id = os.getenv("WORKSPACE_ID")
|
|
27
27
|
trino_endpoint = get_service_url("trino", self._workspace_id)
|
|
28
28
|
if not trino_endpoint:
|
|
29
|
-
|
|
29
|
+
from steve_cli.auth import _get_workspace_entry
|
|
30
|
+
entry = _get_workspace_entry(self._workspace_id)
|
|
31
|
+
checks = [
|
|
32
|
+
("✓" if entry else "✗", "credentials found in ~/.steve/credentials.json"),
|
|
33
|
+
("✓" if entry.get("token") else "✗", "token present"),
|
|
34
|
+
("✓" if entry.get("base_url") else "✗", "base_url present (STEVE_BASE_URL configured on automation-kernel)"),
|
|
35
|
+
("✓" if self._workspace_id else "✗", f"WORKSPACE_ID env var set (got: {self._workspace_id!r})"),
|
|
36
|
+
]
|
|
37
|
+
detail = "\n".join(f" {mark} {desc}" for mark, desc in checks)
|
|
38
|
+
raise EnvironmentError(f"Trino endpoint not found:\n{detail}")
|
|
30
39
|
self.catalog = os.getenv("TRINO_CATALOG", "minio")
|
|
31
40
|
resolved_workspace = workspace or os.getenv("WORKSPACE_NAME")
|
|
32
41
|
self.schema = _derive_schema(tier, resolved_workspace) or os.environ.get("TRINO_SCHEMA", "")
|
|
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
|