pinky-core 0.1.0.dev2__tar.gz → 0.1.0.dev4__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.
- pinky_core-0.1.0.dev4/.github/workflows/ci.yml +65 -0
- {pinky_core-0.1.0.dev2 → pinky_core-0.1.0.dev4}/.github/workflows/publish.yml +2 -2
- {pinky_core-0.1.0.dev2 → pinky_core-0.1.0.dev4}/.github/workflows/release.yml +2 -2
- {pinky_core-0.1.0.dev2 → pinky_core-0.1.0.dev4}/.gitignore +1 -1
- pinky_core-0.1.0.dev4/.gitleaks.toml +14 -0
- {pinky_core-0.1.0.dev2 → pinky_core-0.1.0.dev4}/.pre-commit-config.yaml +95 -54
- pinky_core-0.1.0.dev4/.secrets.baseline +127 -0
- pinky_core-0.1.0.dev4/PKG-INFO +229 -0
- pinky_core-0.1.0.dev4/README.md +156 -0
- {pinky_core-0.1.0.dev2 → pinky_core-0.1.0.dev4}/docs/explanation/1-design.md +8 -4
- pinky_core-0.1.0.dev4/docs/explanation/2-features.md +44 -0
- pinky_core-0.1.0.dev4/docs/index.md +23 -0
- {pinky_core-0.1.0.dev2 → pinky_core-0.1.0.dev4}/docs/mkdocs.yml +3 -1
- pinky_core-0.1.0.dev4/docs/reference/api/fec.md +5 -0
- pinky_core-0.1.0.dev4/docs/reference/api/html.md +5 -0
- pinky_core-0.1.0.dev4/docs/reference/api/lint.md +5 -0
- pinky_core-0.1.0.dev4/docs/reference/api/warnings.md +5 -0
- {pinky_core-0.1.0.dev2 → pinky_core-0.1.0.dev4}/docs/reference/generated/coverage_badge.svg +1 -1
- {pinky_core-0.1.0.dev2 → pinky_core-0.1.0.dev4}/docs/reference/generated/hooks_badge.svg +1 -1
- {pinky_core-0.1.0.dev2 → pinky_core-0.1.0.dev4}/docs/reference/generated/interrogate_badge.svg +4 -4
- {pinky_core-0.1.0.dev2 → pinky_core-0.1.0.dev4}/docs/reference/generated/noqa_badge.svg +5 -5
- {pinky_core-0.1.0.dev2 → pinky_core-0.1.0.dev4}/pyproject.toml +23 -12
- {pinky_core-0.1.0.dev2 → pinky_core-0.1.0.dev4}/scripts/deploy_validate_udfs.py +4 -4
- pinky_core-0.1.0.dev4/scripts/hooks/badges.toml +84 -0
- pinky_core-0.1.0.dev4/scripts/hooks/check_forbidden_keywords.py +199 -0
- pinky_core-0.1.0.dev4/scripts/hooks/check_snowpark_api.py +278 -0
- {pinky_core-0.1.0.dev2 → pinky_core-0.1.0.dev4}/scripts/hooks/check_typed_api.py +11 -1
- {pinky_core-0.1.0.dev2 → pinky_core-0.1.0.dev4}/scripts/hooks/check_zws.py +25 -1
- {pinky_core-0.1.0.dev2 → pinky_core-0.1.0.dev4}/scripts/hooks/commit-msg +42 -15
- pinky_core-0.1.0.dev4/scripts/hooks/docs_identity.json +18 -0
- pinky_core-0.1.0.dev4/scripts/hooks/generate-docs +65 -0
- {pinky_core-0.1.0.dev2 → pinky_core-0.1.0.dev4}/scripts/hooks/generate_ci_badges.py +19 -6
- pinky_core-0.1.0.dev4/scripts/hooks/render_docs.py +605 -0
- {pinky_core-0.1.0.dev2 → pinky_core-0.1.0.dev4}/src/pinky_core/__init__.py +71 -1
- pinky_core-0.1.0.dev4/src/pinky_core/finance/__init__.py +33 -0
- pinky_core-0.1.0.dev4/src/pinky_core/finance/fec.py +560 -0
- {pinky_core-0.1.0.dev2 → pinky_core-0.1.0.dev4}/src/pinky_core/fmt.py +36 -2
- pinky_core-0.1.0.dev4/src/pinky_core/html.py +350 -0
- {pinky_core-0.1.0.dev2 → pinky_core-0.1.0.dev4}/src/pinky_core/lint.py +3 -1
- {pinky_core-0.1.0.dev2 → pinky_core-0.1.0.dev4}/src/pinky_core/schedule.py +220 -8
- {pinky_core-0.1.0.dev2 → pinky_core-0.1.0.dev4}/src/pinky_core/security.py +5 -4
- {pinky_core-0.1.0.dev2 → pinky_core-0.1.0.dev4}/src/pinky_core/sql.py +53 -7
- pinky_core-0.1.0.dev4/src/pinky_core/warnings.py +23 -0
- {pinky_core-0.1.0.dev2 → pinky_core-0.1.0.dev4}/src/pinky_core/xml.py +11 -8
- pinky_core-0.1.0.dev4/tests/test_fec.py +310 -0
- {pinky_core-0.1.0.dev2 → pinky_core-0.1.0.dev4}/tests/test_files.py +5 -5
- {pinky_core-0.1.0.dev2 → pinky_core-0.1.0.dev4}/tests/test_fmt.py +18 -0
- pinky_core-0.1.0.dev4/tests/test_html.py +63 -0
- pinky_core-0.1.0.dev4/tests/test_public_api.py +69 -0
- {pinky_core-0.1.0.dev2 → pinky_core-0.1.0.dev4}/tests/test_schedule.py +121 -1
- pinky_core-0.1.0.dev4/tests/test_sql.py +170 -0
- pinky_core-0.1.0.dev4/tests/test_warnings.py +34 -0
- pinky_core-0.1.0.dev2/.github/workflows/ci.yml +0 -41
- pinky_core-0.1.0.dev2/.vscode/extensions.json +0 -35
- pinky_core-0.1.0.dev2/.vscode/settings.json +0 -46
- pinky_core-0.1.0.dev2/AGENT.md +0 -209
- pinky_core-0.1.0.dev2/PKG-INFO +0 -96
- pinky_core-0.1.0.dev2/README.md +0 -30
- pinky_core-0.1.0.dev2/docs/explanation/2-features.md +0 -88
- pinky_core-0.1.0.dev2/docs/index.md +0 -32
- pinky_core-0.1.0.dev2/docs/mkdocs.dev.yml +0 -3
- pinky_core-0.1.0.dev2/scripts/hooks/check-docs-up-to-date +0 -55
- pinky_core-0.1.0.dev2/scripts/hooks/check_forbidden_keywords.py +0 -76
- pinky_core-0.1.0.dev2/src/pinky_core/sql_custom.py +0 -78
- pinky_core-0.1.0.dev2/tests/test_sql.py +0 -82
- {pinky_core-0.1.0.dev2 → pinky_core-0.1.0.dev4}/LICENSE +0 -0
- {pinky_core-0.1.0.dev2 → pinky_core-0.1.0.dev4}/docs/.pages +0 -0
- {pinky_core-0.1.0.dev2 → pinky_core-0.1.0.dev4}/docs/adr/.pages +0 -0
- {pinky_core-0.1.0.dev2 → pinky_core-0.1.0.dev4}/docs/adr/0001-zero-dependency-static-html.md +0 -0
- {pinky_core-0.1.0.dev2 → pinky_core-0.1.0.dev4}/docs/explanation/.pages +0 -0
- {pinky_core-0.1.0.dev2 → pinky_core-0.1.0.dev4}/docs/how-to/.pages +0 -0
- {pinky_core-0.1.0.dev2 → pinky_core-0.1.0.dev4}/docs/how-to/index.md +0 -0
- {pinky_core-0.1.0.dev2 → pinky_core-0.1.0.dev4}/docs/reference/.pages +0 -0
- {pinky_core-0.1.0.dev2 → pinky_core-0.1.0.dev4}/docs/reference/api/.pages +0 -0
- {pinky_core-0.1.0.dev2 → pinky_core-0.1.0.dev4}/docs/reference/api/files.md +0 -0
- {pinky_core-0.1.0.dev2 → pinky_core-0.1.0.dev4}/docs/reference/api/fmt.md +0 -0
- {pinky_core-0.1.0.dev2 → pinky_core-0.1.0.dev4}/docs/reference/api/schedule.md +0 -0
- {pinky_core-0.1.0.dev2 → pinky_core-0.1.0.dev4}/docs/reference/api/security.md +0 -0
- {pinky_core-0.1.0.dev2 → pinky_core-0.1.0.dev4}/docs/reference/api/sql.md +0 -0
- {pinky_core-0.1.0.dev2 → pinky_core-0.1.0.dev4}/docs/reference/api/validate.md +0 -0
- {pinky_core-0.1.0.dev2 → pinky_core-0.1.0.dev4}/docs/reference/api/xml.md +0 -0
- {pinky_core-0.1.0.dev2 → pinky_core-0.1.0.dev4}/docs/tutorials/.pages +0 -0
- {pinky_core-0.1.0.dev2 → pinky_core-0.1.0.dev4}/docs/tutorials/index.md +0 -0
- {pinky_core-0.1.0.dev2 → pinky_core-0.1.0.dev4}/sql/deploy_udf_example.sql +0 -0
- {pinky_core-0.1.0.dev2 → pinky_core-0.1.0.dev4}/src/pinky_core/files.py +0 -0
- {pinky_core-0.1.0.dev2 → pinky_core-0.1.0.dev4}/src/pinky_core/validate.py +0 -0
- {pinky_core-0.1.0.dev2 → pinky_core-0.1.0.dev4}/tests/__init__.py +0 -0
- {pinky_core-0.1.0.dev2 → pinky_core-0.1.0.dev4}/tests/fixtures/cats_domination.xml +0 -0
- {pinky_core-0.1.0.dev2 → pinky_core-0.1.0.dev4}/tests/test_lint.py +0 -0
- {pinky_core-0.1.0.dev2 → pinky_core-0.1.0.dev4}/tests/test_security.py +0 -0
- {pinky_core-0.1.0.dev2 → pinky_core-0.1.0.dev4}/tests/test_validate.py +0 -0
- {pinky_core-0.1.0.dev2 → pinky_core-0.1.0.dev4}/tests/test_xml_xpath.py +0 -0
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main, develop]
|
|
6
|
+
paths: ['src/**', 'tests/**', 'pyproject.toml', 'scripts/**', '.pre-commit-config.yaml', '.github/workflows/ci.yml']
|
|
7
|
+
pull_request:
|
|
8
|
+
branches: [main, develop]
|
|
9
|
+
paths: ['src/**', 'tests/**', 'pyproject.toml', 'scripts/**', '.pre-commit-config.yaml', '.github/workflows/ci.yml']
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
ci:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
env:
|
|
15
|
+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
|
|
16
|
+
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
|
+
|
|
20
|
+
- name: Set up Python 3.12
|
|
21
|
+
uses: actions/setup-python@v5
|
|
22
|
+
with:
|
|
23
|
+
python-version: "3.12"
|
|
24
|
+
|
|
25
|
+
- name: Run pre-commit hooks
|
|
26
|
+
# Single source of truth: .pre-commit-config.yaml (ruff, mypy, bandit, gitleaks,
|
|
27
|
+
# detect-secrets, check-zws, check-forbidden-keywords, interrogate, darglint,
|
|
28
|
+
# check-typed-api, mdformat) — replaces the hand-duplicated Lint/Format/Type/Security
|
|
29
|
+
# steps, which only re-implemented 3 of the ~11 hooks and could silently drift from
|
|
30
|
+
# .pre-commit-config.yaml's actual args/excludes. j178/prek-action (not `pip install
|
|
31
|
+
# prek`): official action, caches the prek env between runs, defaults to
|
|
32
|
+
# `prek run --show-diff-on-failure --color=always --all-files`.
|
|
33
|
+
uses: j178/prek-action@v2
|
|
34
|
+
|
|
35
|
+
- name: Install dependencies
|
|
36
|
+
# All optional extras, not just validate/address/dev — omitting xml/schedule/lint
|
|
37
|
+
# silently skips their test files at collection time (pytest.importorskip on the
|
|
38
|
+
# missing package), deflating the coverage number without ever failing CI.
|
|
39
|
+
run: pip install -e ".[validate,address,schedule,xml,lint,dev]"
|
|
40
|
+
|
|
41
|
+
- name: Tests
|
|
42
|
+
run: pytest
|
|
43
|
+
|
|
44
|
+
precommit-windows:
|
|
45
|
+
# ADR-0023 pilot gate: hermetic pre-commit hooks must run on the brother's
|
|
46
|
+
# machine (Windows, prek only, no toolchain) — this is the real gate, not the Mac.
|
|
47
|
+
runs-on: windows-latest
|
|
48
|
+
strategy:
|
|
49
|
+
matrix:
|
|
50
|
+
shell: [cmd, pwsh]
|
|
51
|
+
defaults:
|
|
52
|
+
run:
|
|
53
|
+
shell: ${{ matrix.shell }}
|
|
54
|
+
steps:
|
|
55
|
+
- uses: actions/checkout@v4
|
|
56
|
+
|
|
57
|
+
- name: Set up Python 3.12
|
|
58
|
+
uses: actions/setup-python@v5
|
|
59
|
+
with:
|
|
60
|
+
python-version: "3.12"
|
|
61
|
+
|
|
62
|
+
- name: Run mdformat hook
|
|
63
|
+
uses: j178/prek-action@v2
|
|
64
|
+
with:
|
|
65
|
+
extra-args: 'mdformat --all-files'
|
|
@@ -17,10 +17,10 @@ jobs:
|
|
|
17
17
|
steps:
|
|
18
18
|
- uses: actions/checkout@v4
|
|
19
19
|
|
|
20
|
-
- name: Set up Python 3.
|
|
20
|
+
- name: Set up Python 3.12
|
|
21
21
|
uses: actions/setup-python@v5
|
|
22
22
|
with:
|
|
23
|
-
python-version: "3.
|
|
23
|
+
python-version: "3.12"
|
|
24
24
|
|
|
25
25
|
- name: Install build
|
|
26
26
|
run: pip install build
|
|
@@ -32,10 +32,10 @@ jobs:
|
|
|
32
32
|
git tag "v${{ steps.version.outputs.version }}"
|
|
33
33
|
git push origin "v${{ steps.version.outputs.version }}"
|
|
34
34
|
|
|
35
|
-
- name: Set up Python 3.
|
|
35
|
+
- name: Set up Python 3.12
|
|
36
36
|
uses: actions/setup-python@v5
|
|
37
37
|
with:
|
|
38
|
-
python-version: "3.
|
|
38
|
+
python-version: "3.12"
|
|
39
39
|
|
|
40
40
|
- name: Install build
|
|
41
41
|
run: pip install build
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Distributed as-is to every onboarded repo's root (see setup/precommit.py distribute()).
|
|
2
|
+
# gitleaks auto-discovers .gitleaks.toml in the scan root — no pre-commit-side wiring needed.
|
|
3
|
+
[extend]
|
|
4
|
+
useDefault = true
|
|
5
|
+
|
|
6
|
+
[allowlist]
|
|
7
|
+
# .secrets.baseline stores detect-secrets' accepted findings as SHA1 hashes (hashed_secret),
|
|
8
|
+
# never the raw secret — that's the whole point of a baseline. A high-entropy hash next to a
|
|
9
|
+
# "secret"-shaped key still trips gitleaks' generic-api-key heuristic the moment a repo's baseline
|
|
10
|
+
# records its first real finding (empty result sets don't trigger it, which is why this went
|
|
11
|
+
# unnoticed until pinky-studio).
|
|
12
|
+
paths = [
|
|
13
|
+
'''\.secrets\.baseline''',
|
|
14
|
+
]
|
|
@@ -1,16 +1,22 @@
|
|
|
1
1
|
---
|
|
2
2
|
# =============================================================================
|
|
3
|
-
# .pre-commit-config.yaml —
|
|
3
|
+
# .pre-commit-config.yaml — GENERATED by pinky-workspace/setup.py — DO NOT EDIT
|
|
4
4
|
# =============================================================================
|
|
5
|
-
#
|
|
5
|
+
# Source: pinky-workspace/core/pre-commit/{base,extras/*}.yaml
|
|
6
|
+
# Third-party revs are pinned centrally in this base — bump them here, once.
|
|
7
|
+
# To change which hooks a repo gets, edit the workspace source and re-run setup.py.
|
|
8
|
+
#
|
|
9
|
+
# Install (done automatically by setup.py):
|
|
6
10
|
# pip install pre-commit
|
|
7
11
|
# pre-commit install
|
|
8
12
|
# pre-commit install --hook-type commit-msg
|
|
9
|
-
#
|
|
10
|
-
# Update standard hooks:
|
|
11
|
-
# pre-commit autoupdate
|
|
12
13
|
# =============================================================================
|
|
13
14
|
default_install_hook_types: [pre-commit, commit-msg]
|
|
15
|
+
# Pin explicite : sans ça, les hooks `language: python` (mdformat, mypy, interrogate, darglint…)
|
|
16
|
+
# créent leur venv avec le python3 ambiant du PATH au moment de l'install, pas une version garantie
|
|
17
|
+
# par le repo — non-déterministe en local (CI est protégée par actions/setup-python en amont).
|
|
18
|
+
default_language_version:
|
|
19
|
+
python: python3.12
|
|
14
20
|
|
|
15
21
|
repos:
|
|
16
22
|
# ── Formatting: trailing spaces + newline ─────────────────────────────────
|
|
@@ -25,16 +31,36 @@ repos:
|
|
|
25
31
|
- id: check-merge-conflict
|
|
26
32
|
- id: debug-statements
|
|
27
33
|
|
|
34
|
+
# ── Docs generation: README + docs/index.md + quality badges ──────────────
|
|
35
|
+
# Universal (every repo, not just the snowflake extra — 2026-07-10, renamed/extended from
|
|
36
|
+
# check-docs-up-to-date). Runs before mdformat below so the regenerated README gets reformatted.
|
|
37
|
+
- repo: local
|
|
38
|
+
hooks:
|
|
39
|
+
- id: generate-docs
|
|
40
|
+
name: Generate docs (README + index.md + badges)
|
|
41
|
+
entry: scripts/hooks/generate-docs
|
|
42
|
+
language: script
|
|
43
|
+
stages: [pre-commit]
|
|
44
|
+
pass_filenames: false
|
|
45
|
+
|
|
28
46
|
# ── Formatting: Markdown ──────────────────────────────────────────────────
|
|
29
47
|
- repo: local
|
|
30
48
|
hooks:
|
|
31
49
|
- id: mdformat
|
|
32
50
|
name: mdformat
|
|
33
51
|
entry: mdformat
|
|
34
|
-
language:
|
|
52
|
+
language: python
|
|
53
|
+
additional_dependencies: ["mdformat==1.0.0"]
|
|
35
54
|
files: ^README\.md$
|
|
36
55
|
|
|
37
56
|
# ── Security: secrets & forbidden files ──────────────────────────────────
|
|
57
|
+
# gitleaks' hook has pass_filenames: false (it scans the repo itself, not a file list pre-commit
|
|
58
|
+
# hands it) — a pre-commit `exclude:` here would be silently inert. The real exclusion mechanism
|
|
59
|
+
# is the distributed .gitleaks.toml allowlist (see distribute()/DISTRIBUTED_PATHS): .secrets.baseline
|
|
60
|
+
# stores detect-secrets' accepted findings as SHA1 hashes, never the raw secret, but a high-entropy
|
|
61
|
+
# hash next to a "secret"-shaped key still trips gitleaks' generic-api-key heuristic (found rolling
|
|
62
|
+
# this out to pinky-studio, the first repo whose baseline had a real finding instead of an empty
|
|
63
|
+
# result set).
|
|
38
64
|
- repo: https://github.com/gitleaks/gitleaks
|
|
39
65
|
rev: v8.30.0
|
|
40
66
|
hooks:
|
|
@@ -45,10 +71,38 @@ repos:
|
|
|
45
71
|
rev: v1.5.0
|
|
46
72
|
hooks:
|
|
47
73
|
- id: detect-secrets
|
|
48
|
-
args: ["--baseline", ".
|
|
74
|
+
args: ["--baseline", ".secrets.baseline"]
|
|
49
75
|
exclude: ^docs/
|
|
50
76
|
|
|
51
|
-
# ──
|
|
77
|
+
# ── Zero-width spaces (copy-paste from Outlook/Teams) ────────────────────
|
|
78
|
+
- repo: local
|
|
79
|
+
hooks:
|
|
80
|
+
- id: check-zws
|
|
81
|
+
name: "[ZWS] Invisible characters (zero-width)"
|
|
82
|
+
entry: python scripts/hooks/check_zws.py
|
|
83
|
+
language: system
|
|
84
|
+
pass_filenames: true
|
|
85
|
+
|
|
86
|
+
# ── Employer reference guard ──────────────────────────────────────────────
|
|
87
|
+
- repo: local
|
|
88
|
+
hooks:
|
|
89
|
+
- id: check-forbidden-keywords
|
|
90
|
+
name: "[FORBIDDEN] Employer references"
|
|
91
|
+
entry: python scripts/hooks/check_forbidden_keywords.py
|
|
92
|
+
language: system
|
|
93
|
+
pass_filenames: true
|
|
94
|
+
|
|
95
|
+
# ── Commit message format ─────────────────────────────────────────────────
|
|
96
|
+
- repo: local
|
|
97
|
+
hooks:
|
|
98
|
+
- id: commit-msg-format
|
|
99
|
+
name: Commit message format
|
|
100
|
+
entry: scripts/hooks/commit-msg
|
|
101
|
+
language: script
|
|
102
|
+
stages: [commit-msg]
|
|
103
|
+
|
|
104
|
+
# ── EXTRA python — repos with src/ ────────────────────────────────────────
|
|
105
|
+
# Python: ruff lint + format
|
|
52
106
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
53
107
|
rev: v0.15.15
|
|
54
108
|
hooks:
|
|
@@ -57,57 +111,61 @@ repos:
|
|
|
57
111
|
- id: ruff-format
|
|
58
112
|
args: [--check]
|
|
59
113
|
|
|
60
|
-
#
|
|
114
|
+
# Python: type checking
|
|
61
115
|
- repo: local
|
|
62
116
|
hooks:
|
|
63
117
|
- id: mypy
|
|
64
118
|
name: mypy
|
|
65
119
|
entry: mypy
|
|
66
|
-
|
|
120
|
+
# Hermetic (ADR-0026, supersedes ADR-0023's system carve-out): additional_dependencies is
|
|
121
|
+
# auto-derived per repo by setup.py (build_precommit_config) from THAT repo's own
|
|
122
|
+
# pyproject.toml runtime `dependencies` — mypy pin + real third-party deps, minus internal
|
|
123
|
+
# pinky-* packages (pre-release, not on PyPI, excluded from the derivation).
|
|
124
|
+
# --ignore-missing-imports stays as the residual fallback for those excluded imports only.
|
|
125
|
+
language: python
|
|
126
|
+
additional_dependencies: ["mypy==2.0.0", "pydantic>=2.0", "sqlglot", "unidecode"]
|
|
67
127
|
types: [python]
|
|
68
128
|
args: [--ignore-missing-imports]
|
|
69
129
|
files: ^src/
|
|
130
|
+
# mypy's incremental cache (.mypy_cache/) isn't safe under concurrent access — without
|
|
131
|
+
# this, prek/pre-commit's default file-batch parallelism spawns multiple mypy processes
|
|
132
|
+
# against the same cache dir and one crashes with INTERNAL ERROR (reproduced on
|
|
133
|
+
# pinky-core: a single-process run over the same files passes clean).
|
|
134
|
+
require_serial: true
|
|
70
135
|
|
|
71
|
-
#
|
|
72
|
-
-
|
|
136
|
+
# Python: security
|
|
137
|
+
# B108 (hardcoded /tmp) is skipped workspace-wide: Snowflake execution only exposes
|
|
138
|
+
# /tmp as a writable scratch directory, so it is the sanctioned path, not a smell.
|
|
139
|
+
- repo: https://github.com/PyCQA/bandit
|
|
140
|
+
rev: "1.9.4"
|
|
73
141
|
hooks:
|
|
74
142
|
- id: bandit
|
|
75
|
-
name: bandit
|
|
76
|
-
entry: bandit
|
|
77
|
-
language: system
|
|
78
143
|
pass_filenames: false
|
|
79
|
-
args: [-r, src/, -ll]
|
|
144
|
+
args: [-r, src/, -ll, --skip, B108]
|
|
80
145
|
|
|
81
|
-
#
|
|
146
|
+
# Docstrings: coverage
|
|
82
147
|
- repo: local
|
|
83
148
|
hooks:
|
|
84
149
|
- id: interrogate
|
|
85
150
|
name: "[DOCSTRING] Coverage"
|
|
86
151
|
entry: interrogate
|
|
87
|
-
language:
|
|
152
|
+
language: python
|
|
153
|
+
additional_dependencies: ["interrogate==1.7.0"]
|
|
88
154
|
pass_filenames: false
|
|
89
155
|
args: [src/, --ignore-init-method, --ignore-magic, --ignore-module, --ignore-private]
|
|
90
156
|
|
|
91
|
-
#
|
|
157
|
+
# Docstrings: args/returns match signature
|
|
92
158
|
- repo: local
|
|
93
159
|
hooks:
|
|
94
160
|
- id: darglint
|
|
95
161
|
name: "[DOCSTRING] Args/Returns match"
|
|
96
162
|
entry: darglint
|
|
97
|
-
language:
|
|
163
|
+
language: python
|
|
164
|
+
additional_dependencies: ["darglint==1.8.1"]
|
|
98
165
|
types: [python]
|
|
99
166
|
files: ^src/
|
|
100
167
|
|
|
101
|
-
#
|
|
102
|
-
- repo: local
|
|
103
|
-
hooks:
|
|
104
|
-
- id: check-zws
|
|
105
|
-
name: "[ZWS] Invisible characters (zero-width)"
|
|
106
|
-
entry: python scripts/hooks/check_zws.py
|
|
107
|
-
language: system
|
|
108
|
-
pass_filenames: true
|
|
109
|
-
|
|
110
|
-
# ── Typed API guard ──────────────────────────────────────────────────────
|
|
168
|
+
# Typed API guard
|
|
111
169
|
- repo: local
|
|
112
170
|
hooks:
|
|
113
171
|
- id: check-typed-api
|
|
@@ -117,30 +175,13 @@ repos:
|
|
|
117
175
|
types: [python]
|
|
118
176
|
files: ^src/
|
|
119
177
|
|
|
120
|
-
# ──
|
|
178
|
+
# ── EXTRA snowflake — Snowpark / Core API repos ───────────────────────────
|
|
179
|
+
# Snowpark / Core API conventions (no session.sql(), canonical method names)
|
|
121
180
|
- repo: local
|
|
122
181
|
hooks:
|
|
123
|
-
- id: check-
|
|
124
|
-
name: "[
|
|
125
|
-
entry: python scripts/hooks/
|
|
182
|
+
- id: check-snowpark-api
|
|
183
|
+
name: "[SNOWPARK-API] No session.sql(), canonical method names"
|
|
184
|
+
entry: python scripts/hooks/check_snowpark_api.py
|
|
126
185
|
language: system
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
# ── Docs up-to-date check ─────────────────────────────────────────────────
|
|
130
|
-
- repo: local
|
|
131
|
-
hooks:
|
|
132
|
-
- id: check-docs-up-to-date
|
|
133
|
-
name: Docs up-to-date (README + pdoc)
|
|
134
|
-
entry: scripts/hooks/check-docs-up-to-date
|
|
135
|
-
language: script
|
|
136
|
-
stages: [pre-commit]
|
|
137
|
-
pass_filenames: false
|
|
138
|
-
|
|
139
|
-
# ── Commit message format ─────────────────────────────────────────────────
|
|
140
|
-
- repo: local
|
|
141
|
-
hooks:
|
|
142
|
-
- id: commit-msg-format
|
|
143
|
-
name: Commit message format
|
|
144
|
-
entry: scripts/hooks/commit-msg
|
|
145
|
-
language: script
|
|
146
|
-
stages: [commit-msg]
|
|
186
|
+
types: [python]
|
|
187
|
+
files: ^src/
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "1.5.0",
|
|
3
|
+
"plugins_used": [
|
|
4
|
+
{
|
|
5
|
+
"name": "ArtifactoryDetector"
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
"name": "AWSKeyDetector"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"name": "AzureStorageKeyDetector"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"name": "Base64HighEntropyString",
|
|
15
|
+
"limit": 4.5
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"name": "BasicAuthDetector"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"name": "CloudantDetector"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"name": "DiscordBotTokenDetector"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"name": "GitHubTokenDetector"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"name": "GitLabTokenDetector"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"name": "HexHighEntropyString",
|
|
34
|
+
"limit": 3.0
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"name": "IbmCloudIamDetector"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"name": "IbmCosHmacDetector"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"name": "IPPublicDetector"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"name": "JwtTokenDetector"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"name": "KeywordDetector",
|
|
50
|
+
"keyword_exclude": ""
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"name": "MailchimpDetector"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"name": "NpmDetector"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"name": "OpenAIDetector"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"name": "PrivateKeyDetector"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"name": "PypiTokenDetector"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"name": "SendGridDetector"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"name": "SlackDetector"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"name": "SoftlayerDetector"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"name": "SquareOAuthDetector"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"name": "StripeDetector"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"name": "TelegramBotTokenDetector"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"name": "TwilioKeyDetector"
|
|
87
|
+
}
|
|
88
|
+
],
|
|
89
|
+
"filters_used": [
|
|
90
|
+
{
|
|
91
|
+
"path": "detect_secrets.filters.allowlist.is_line_allowlisted"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"path": "detect_secrets.filters.common.is_ignored_due_to_verification_policies",
|
|
95
|
+
"min_level": 2
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"path": "detect_secrets.filters.heuristic.is_indirect_reference"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"path": "detect_secrets.filters.heuristic.is_likely_id_string"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"path": "detect_secrets.filters.heuristic.is_lock_file"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"path": "detect_secrets.filters.heuristic.is_not_alphanumeric_string"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"path": "detect_secrets.filters.heuristic.is_potential_uuid"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"path": "detect_secrets.filters.heuristic.is_prefixed_with_dollar_sign"
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"path": "detect_secrets.filters.heuristic.is_sequential_string"
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"path": "detect_secrets.filters.heuristic.is_swagger_file"
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"path": "detect_secrets.filters.heuristic.is_templated_secret"
|
|
123
|
+
}
|
|
124
|
+
],
|
|
125
|
+
"results": {},
|
|
126
|
+
"generated_at": "2026-05-10T19:21:47Z"
|
|
127
|
+
}
|