datasecops-cli 0.4.2__tar.gz → 0.4.3__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 (54) hide show
  1. {datasecops_cli-0.4.2 → datasecops_cli-0.4.3}/CHANGELOG.md +10 -0
  2. {datasecops_cli-0.4.2 → datasecops_cli-0.4.3}/PKG-INFO +1 -1
  3. {datasecops_cli-0.4.2 → datasecops_cli-0.4.3}/pyproject.toml +1 -1
  4. datasecops_cli-0.4.3/src/datasecops_cli/__init__.py +1 -0
  5. {datasecops_cli-0.4.2 → datasecops_cli-0.4.3}/src/datasecops_cli/menus/development.py +62 -1
  6. datasecops_cli-0.4.2/src/datasecops_cli/__init__.py +0 -1
  7. {datasecops_cli-0.4.2 → datasecops_cli-0.4.3}/.github/workflows/auto-tag.yml +0 -0
  8. {datasecops_cli-0.4.2 → datasecops_cli-0.4.3}/.github/workflows/publish-cli.yml +0 -0
  9. {datasecops_cli-0.4.2 → datasecops_cli-0.4.3}/.gitignore +0 -0
  10. {datasecops_cli-0.4.2 → datasecops_cli-0.4.3}/DEVELOPMENT.md +0 -0
  11. {datasecops_cli-0.4.2 → datasecops_cli-0.4.3}/LICENSE +0 -0
  12. {datasecops_cli-0.4.2 → datasecops_cli-0.4.3}/README.md +0 -0
  13. {datasecops_cli-0.4.2 → datasecops_cli-0.4.3}/docs/getting-started.md +0 -0
  14. {datasecops_cli-0.4.2 → datasecops_cli-0.4.3}/docs/legacy.md +0 -0
  15. {datasecops_cli-0.4.2 → datasecops_cli-0.4.3}/docs/legacy_plan_of_action.md +0 -0
  16. {datasecops_cli-0.4.2 → datasecops_cli-0.4.3}/docs/mcp-server.md +0 -0
  17. {datasecops_cli-0.4.2 → datasecops_cli-0.4.3}/mcp-servers.json +0 -0
  18. {datasecops_cli-0.4.2 → datasecops_cli-0.4.3}/setup.ps1 +0 -0
  19. {datasecops_cli-0.4.2 → datasecops_cli-0.4.3}/setup.sh +0 -0
  20. {datasecops_cli-0.4.2 → datasecops_cli-0.4.3}/src/datasecops_cli/config.py +0 -0
  21. {datasecops_cli-0.4.2 → datasecops_cli-0.4.3}/src/datasecops_cli/main.py +0 -0
  22. {datasecops_cli-0.4.2 → datasecops_cli-0.4.3}/src/datasecops_cli/menus/__init__.py +0 -0
  23. {datasecops_cli-0.4.2 → datasecops_cli-0.4.3}/src/datasecops_cli/menus/configuration.py +0 -0
  24. {datasecops_cli-0.4.2 → datasecops_cli-0.4.3}/src/datasecops_cli/menus/downloads.py +0 -0
  25. {datasecops_cli-0.4.2 → datasecops_cli-0.4.3}/src/datasecops_cli/menus/git_operations.py +0 -0
  26. {datasecops_cli-0.4.2 → datasecops_cli-0.4.3}/src/datasecops_cli/models/__init__.py +0 -0
  27. {datasecops_cli-0.4.2 → datasecops_cli-0.4.3}/src/datasecops_cli/models/git_helpers.py +0 -0
  28. {datasecops_cli-0.4.2 → datasecops_cli-0.4.3}/src/datasecops_cli/models/project_config.py +0 -0
  29. {datasecops_cli-0.4.2 → datasecops_cli-0.4.3}/src/datasecops_cli/services/__init__.py +0 -0
  30. {datasecops_cli-0.4.2 → datasecops_cli-0.4.3}/src/datasecops_cli/services/bootstrap_service.py +0 -0
  31. {datasecops_cli-0.4.2 → datasecops_cli-0.4.3}/src/datasecops_cli/services/dbt_project_generator.py +0 -0
  32. {datasecops_cli-0.4.2 → datasecops_cli-0.4.3}/src/datasecops_cli/services/dbt_runner.py +0 -0
  33. {datasecops_cli-0.4.2 → datasecops_cli-0.4.3}/src/datasecops_cli/services/directory_scaffolder.py +0 -0
  34. {datasecops_cli-0.4.2 → datasecops_cli-0.4.3}/src/datasecops_cli/services/download_service.py +0 -0
  35. {datasecops_cli-0.4.2 → datasecops_cli-0.4.3}/src/datasecops_cli/services/git_service.py +0 -0
  36. {datasecops_cli-0.4.2 → datasecops_cli-0.4.3}/src/datasecops_cli/services/linting_service.py +0 -0
  37. {datasecops_cli-0.4.2 → datasecops_cli-0.4.3}/src/datasecops_cli/services/skill_service.py +0 -0
  38. {datasecops_cli-0.4.2 → datasecops_cli-0.4.3}/src/datasecops_cli/services/snowflake_service.py +0 -0
  39. {datasecops_cli-0.4.2 → datasecops_cli-0.4.3}/src/datasecops_cli/services/upstream_service.py +0 -0
  40. {datasecops_cli-0.4.2 → datasecops_cli-0.4.3}/src/datasecops_cli/utilities/__init__.py +0 -0
  41. {datasecops_cli-0.4.2 → datasecops_cli-0.4.3}/src/datasecops_cli/utilities/display.py +0 -0
  42. {datasecops_cli-0.4.2 → datasecops_cli-0.4.3}/src/datasecops_cli/utilities/file_utils.py +0 -0
  43. {datasecops_cli-0.4.2 → datasecops_cli-0.4.3}/src/datasecops_cli/utilities/yaml_utils.py +0 -0
  44. {datasecops_cli-0.4.2 → datasecops_cli-0.4.3}/src/datasecops_mcp/__init__.py +0 -0
  45. {datasecops_cli-0.4.2 → datasecops_cli-0.4.3}/src/datasecops_mcp/__main__.py +0 -0
  46. {datasecops_cli-0.4.2 → datasecops_cli-0.4.3}/src/datasecops_mcp/connection.py +0 -0
  47. {datasecops_cli-0.4.2 → datasecops_cli-0.4.3}/src/datasecops_mcp/server.py +0 -0
  48. {datasecops_cli-0.4.2 → datasecops_cli-0.4.3}/tests/__init__.py +0 -0
  49. {datasecops_cli-0.4.2 → datasecops_cli-0.4.3}/tests/test_config.py +0 -0
  50. {datasecops_cli-0.4.2 → datasecops_cli-0.4.3}/tests/test_file_utils.py +0 -0
  51. {datasecops_cli-0.4.2 → datasecops_cli-0.4.3}/tests/test_main.py +0 -0
  52. {datasecops_cli-0.4.2 → datasecops_cli-0.4.3}/tests/test_models.py +0 -0
  53. {datasecops_cli-0.4.2 → datasecops_cli-0.4.3}/tests/test_version.py +0 -0
  54. {datasecops_cli-0.4.2 → datasecops_cli-0.4.3}/tests/test_yaml_utils.py +0 -0
