steve-cli 0.3.18__tar.gz → 0.3.20__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.
Files changed (44) hide show
  1. {steve_cli-0.3.18 → steve_cli-0.3.20}/PKG-INFO +1 -1
  2. {steve_cli-0.3.18 → steve_cli-0.3.20}/pyproject.toml +1 -1
  3. {steve_cli-0.3.18 → steve_cli-0.3.20}/steve_cli/cli.py +12 -0
  4. {steve_cli-0.3.18 → steve_cli-0.3.20}/steve_cli/decorators/lineage_job.py +4 -1
  5. {steve_cli-0.3.18 → steve_cli-0.3.20}/steve_cli/lineage/collector.py +3 -1
  6. {steve_cli-0.3.18 → steve_cli-0.3.20}/steve_cli/lineage/storage.py +7 -1
  7. {steve_cli-0.3.18 → steve_cli-0.3.20}/steve_cli/storage/s3.py +1 -1
  8. {steve_cli-0.3.18 → steve_cli-0.3.20}/steve_cli.egg-info/PKG-INFO +1 -1
  9. {steve_cli-0.3.18 → steve_cli-0.3.20}/README.md +0 -0
  10. {steve_cli-0.3.18 → steve_cli-0.3.20}/setup.cfg +0 -0
  11. {steve_cli-0.3.18 → steve_cli-0.3.20}/steve_cli/__init__.py +0 -0
  12. {steve_cli-0.3.18 → steve_cli-0.3.20}/steve_cli/decorators/__init__.py +0 -0
  13. {steve_cli-0.3.18 → steve_cli-0.3.20}/steve_cli/lineage/__init__.py +0 -0
  14. {steve_cli-0.3.18 → steve_cli-0.3.20}/steve_cli/lineage/adapters/__init__.py +0 -0
  15. {steve_cli-0.3.18 → steve_cli-0.3.20}/steve_cli/lineage/adapters/logging.py +0 -0
  16. {steve_cli-0.3.18 → steve_cli-0.3.20}/steve_cli/lineage/adapters/null.py +0 -0
  17. {steve_cli-0.3.18 → steve_cli-0.3.20}/steve_cli/lineage/adapters/openlineage.py +0 -0
  18. {steve_cli-0.3.18 → steve_cli-0.3.20}/steve_cli/lineage/port.py +0 -0
  19. {steve_cli-0.3.18 → steve_cli-0.3.20}/steve_cli/lineage/registry.py +0 -0
  20. {steve_cli-0.3.18 → steve_cli-0.3.20}/steve_cli/storage/__init__.py +0 -0
  21. {steve_cli-0.3.18 → steve_cli-0.3.20}/steve_cli/storage/metadata/__init__.py +0 -0
  22. {steve_cli-0.3.18 → steve_cli-0.3.20}/steve_cli/storage/metadata/extractors/__init__.py +0 -0
  23. {steve_cli-0.3.18 → steve_cli-0.3.20}/steve_cli/storage/metadata/extractors/csv.py +0 -0
  24. {steve_cli-0.3.18 → steve_cli-0.3.20}/steve_cli/storage/metadata/extractors/excel.py +0 -0
  25. {steve_cli-0.3.18 → steve_cli-0.3.20}/steve_cli/storage/metadata/extractors/generic.py +0 -0
  26. {steve_cli-0.3.18 → steve_cli-0.3.20}/steve_cli/storage/metadata/extractors/json.py +0 -0
  27. {steve_cli-0.3.18 → steve_cli-0.3.20}/steve_cli/storage/metadata/extractors/parquet.py +0 -0
  28. {steve_cli-0.3.18 → steve_cli-0.3.20}/steve_cli/storage/metadata/port.py +0 -0
  29. {steve_cli-0.3.18 → steve_cli-0.3.20}/steve_cli/storage/metadata/registry.py +0 -0
  30. {steve_cli-0.3.18 → steve_cli-0.3.20}/steve_cli/storage/parquet.py +0 -0
  31. {steve_cli-0.3.18 → steve_cli-0.3.20}/steve_cli/storage/protocol.py +0 -0
  32. {steve_cli-0.3.18 → steve_cli-0.3.20}/steve_cli/storage.py +0 -0
  33. {steve_cli-0.3.18 → steve_cli-0.3.20}/steve_cli/validation/__init__.py +0 -0
  34. {steve_cli-0.3.18 → steve_cli-0.3.20}/steve_cli/validation/adapters/__init__.py +0 -0
  35. {steve_cli-0.3.18 → steve_cli-0.3.20}/steve_cli/validation/adapters/great_expectations.py +0 -0
  36. {steve_cli-0.3.18 → steve_cli-0.3.20}/steve_cli/validation/adapters/null.py +0 -0
  37. {steve_cli-0.3.18 → steve_cli-0.3.20}/steve_cli/validation/adapters/validoopsie.py +0 -0
  38. {steve_cli-0.3.18 → steve_cli-0.3.20}/steve_cli/validation/port.py +0 -0
  39. {steve_cli-0.3.18 → steve_cli-0.3.20}/steve_cli/validation/registry.py +0 -0
  40. {steve_cli-0.3.18 → steve_cli-0.3.20}/steve_cli.egg-info/SOURCES.txt +0 -0
  41. {steve_cli-0.3.18 → steve_cli-0.3.20}/steve_cli.egg-info/dependency_links.txt +0 -0
  42. {steve_cli-0.3.18 → steve_cli-0.3.20}/steve_cli.egg-info/entry_points.txt +0 -0
  43. {steve_cli-0.3.18 → steve_cli-0.3.20}/steve_cli.egg-info/requires.txt +0 -0
  44. {steve_cli-0.3.18 → steve_cli-0.3.20}/steve_cli.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: steve-cli
