datasecops-cli 0.2.2__tar.gz → 0.2.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.
- {datasecops_cli-0.2.2 → datasecops_cli-0.2.3}/CHANGELOG.md +12 -0
- {datasecops_cli-0.2.2 → datasecops_cli-0.2.3}/PKG-INFO +1 -1
- {datasecops_cli-0.2.2 → datasecops_cli-0.2.3}/pyproject.toml +1 -1
- {datasecops_cli-0.2.2 → datasecops_cli-0.2.3}/src/datasecops_cli/menus/development.py +9 -8
- {datasecops_cli-0.2.2 → datasecops_cli-0.2.3}/src/datasecops_cli/services/download_service.py +10 -2
- {datasecops_cli-0.2.2 → datasecops_cli-0.2.3}/src/datasecops_cli/services/linting_service.py +9 -0
- {datasecops_cli-0.2.2 → datasecops_cli-0.2.3}/.github/workflows/publish-cli.yml +0 -0
- {datasecops_cli-0.2.2 → datasecops_cli-0.2.3}/.gitignore +0 -0
- {datasecops_cli-0.2.2 → datasecops_cli-0.2.3}/DEVELOPMENT.md +0 -0
- {datasecops_cli-0.2.2 → datasecops_cli-0.2.3}/LICENSE +0 -0
- {datasecops_cli-0.2.2 → datasecops_cli-0.2.3}/README.md +0 -0
- {datasecops_cli-0.2.2 → datasecops_cli-0.2.3}/docs/getting-started.md +0 -0
- {datasecops_cli-0.2.2 → datasecops_cli-0.2.3}/docs/legacy.md +0 -0
- {datasecops_cli-0.2.2 → datasecops_cli-0.2.3}/docs/legacy_plan_of_action.md +0 -0
- {datasecops_cli-0.2.2 → datasecops_cli-0.2.3}/docs/mcp-server.md +0 -0
- {datasecops_cli-0.2.2 → datasecops_cli-0.2.3}/mcp-servers.json +0 -0
- {datasecops_cli-0.2.2 → datasecops_cli-0.2.3}/setup.ps1 +0 -0
- {datasecops_cli-0.2.2 → datasecops_cli-0.2.3}/setup.sh +0 -0
- {datasecops_cli-0.2.2 → datasecops_cli-0.2.3}/src/datasecops_cli/__init__.py +0 -0
- {datasecops_cli-0.2.2 → datasecops_cli-0.2.3}/src/datasecops_cli/config.py +0 -0
- {datasecops_cli-0.2.2 → datasecops_cli-0.2.3}/src/datasecops_cli/main.py +0 -0
- {datasecops_cli-0.2.2 → datasecops_cli-0.2.3}/src/datasecops_cli/menus/__init__.py +0 -0
- {datasecops_cli-0.2.2 → datasecops_cli-0.2.3}/src/datasecops_cli/menus/downloads.py +0 -0
- {datasecops_cli-0.2.2 → datasecops_cli-0.2.3}/src/datasecops_cli/menus/git_operations.py +0 -0
- {datasecops_cli-0.2.2 → datasecops_cli-0.2.3}/src/datasecops_cli/models/__init__.py +0 -0
- {datasecops_cli-0.2.2 → datasecops_cli-0.2.3}/src/datasecops_cli/models/git_helpers.py +0 -0
- {datasecops_cli-0.2.2 → datasecops_cli-0.2.3}/src/datasecops_cli/models/project_config.py +0 -0
- {datasecops_cli-0.2.2 → datasecops_cli-0.2.3}/src/datasecops_cli/services/__init__.py +0 -0
- {datasecops_cli-0.2.2 → datasecops_cli-0.2.3}/src/datasecops_cli/services/bootstrap_service.py +0 -0
- {datasecops_cli-0.2.2 → datasecops_cli-0.2.3}/src/datasecops_cli/services/dbt_runner.py +0 -0
- {datasecops_cli-0.2.2 → datasecops_cli-0.2.3}/src/datasecops_cli/services/git_service.py +0 -0
- {datasecops_cli-0.2.2 → datasecops_cli-0.2.3}/src/datasecops_cli/services/skill_service.py +0 -0
- {datasecops_cli-0.2.2 → datasecops_cli-0.2.3}/src/datasecops_cli/services/snowflake_service.py +0 -0
- {datasecops_cli-0.2.2 → datasecops_cli-0.2.3}/src/datasecops_cli/utilities/__init__.py +0 -0
- {datasecops_cli-0.2.2 → datasecops_cli-0.2.3}/src/datasecops_cli/utilities/display.py +0 -0
- {datasecops_cli-0.2.2 → datasecops_cli-0.2.3}/src/datasecops_cli/utilities/file_utils.py +0 -0
- {datasecops_cli-0.2.2 → datasecops_cli-0.2.3}/src/datasecops_cli/utilities/yaml_utils.py +0 -0
- {datasecops_cli-0.2.2 → datasecops_cli-0.2.3}/src/datasecops_mcp/__init__.py +0 -0
- {datasecops_cli-0.2.2 → datasecops_cli-0.2.3}/src/datasecops_mcp/__main__.py +0 -0
- {datasecops_cli-0.2.2 → datasecops_cli-0.2.3}/src/datasecops_mcp/connection.py +0 -0
- {datasecops_cli-0.2.2 → datasecops_cli-0.2.3}/src/datasecops_mcp/server.py +0 -0
- {datasecops_cli-0.2.2 → datasecops_cli-0.2.3}/tests/__init__.py +0 -0
- {datasecops_cli-0.2.2 → datasecops_cli-0.2.3}/tests/test_config.py +0 -0
- {datasecops_cli-0.2.2 → datasecops_cli-0.2.3}/tests/test_file_utils.py +0 -0
- {datasecops_cli-0.2.2 → datasecops_cli-0.2.3}/tests/test_models.py +0 -0
- {datasecops_cli-0.2.2 → datasecops_cli-0.2.3}/tests/test_version.py +0 -0
- {datasecops_cli-0.2.2 → datasecops_cli-0.2.3}/tests/test_yaml_utils.py +0 -0
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to the DataSecOps CLI are documented in this file.
|
|
4
4
|
|
|
5
|
+
## [0.2.3] - 2026-05-11
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- **Stripped invalid `dbt_skip_compilation_error` option** from the generated `[sqlfluff:templater:dbt]` section — this native app field is not a valid sqlfluff config key and caused parse errors
|
|
10
|
+
- **`profiles_dir = ${DBT_PROFILES_DIR}` no longer leaks** into generated config — the raw value from the native app is now always replaced with the resolved local path or removed entirely
|
|
11
|
+
- **Empty string values** (e.g. `warnings = ""`) now emit `None` instead of blank, matching sqlfluff's expected INI format
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- **Auto-install `sqlfluff-templater-dbt`** — the lint menu now checks for missing sqlfluff packages before linting and installs them automatically
|
|
16
|
+
|
|
5
17
|
## [0.2.2] - 2026-05-10
|
|
6
18
|
|
|
7
19
|
### Fixed
|
|
@@ -141,15 +141,16 @@ class DevelopmentMenu:
|
|
|
141
141
|
complete_action()
|
|
142
142
|
|
|
143
143
|
def _ensure_sqlfluff_config(self) -> bool:
|
|
144
|
-
"""Download .sqlfluff from the framework if it doesn't exist locally."""
|
|
144
|
+
"""Download .sqlfluff from the framework if it doesn't exist locally, and ensure templater is installed."""
|
|
145
145
|
config_path = self.linting.project_dir / ".sqlfluff"
|
|
146
|
-
if config_path.exists():
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
146
|
+
if not config_path.exists():
|
|
147
|
+
if not self.downloads:
|
|
148
|
+
error_line("No .sqlfluff config found and download service not available")
|
|
149
|
+
return False
|
|
150
|
+
info_line("No .sqlfluff config found — downloading from framework...")
|
|
151
|
+
if not self.downloads.download_sqlfluff_config(profiles_dir=self.profiles_dir):
|
|
152
|
+
return False
|
|
153
|
+
return self.linting.ensure_templater_installed()
|
|
153
154
|
|
|
154
155
|
def _lint_menu(self) -> None:
|
|
155
156
|
clear()
|
{datasecops_cli-0.2.2 → datasecops_cli-0.2.3}/src/datasecops_cli/services/download_service.py
RENAMED
|
@@ -69,6 +69,11 @@ class DownloadService:
|
|
|
69
69
|
self.sf = snowflake_service
|
|
70
70
|
self.project_dir = project_dir
|
|
71
71
|
|
|
72
|
+
# Options to strip from specific core sections (not valid sqlfluff config keys).
|
|
73
|
+
CORE_STRIP_OPTIONS: dict[str, set[str]] = {
|
|
74
|
+
"dbt": {"dbt_skip_compilation_error"},
|
|
75
|
+
}
|
|
76
|
+
|
|
72
77
|
@staticmethod
|
|
73
78
|
def _format_value(val) -> str:
|
|
74
79
|
"""Format a JSON value for sqlfluff INI output."""
|
|
@@ -106,13 +111,16 @@ class DownloadService:
|
|
|
106
111
|
if not isinstance(entry, dict) or not entry.get("enabled", True):
|
|
107
112
|
continue
|
|
108
113
|
opts = dict(entry.get("options", {}))
|
|
114
|
+
# Strip options that are not valid sqlfluff config keys
|
|
115
|
+
for strip_key in self.CORE_STRIP_OPTIONS.get(key, set()):
|
|
116
|
+
opts.pop(strip_key, None)
|
|
109
117
|
if key == "dbt":
|
|
110
118
|
# Override profiles_dir / project_dir with local values
|
|
111
119
|
opts["project_dir"] = "."
|
|
112
120
|
if profiles_dir:
|
|
113
121
|
opts["profiles_dir"] = profiles_dir
|
|
114
|
-
|
|
115
|
-
|
|
122
|
+
else:
|
|
123
|
+
opts.pop("profiles_dir", None)
|
|
116
124
|
if opts:
|
|
117
125
|
self._emit_section(lines, section_header, opts)
|
|
118
126
|
|
{datasecops_cli-0.2.2 → datasecops_cli-0.2.3}/src/datasecops_cli/services/linting_service.py
RENAMED
|
@@ -43,6 +43,15 @@ class LintingService:
|
|
|
43
43
|
error_line(f"pip install failed with exit code {result.returncode}")
|
|
44
44
|
return False
|
|
45
45
|
|
|
46
|
+
def ensure_templater_installed(self) -> bool:
|
|
47
|
+
"""Check if sqlfluff-templater-dbt is installed; install it if missing."""
|
|
48
|
+
versions = self.get_installed_versions()
|
|
49
|
+
missing = [pkg for pkg in ["sqlfluff", "sqlfluff-templater-dbt"] if not versions.get(pkg)]
|
|
50
|
+
if not missing:
|
|
51
|
+
return True
|
|
52
|
+
warning_line(f"Missing packages: {', '.join(missing)}")
|
|
53
|
+
return self.install_requirements(missing)
|
|
54
|
+
|
|
46
55
|
def lint_file(self, file_path: str = None, fix: bool = False) -> subprocess.CompletedProcess:
|
|
47
56
|
action = "fix" if fix else "lint"
|
|
48
57
|
cmd = ["sqlfluff", action]
|
|
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
|
{datasecops_cli-0.2.2 → datasecops_cli-0.2.3}/src/datasecops_cli/services/bootstrap_service.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{datasecops_cli-0.2.2 → datasecops_cli-0.2.3}/src/datasecops_cli/services/snowflake_service.py
RENAMED
|
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
|