atlan-application-sdk-conformance 0.2.0__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 (59) hide show
  1. atlan_application_sdk_conformance-0.2.0/.gitignore +195 -0
  2. atlan_application_sdk_conformance-0.2.0/CHANGELOG.md +10 -0
  3. atlan_application_sdk_conformance-0.2.0/PKG-INFO +64 -0
  4. atlan_application_sdk_conformance-0.2.0/README.md +39 -0
  5. atlan_application_sdk_conformance-0.2.0/conformance/__init__.py +7 -0
  6. atlan_application_sdk_conformance-0.2.0/conformance/cli.py +126 -0
  7. atlan_application_sdk_conformance-0.2.0/conformance/docs/rules/ci.md +33 -0
  8. atlan_application_sdk_conformance-0.2.0/conformance/docs/rules/error-handling.md +283 -0
  9. atlan_application_sdk_conformance-0.2.0/conformance/docs/rules/logging.md +277 -0
  10. atlan_application_sdk_conformance-0.2.0/conformance/docs/schema-contract.md +255 -0
  11. atlan_application_sdk_conformance-0.2.0/conformance/package-lock.json +1760 -0
  12. atlan_application_sdk_conformance-0.2.0/conformance/package.json +18 -0
  13. atlan_application_sdk_conformance-0.2.0/conformance/programs/areas/ci.prose.md +47 -0
  14. atlan_application_sdk_conformance-0.2.0/conformance/programs/areas/error-handling.prose.md +55 -0
  15. atlan_application_sdk_conformance-0.2.0/conformance/programs/areas/logging.prose.md +47 -0
  16. atlan_application_sdk_conformance-0.2.0/conformance/programs/conformance-remediation.prose.md +85 -0
  17. atlan_application_sdk_conformance-0.2.0/conformance/programs/functions/detect-violations.prose.md +99 -0
  18. atlan_application_sdk_conformance-0.2.0/conformance/programs/functions/orthogonal-gate.prose.md +39 -0
  19. atlan_application_sdk_conformance-0.2.0/conformance/programs/functions/recheck-narrowest.prose.md +51 -0
  20. atlan_application_sdk_conformance-0.2.0/conformance/programs/functions/remediate-finding.prose.md +123 -0
  21. atlan_application_sdk_conformance-0.2.0/conformance/programs/patterns/detect-fix-recheck.prose.md +110 -0
  22. atlan_application_sdk_conformance-0.2.0/conformance/suite/__init__.py +27 -0
  23. atlan_application_sdk_conformance-0.2.0/conformance/suite/checks/__init__.py +1 -0
  24. atlan_application_sdk_conformance-0.2.0/conformance/suite/checks/actions_pinning.py +202 -0
  25. atlan_application_sdk_conformance-0.2.0/conformance/suite/checks/error_handling/__init__.py +212 -0
  26. atlan_application_sdk_conformance-0.2.0/conformance/suite/checks/error_handling/_checker.py +151 -0
  27. atlan_application_sdk_conformance-0.2.0/conformance/suite/checks/error_handling/_collect.py +37 -0
  28. atlan_application_sdk_conformance-0.2.0/conformance/suite/checks/error_handling/_constants.py +115 -0
  29. atlan_application_sdk_conformance-0.2.0/conformance/suite/checks/error_handling/_directives.py +131 -0
  30. atlan_application_sdk_conformance-0.2.0/conformance/suite/checks/error_handling/_helpers.py +225 -0
  31. atlan_application_sdk_conformance-0.2.0/conformance/suite/checks/error_handling/exception_chaining.py +53 -0
  32. atlan_application_sdk_conformance-0.2.0/conformance/suite/checks/error_handling/security.py +49 -0
  33. atlan_application_sdk_conformance-0.2.0/conformance/suite/checks/error_handling/silent_swallow.py +312 -0
  34. atlan_application_sdk_conformance-0.2.0/conformance/suite/checks/error_handling/untyped_raise.py +110 -0
  35. atlan_application_sdk_conformance-0.2.0/conformance/suite/rules/__init__.py +46 -0
  36. atlan_application_sdk_conformance-0.2.0/conformance/suite/rules/ci.py +27 -0
  37. atlan_application_sdk_conformance-0.2.0/conformance/suite/rules/error_handling.py +360 -0
  38. atlan_application_sdk_conformance-0.2.0/conformance/suite/rules/logging.py +336 -0
  39. atlan_application_sdk_conformance-0.2.0/conformance/suite/runner.py +240 -0
  40. atlan_application_sdk_conformance-0.2.0/conformance/suite/schema/__init__.py +78 -0
  41. atlan_application_sdk_conformance-0.2.0/conformance/suite/schema/builder.py +328 -0
  42. atlan_application_sdk_conformance-0.2.0/conformance/suite/schema/catalog.py +120 -0
  43. atlan_application_sdk_conformance-0.2.0/conformance/suite/schema/disposition.py +146 -0
  44. atlan_application_sdk_conformance-0.2.0/conformance/suite/schema/extensions.py +185 -0
  45. atlan_application_sdk_conformance-0.2.0/conformance/suite/schema/findings.py +74 -0
  46. atlan_application_sdk_conformance-0.2.0/conformance/suite/schema/sarif-schema-2.1.0.json +2882 -0
  47. atlan_application_sdk_conformance-0.2.0/conformance/suite/schema/sarif.py +360 -0
  48. atlan_application_sdk_conformance-0.2.0/conformance/suite/schema/validate.py +63 -0
  49. atlan_application_sdk_conformance-0.2.0/conformance/tools/generate_rule_docs.py +295 -0
  50. atlan_application_sdk_conformance-0.2.0/pyproject.toml +51 -0
  51. atlan_application_sdk_conformance-0.2.0/tests/__init__.py +0 -0
  52. atlan_application_sdk_conformance-0.2.0/tests/fixtures/golden_actions_pinning.sarif.json +783 -0
  53. atlan_application_sdk_conformance-0.2.0/tests/fixtures/golden_four_dispositions.sarif.json +207 -0
  54. atlan_application_sdk_conformance-0.2.0/tests/test_actions_pinning.py +183 -0
  55. atlan_application_sdk_conformance-0.2.0/tests/test_catalog.py +221 -0
  56. atlan_application_sdk_conformance-0.2.0/tests/test_disposition.py +178 -0
  57. atlan_application_sdk_conformance-0.2.0/tests/test_error_handling.py +1542 -0
  58. atlan_application_sdk_conformance-0.2.0/tests/test_schema_validation.py +200 -0
  59. atlan_application_sdk_conformance-0.2.0/uv.lock +3068 -0