3
- Version: 0.3.18
3
+ Version: 0.3.20
4
4
  Summary: A simple CLI tool to run jobs from jobs.yaml with proper environment setup
5
5
  Author: Frank
6
6
  License: MIT
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
5
5
 
6
6
  [project]
7
7
  name = "steve-cli"
8
- version = "0.3.18"
8
+ version = "0.3.20"
9
9
  description = "A simple CLI tool to run jobs from jobs.yaml with proper environment setup"
10
10
  readme = "README.md"
11
11
  license = {text = "MIT"}
@@ -781,5 +781,17 @@ def buckets(env_file: tuple):
781
781
  click.secho(f"❌ Could not open file: {e}", fg="red", err=True)
782
782
 
783
783
 
784
+ @main.command("upgrade")
785
+ def upgrade():
786
+ """Upgrade steve-cli to the latest version."""
787
+ click.echo(f"⬆️ Upgrading {click.style('steve-cli', fg='blue', bold=True)}...")
788
+ result = subprocess.run(
789
+ ["uv", "add", "steve-cli", "--upgrade-package", "steve-cli"],
790
+ env=os.environ.copy(),
791
+ check=False,
792
+ )
793
+ sys.exit(result.returncode)
794
+
795
+
784
796
  if __name__ == '__main__':
785
797
  main()
@@ -40,10 +40,13 @@ def lineage_job(
40
40
  session.start()
41
41
 
42
42
  def get_storage(tier: str = "bronze", workspace: str | None = None) -> LineageStorage:
43
- return LineageStorage(
43
+ ls = LineageStorage(
44
44
  storage=lambda: S3Storage(tier=tier, workspace=workspace),
45
45
  session=session,
46
46
  )
47
+ if session.namespace in ("default", "unknown") and ls._dataset_namespace:
48
+ session.namespace = ls._dataset_namespace
49
+ return ls
47
50
 
48
51
  try:
49
52
  result = fn(*args, get_storage=get_storage, **kwargs)
@@ -91,7 +91,9 @@ def make_session(
91
91
  if prov == "openlineage" and not url:
92
92
  import logging
93
93
  logging.getLogger(__name__).warning(
94
- "Lineage disabled: OPENLINEAGE_URL is not set"
94
+ "Lineage disabled: OPENLINEAGE_URL is not set. "
95
+ "To enable lineage tracking, set OPENLINEAGE_URL "
96
+ "(e.g. http://localhost:5000/api/v1/lineage)."
95
97
  )
96
98
  from .adapters.null import NullLineageAdapter
97
99
 
@@ -1,6 +1,7 @@
1
1
  from __future__ import annotations
2
2
 
3
3
  import logging
4
+ import re
4
5
  from io import BytesIO
5
6
  from typing import Any, Callable, List, Union
6
7
 
@@ -8,6 +9,10 @@ from steve_cli.storage.protocol import Storage
8
9
 
9
10
  GetStorage = Callable[..., "LineageStorage"]
10
11
 
12
+
13
+ def strip_medallion_postfix(name: str) -> str:
14
+ return re.sub(r'[-_](bronze|silver|gold)$', '', name, flags=re.IGNORECASE)
15
+
11
16
  logger = logging.getLogger(__name__)
12
17
 
13
18
 
@@ -62,7 +67,8 @@ class LineageStorage:
62
67
  def _dataset_namespace(self) -> str | None:
63
68
  s = self._storage
64
69
  if hasattr(s, 'endpoint') and hasattr(s, 'bucket'):
65
- return f"{s.endpoint.rstrip('/')}/{s.bucket}"
70
+ name = strip_medallion_postfix(s.bucket)
71
+ return f"{s.endpoint.rstrip('/')}/{name}"
66
72
  return None
67
73
 
68
74
  def put_file(self, local_path: str, path: str) -> None:
@@ -83,7 +83,7 @@ class S3Storage:
83
83
  elif code == "NoSuchBucket":
84
84
  logger.error("Bucket not found: %s", self.bucket)
85
85
  elif code == "NoSuchKey":
86
- logger.error("File not found: %s while %s on BUCKET=%s", path, operation, self.bucket)
86
+ logger.warning("File not found: %s while %s on BUCKET=%s", path, operation, self.bucket)
87
87
  else:
88
88
  logger.error("Storage error during %s: %s (BUCKET=%s)", operation, error, self.bucket)
89
89
  raise EnvironmentError(f"S3 {operation} failed for {path}: {error.response['Error']['Code']}")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: steve-cli
3
- Version: 0.3.18
3
+ Version: 0.3.20
4
4
  Summary: A simple CLI tool to run jobs from jobs.yaml with proper environment setup
5
5
  Author: Frank
6
6
  License: MIT
File without changes
File without changes