@@ -2,6 +2,16 @@
2
2
 
3
3
  All notable changes to the DataSecOps CLI are documented in this file.
4
4
 
5
+ ## [0.4.3] - 2026-05-17
6
+
7
+ ### Added
8
+
9
+ - **dbt autofix** — new `[14] autofix` option in the development menu integrating [dbt-autofix](https://github.com/dbt-labs/dbt-autofix) to prepare projects for dbt Fusion / dbt 2.0:
10
+ - Fix deprecated YAML configs, SQL files, and `dbt_project.yml` settings
11
+ - Upgrade packages for Fusion compatibility (with optional `dbt deps` afterwards)
12
+ - Dry run mode to preview changes without writing
13
+ - Auto-installs `dbt-autofix` via `uv tool install` if not found on PATH
14
+
5
15
  ## [0.4.2] - 2026-05-17
6
16
 
7
17
  ### Added
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: datasecops-cli
3
- Version: 0.4.2
3
+ Version: 0.4.3
4
4
  Summary: DataSecOps Framework CLI for Snowflake Native App
5
5
  License-Expression: MIT
6
6
  License-File: LICENSE
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "datasecops-cli"
7
- version = "0.4.2"
7
+ version = "0.4.3"
8
8
  description = "DataSecOps Framework CLI for Snowflake Native App"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -0,0 +1 @@
1
+ __version__ = "0.4.3"
@@ -1,4 +1,6 @@
1
1
  from pathlib import Path
2
+ import shutil
3
+ import subprocess
2
4
 
3
5
  from datasecops_cli.services.dbt_runner import DbtRunner
4
6
  from datasecops_cli.services.linting_service import LintingService
@@ -7,7 +9,7 @@ from datasecops_cli.services.git_service import GitService
7
9
  from datasecops_cli.utilities.display import (
8
10
  clear, section_header, display_action_header, menu_option,
9
11
  get_input_number, get_input_string, get_input_true_false, complete_action,
10
- info_line, error_line
12
+ info_line, error_line, success_line, warning_line
11
13
  )
12
14
 
13
15
 
@@ -75,6 +77,8 @@ class DevelopmentMenu:
75
77
  display_action_header("dbt list")
76
78
  self.dbt.list_models()
77
79
  complete_action()
80
+ elif option == 14:
81
+ self._autofix_menu()
78
82
  self._menu()
79
83
  option = get_input_number("Choose an option: ")
80
84
 
@@ -94,6 +98,7 @@ class DevelopmentMenu:
94
98
  menu_option(11, "clean - Clean dbt target")
95
99
  menu_option(12, "debug - Debug dbt connection")
96
100
  menu_option(13, "list - List dbt resources")
101
+ menu_option(14, "autofix - dbt autofix (deprecations, packages, jobs)")
97
102
  menu_option(0, "back - Return to main menu")
98
103
 
99
104
  def _run_menu(self) -> None:
@@ -191,3 +196,59 @@ class DevelopmentMenu:
191
196
  if path != "0":
192
197
  self.linting.lint_file(file_path=path, fix=False)
193
198
  complete_action()
199
+
200
+ def _autofix_menu(self) -> None:
201
+ clear()
202
+ display_action_header("dbt Autofix")
203
+ menu_option(1, "deprecations - Fix deprecated configs for dbt Fusion / dbt 2.0")
204
+ menu_option(2, "packages - Upgrade packages for Fusion compatibility")
205
+ menu_option(3, "dry run - Preview deprecation fixes without writing")
206
+ menu_option(0, "back - Return to development menu")
207
+ option = get_input_number("Choose an option: ")
208
+
209
+ if option == 0:
210
+ return
211
+
212
+ # Ensure dbt-autofix is available
213
+ if not shutil.which("dbt-autofix"):
214
+ if not shutil.which("uv"):
215
+ error_line("uv not found — install uv first: https://astral.sh/uv")
216
+ complete_action()
217
+ return
218
+ info_line("dbt-autofix not found. Installing via uv...")
219
+ try:
220
+ result = subprocess.run(["uv", "tool", "install", "dbt-autofix"],
221
+ capture_output=True, text=True)
222
+ if result.returncode != 0:
223
+ error_line(f"Failed to install dbt-autofix: {result.stderr.strip()}")
224
+ error_line("Install manually: uv tool install dbt-autofix")
225
+ complete_action()
226
+ return
227
+ success_line("dbt-autofix installed")
228
+ except FileNotFoundError:
229
+ error_line("uv appears in PATH but is not runnable — reinstall uv")
230
+ complete_action()
231
+ return
232
+
233
+ project_path = str(self.dbt.project_dir)
234
+
235
+ if option == 1:
236
+ info_line("Running dbt-autofix deprecations...")
237
+ result = subprocess.run(["dbt-autofix", "deprecations", "--path", project_path])
238
+ if result.returncode != 0:
239
+ error_line(f"dbt-autofix deprecations failed (exit code {result.returncode})")
240
+ elif option == 2:
241
+ info_line("Running dbt-autofix packages...")
242
+ result = subprocess.run(["dbt-autofix", "packages", "--path", project_path])
243
+ if result.returncode != 0:
244
+ error_line("dbt-autofix packages failed — skipping dbt deps")
245
+ else:
246
+ if get_input_true_false("Run dbt deps now?"):
247
+ self.dbt.deps()
248
+ elif option == 3:
249
+ info_line("Running dbt-autofix deprecations (dry run)...")
250
+ result = subprocess.run(["dbt-autofix", "deprecations", "--path", project_path, "--dry-run"])
251
+ if result.returncode != 0:
252
+ error_line(f"dbt-autofix dry run failed (exit code {result.returncode})")
253
+
254
+ complete_action()
@@ -1 +0,0 @@
1
- __version__ = "0.4.2"
File without changes
File without changes
File without changes
File without changes