@@ -0,0 +1,195 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.spec
33
+
34
+ # Installer logs
35
+ pip-log.txt
36
+ pip-delete-this-directory.txt
37
+
38
+ # Unit test / coverage reports
39
+ htmlcov/
40
+ .tox/
41
+ .nox/
42
+ .coverage
43
+ .coverage.*
44
+ .cache
45
+ nosetests.xml
46
+ coverage.xml
47
+ *.cover
48
+ *.py,cover
49
+ .hypothesis/
50
+ .pytest_cache/
51
+ cover/
52
+
53
+ # Translations
54
+ *.mo
55
+ *.pot
56
+
57
+ # Django stuff:
58
+ *.log
59
+ local_settings.py
60
+ db.sqlite3
61
+ db.sqlite3-journal
62
+
63
+ # Flask stuff:
64
+ instance/
65
+ .webassets-cache
66
+
67
+ # Scrapy stuff:
68
+ .scrapy
69
+
70
+ # Sphinx documentation
71
+ docs/_build/
72
+
73
+ # PyBuilder
74
+ .pybuilder/
75
+ target/
76
+
77
+ # Jupyter Notebook
78
+ .ipynb_checkpoints
79
+
80
+ # IPython
81
+ profile_default/
82
+ ipython_config.py
83
+
84
+ # pyenv
85
+ # For a library or package, you might want to ignore these files since the code is
86
+ # intended to run in multiple environments; otherwise, check them in:
87
+ # .python-version
88
+
89
+ # pipenv
90
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
91
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
92
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
93
+ # install all needed dependencies.
94
+ #Pipfile.lock
95
+
96
+ # pdm
97
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
98
+ #pdm.lock
99
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
100
+ # in version control.
101
+ # https://pdm.fming.dev/latest/usage/project/#working-with-version-control
102
+ .pdm.toml
103
+ .pdm-python
104
+ .pdm-build/
105
+
106
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
107
+ __pypackages__/
108
+
109
+ # Celery stuff
110
+ celerybeat-schedule
111
+ celerybeat.pid
112
+
113
+ # SageMath parsed files
114
+ *.sage.py
115
+
116
+ # Environments
117
+ .env
118
+ .venv
119
+ env/
120
+ venv/
121
+ ENV/
122
+ env.bak/
123
+ venv.bak/
124
+
125
+ # Spyder project settings
126
+ .spyderproject
127
+ .spyproject
128
+
129
+ # Rope project settings
130
+ .ropeproject
131
+
132
+ # mkdocs documentation
133
+ docs/site
134
+
135
+ # mypy
136
+ .mypy_cache/
137
+ .dmypy.json
138
+ dmypy.json
139
+
140
+ # Pyre type checker
141
+ .pyre/
142
+
143
+ # pytype static type analyzer
144
+ .pytype/
145
+
146
+ # Cython debug symbols
147
+ cython_debug/
148
+
149
+ # PyCharm
150
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
151
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
152
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
153
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
154
+ .idea/
155
+ .atlan
156
+
157
+ workflow_status.md
158
+
159
+ # Scale data generator
160
+ output
161
+ docs/reference/*.rst
162
+ .DS_Store
163
+
164
+ # Interrogate coverage report
165
+ docstring-cov.md
166
+
167
+ # vscode settings
168
+ .vscode
169
+
170
+ # local
171
+ local/
172
+ temporal.db
173
+
174
+ # Claude Code worktrees
175
+ .claude/worktrees/
176
+
177
+ # Claude Code plans (local working files, not for version control)
178
+ .claude/plans/
179
+ # >>> atlan-builders >>>
180
+ # Managed by atlan-core — edit inside this block and it will be preserved
181
+ # only until the next bootstrap tick. Add your own rules outside the block.
182
+ .atlan/journal/pending.jsonl
183
+ .atlan/journal/.drafts/
184
+ .atlan/cache/
185
+ # <<< atlan-builders <<<
186
+
187
+ # Claude Code runtime lock files
188
+ .claude/scheduled_tasks.lock
189
+
190
+ # Remediation run artifacts
191
+ remediation/node_modules/
192
+ remediation/runs/
193
+
194
+ # Renovate setup
195
+ renovate-config/README.md
@@ -0,0 +1,10 @@
1
+ # Changelog
2
+
3
+ All notable changes to `atlan-application-sdk-conformance` are documented here.
4
+
5
+ ## [0.2.0] - 2026-06-15
6
+
7
+ ### Features
8
+
9
+ - extract conformance suite to standalone publishable package (#2138) ([595d0e8](https://github.com/atlanhq/application-sdk/commit/595d0e8))
10
+
@@ -0,0 +1,64 @@
1
+ Metadata-Version: 2.4
2
+ Name: atlan-application-sdk-conformance
3
+ Version: 0.2.0
4
+ Summary: Conformance suite, remediation programs, and CLI for the Atlan Application SDK
5
+ Author-email: Atlan App Team <connect@atlan.com>
6
+ License-Expression: Apache-2.0
7
+ Keywords: atlan,conformance,linting,remediation,sdk
8
+ Classifier: Development Status :: 4 - Beta
9
+ Classifier: Intended Audience :: Developers
10
+ Classifier: License :: OSI Approved :: Apache Software License
11
+ Classifier: Operating System :: OS Independent
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.11
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Programming Language :: Python :: 3.13
16
+ Classifier: Programming Language :: Python :: 3.14
17
+ Requires-Python: >=3.11
18
+ Requires-Dist: jsonschema<5.0.0,>=4.23.0
19
+ Requires-Dist: pydantic<3.0.0,>=2.10.6
20
+ Provides-Extra: test
21
+ Requires-Dist: atlan-application-sdk; extra == 'test'
22
+ Requires-Dist: pytest-asyncio<2.0.0,>=1.4.0; extra == 'test'
23
+ Requires-Dist: pytest<10.0.0,>=8.3.3; extra == 'test'
24
+ Description-Content-Type: text/markdown
25
+
26
+ # atlan-application-sdk-conformance
27
+
28
+ Dev-only conformance suite, remediation programs, and CLI for the
29
+ [Atlan Application SDK](https://pypi.org/project/atlan-application-sdk/).
30
+
31
+ **Do not add this as a production dependency.** It is intended for developer
32
+ machines and CI only.
33
+
34
+ ## Installation
35
+
36
+ ```bash
37
+ uv add --dev atlan-application-sdk-conformance
38
+ ```
39
+
40
+ ## Usage
41
+
42
+ ```bash
43
+ # Run the conformance suite
44
+ uv run atlan-application-sdk-conformance detect --repo . --series E,L,C --output report.sarif
45
+
46
+ # Get the path to bundled remediation programs (for SKILL.md / reactor)
47
+ uv run atlan-application-sdk-conformance programs-dir
48
+
49
+ # Regenerate rule docs
50
+ uv run atlan-application-sdk-conformance gen-rule-docs
51
+ ```
52
+
53
+ ## In CI
54
+
55
+ Consumer repos should reference this package via the reusable workflow in
56
+ `atlanhq/application-sdk`:
57
+
58
+ ```yaml
59
+ uses: atlanhq/application-sdk/.github/workflows/conformance-reusable.yaml@main
60
+ # No inputs required — the published PyPI package is used by default.
61
+ ```
62
+
63
+ See `conformance/programs/conformance-remediation.prose.md` for the
64
+ `/remediate` skill entry contract.
@@ -0,0 +1,39 @@
1
+ # atlan-application-sdk-conformance
2
+
3
+ Dev-only conformance suite, remediation programs, and CLI for the
4
+ [Atlan Application SDK](https://pypi.org/project/atlan-application-sdk/).
5
+
6
+ **Do not add this as a production dependency.** It is intended for developer
7
+ machines and CI only.
8
+
9
+ ## Installation
10
+
11
+ ```bash
12
+ uv add --dev atlan-application-sdk-conformance
13
+ ```
14
+
15
+ ## Usage
16
+
17
+ ```bash
18
+ # Run the conformance suite
19
+ uv run atlan-application-sdk-conformance detect --repo . --series E,L,C --output report.sarif
20
+
21
+ # Get the path to bundled remediation programs (for SKILL.md / reactor)
22
+ uv run atlan-application-sdk-conformance programs-dir
23
+
24
+ # Regenerate rule docs
25
+ uv run atlan-application-sdk-conformance gen-rule-docs
26
+ ```
27
+
28
+ ## In CI
29
+
30
+ Consumer repos should reference this package via the reusable workflow in
31
+ `atlanhq/application-sdk`:
32
+
33
+ ```yaml
34
+ uses: atlanhq/application-sdk/.github/workflows/conformance-reusable.yaml@main
35
+ # No inputs required — the published PyPI package is used by default.
36
+ ```
37
+
38
+ See `conformance/programs/conformance-remediation.prose.md` for the
39
+ `/remediate` skill entry contract.
@@ -0,0 +1,7 @@
1
+ """Atlan Application SDK Conformance Suite.
2
+
3
+ Dev-only package. Provides the conformance validators, remediation programs,
4
+ and CLI for the atlan-application-sdk ecosystem.
5
+ """
6
+
7
+ __version__ = "0.2.0"
@@ -0,0 +1,126 @@
1
+ """Entry point for the atlan-application-sdk-conformance CLI."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import sys
6
+
7
+
8
+ def _cmd_detect(argv: list[str]) -> int:
9
+ from conformance.suite.runner import main
10
+
11
+ return main(argv)
12
+
13
+
14
+ def _cmd_programs_dir(_argv: list[str]) -> int:
15
+ import importlib.resources as _ir
16
+ import pathlib
17
+
18
+ programs = _ir.files("conformance") / "programs"
19
+ # Resolve to a real filesystem path (works for both installed wheels and
20
+ # editable installs where the files are already on disk).
21
+ try:
22
+ ctx = _ir.as_file(programs)
23
+ with ctx as p:
24
+ print(str(p))
25
+ except (FileNotFoundError, ModuleNotFoundError):
26
+ # Fallback: direct path (editable installs)
27
+ here = pathlib.Path(__file__).parent
28
+ print(str(here / "programs"))
29
+ return 0
30
+
31
+
32
+ def _cmd_gen_rule_docs(argv: list[str]) -> int:
33
+ from conformance.tools.generate_rule_docs import main
34
+
35
+ try:
36
+ main(argv)
37
+ return 0
38
+ except SystemExit as e:
39
+ return int(e.code) if e.code is not None else 0
40
+
41
+
42
+ def _cmd_remediate(argv: list[str]) -> int:
43
+ """Print the resolved programs path + version, then exit.
44
+
45
+ The actual remediation loop is driven by the SKILL.md shim which reads
46
+ the .prose.md contracts from the printed programs directory.
47
+ """
48
+ import pathlib
49
+
50
+ from conformance import __version__
51
+
52
+ here = pathlib.Path(__file__).parent
53
+ programs = here / "programs"
54
+ print(f"atlan-application-sdk-conformance {__version__}")
55
+ print(f"programs: {programs}")
56
+ print(f"entry: {programs / 'conformance-remediation.prose.md'}")
57
+ return 0
58
+
59
+
60
+ # The SKILL.md written by `bootstrap`. Keep it minimal and stable — the real
61
+ # logic lives in the package; this shim just locates and invokes it.
62
+ _SKILL_MD = """\
63
+ ---
64
+ name: remediate
65
+ description: Drive the conformance remediation loop (validators + OpenProse programs from the atlan-application-sdk-conformance package)
66
+ argument-hint: "[--area error-handling|logging|ci] [--strict] [path]"
67
+ ---
68
+
69
+ 1. Resolve programs dir:
70
+ - Inside a connector repo: `PROGRAMS=$(uv run atlan-application-sdk-conformance programs-dir)`
71
+ - Anywhere else: `PROGRAMS=$(uvx atlan-application-sdk-conformance@latest programs-dir)`
72
+ 2. Read `$PROGRAMS/conformance-remediation.prose.md` and execute it as the entry contract.
73
+ 3. All gated re-checks call `atlan-application-sdk-conformance detect` — follow the .prose.md exactly.
74
+ """
75
+
76
+
77
+ def _cmd_bootstrap(argv: list[str]) -> int:
78
+ """Write .claude/skills/remediate/SKILL.md in the current repo (or --force to overwrite)."""
79
+ import pathlib
80
+
81
+ force = "--force" in argv
82
+ dest = pathlib.Path.cwd() / ".claude" / "skills" / "remediate" / "SKILL.md"
83
+
84
+ if dest.exists() and not force:
85
+ print(f"already installed: {dest} (pass --force to overwrite)")
86
+ return 0
87
+
88
+ existed = dest.exists()
89
+ dest.parent.mkdir(parents=True, exist_ok=True)
90
+ dest.write_text(_SKILL_MD)
91
+ action = "updated" if existed else "installed"
92
+ print(f"{action}: {dest}")
93
+ return 0
94
+
95
+
96
+ _COMMANDS = {
97
+ "detect": _cmd_detect,
98
+ "programs-dir": _cmd_programs_dir,
99
+ "gen-rule-docs": _cmd_gen_rule_docs,
100
+ "remediate": _cmd_remediate,
101
+ "bootstrap": _cmd_bootstrap,
102
+ }
103
+
104
+ _USAGE = """\
105
+ usage: atlan-application-sdk-conformance <command> [args]
106
+
107
+ commands:
108
+ detect Run the conformance suite and emit SARIF
109
+ programs-dir Print the absolute path to the bundled .prose.md programs
110
+ gen-rule-docs Regenerate rule docs from Python rule definitions
111
+ remediate Print programs path + version banner (SKILL.md drives execution)
112
+ bootstrap Write ~/.claude/skills/remediate/SKILL.md (--force to overwrite)
113
+ """
114
+
115
+
116
+ def main() -> None:
117
+ if len(sys.argv) < 2 or sys.argv[1] in ("-h", "--help"):
118
+ print(_USAGE)
119
+ sys.exit(0)
120
+
121
+ cmd = sys.argv[1]
122
+ if cmd not in _COMMANDS:
123
+ print(f"error: unknown command '{cmd}'\n{_USAGE}", file=sys.stderr)
124
+ sys.exit(1)
125
+
126
+ sys.exit(_COMMANDS[cmd](sys.argv[2:]))
@@ -0,0 +1,33 @@
1
+ <!-- AUTO-GENERATED — do not edit this file directly.
2
+ Source of truth: conformance/suite/rules/ci.py
3
+ To regenerate: uv run poe generate-rule-docs
4
+ To check CI staleness: uv run poe generate-rule-docs --check -->
5
+
6
+ # CI/Workflow Supply-Chain Rules (C-series)
7
+
8
+ **1 rule** · Checker: `suite.checks.actions_pinning` and related workflow checks (static)
9
+
10
+ Suppress a finding on the violating line or the line directly above it:
11
+
12
+ ```python
13
+ # conformance: ignore[C001] intentional: org-internal action
14
+ ```
15
+
16
+ | ID | Name | Tier | Category | Autofixable | Since |
17
+ |---|---|---|---|---|---|
18
+ | [C001](#c001) | `UnpinnedActionReference` | `block` | `supply-chain` | yes | 3.16.0 |
19
+
20
+ ---
21
+
22
+ ## C001 — `UnpinnedActionReference` {#c001}
23
+
24
+ **Tier:** `block` · **Category:** `supply-chain` · **Autofixable:** yes · **Since:** 3.16.0
25
+
26
+ > External GitHub Action not pinned to a full commit digest
27
+
28
+ External actions reused via `uses:` must be pinned to a full-length commit SHA (digest),
29
+ never a mutable tag (@v4) or branch (@main). A tag can be re-pointed to malicious code
30
+ after review. Actions in the `atlanhq/` org are exempt (they intentionally track @main);
31
+ local `./` composite-action refs are exempt (no version to pin).
32
+
33
+ ---