adre-cli 0.1.0__py3-none-any.whl
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.
- adre/__init__.py +5 -0
- adre/analyzers/__init__.py +1 -0
- adre/analyzers/architecture.py +253 -0
- adre/analyzers/findings.py +457 -0
- adre/analyzers/inference.py +163 -0
- adre/cli.py +923 -0
- adre/core/__init__.py +1 -0
- adre/core/accepted.py +225 -0
- adre/core/adaptive.py +221 -0
- adre/core/baseline.py +1165 -0
- adre/core/config.py +60 -0
- adre/core/decision_engine.py +361 -0
- adre/core/declared.py +313 -0
- adre/core/evolution_intelligence.py +390 -0
- adre/core/explainer.py +413 -0
- adre/core/git_intelligence.py +392 -0
- adre/core/github_check.py +212 -0
- adre/core/incremental.py +288 -0
- adre/core/layers.py +306 -0
- adre/core/pr_intelligence.py +261 -0
- adre/core/pr_review.py +454 -0
- adre/core/prioritization.py +196 -0
- adre/core/project.py +41 -0
- adre/core/refactor_intelligence.py +201 -0
- adre/core/repositories.py +312 -0
- adre/core/review.py +96 -0
- adre/core/rules_shared.py +75 -0
- adre/core/sarif.py +141 -0
- adre/core/scope.py +141 -0
- adre/core/snapshots.py +242 -0
- adre/core/stability_intelligence.py +361 -0
- adre/graph/__init__.py +0 -0
- adre/graph/dependencies.py +379 -0
- adre/parsers/__init__.py +87 -0
- adre/parsers/go.py +140 -0
- adre/parsers/javascript.py +364 -0
- adre/parsers/jvm.py +127 -0
- adre/parsers/python.py +153 -0
- adre/reports/__init__.py +1 -0
- adre/reports/architecture.py +349 -0
- adre/rules.py +12 -0
- adre/web.py +3731 -0
- adre_cli-0.1.0.dist-info/METADATA +343 -0
- adre_cli-0.1.0.dist-info/RECORD +48 -0
- adre_cli-0.1.0.dist-info/WHEEL +5 -0
- adre_cli-0.1.0.dist-info/entry_points.txt +2 -0
- adre_cli-0.1.0.dist-info/licenses/LICENSE +202 -0
- adre_cli-0.1.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,343 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: adre-cli
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Architecture Drift Review Engine: learn a repository's architecture and flag pull requests that drift from it.
|
|
5
|
+
License: Apache-2.0
|
|
6
|
+
Project-URL: Homepage, https://github.com/christiangebru/architect-reviewer
|
|
7
|
+
Project-URL: Issues, https://github.com/christiangebru/architect-reviewer/issues
|
|
8
|
+
Project-URL: Changelog, https://github.com/christiangebru/architect-reviewer/blob/main/CHANGELOG.md
|
|
9
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Environment :: Console
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
|
14
|
+
Requires-Python: >=3.9
|
|
15
|
+
Description-Content-Type: text/markdown
|
|
16
|
+
License-File: LICENSE
|
|
17
|
+
Provides-Extra: web
|
|
18
|
+
Requires-Dist: fastapi>=0.110; extra == "web"
|
|
19
|
+
Requires-Dist: uvicorn>=0.27; extra == "web"
|
|
20
|
+
Dynamic: license-file
|
|
21
|
+
|
|
22
|
+
# ADRE — Architecture Drift Review Engine
|
|
23
|
+
|
|
24
|
+
**Zero-config architecture guardrails for pull requests.** ADRE learns the architecture your repository already follows, then fails a pull request only when *that pull request* breaks it: a controller reaching past the service layer into a repository, a reversed dependency, direct database access outside the persistence layer, a new import cycle.
|
|
25
|
+
|
|
26
|
+
- **No rules to write.** Layers and dependency directions are inferred from the code and saved as a reviewable baseline. If you do want rules, declare them in `.adre/architecture.json`, and they are enforced even where inference finds nothing.
|
|
27
|
+
- **Only new drift.** The PR head is compared with its base commit, renames included, so existing debt and unrelated files never fail a PR.
|
|
28
|
+
- **Deterministic and explained.** Every finding names the changed import, the established path it breaks, the evidence and a confidence. No LLM in the loop.
|
|
29
|
+
- **Built for CI.** One GitHub Action step, annotations on the offending line, SARIF for code scanning, JSON for everything else. The CLI has no dependencies.
|
|
30
|
+
- **Python, JavaScript/TypeScript, Java, Kotlin and Go.**
|
|
31
|
+
|
|
32
|
+
### How it compares
|
|
33
|
+
|
|
34
|
+
| | Rules required | Gates PRs on new drift only | Indirect (chain) violations | Languages |
|
|
35
|
+
|---|---|---|---|---|
|
|
36
|
+
| **ADRE** | No (optional declared rules) | Yes, against the base commit | Yes, for declared layers | Python, JS/TS, Java, Kotlin, Go |
|
|
37
|
+
| SonarQube architecture (2025+) | Yes, intended architecture | Through quality gates | Not documented | Java, C#, JS/TS, Python |
|
|
38
|
+
| import-linter | Yes, contracts | No (whole-repo check, ignore list) | Yes | Python |
|
|
39
|
+
| Tach | Yes, module config | No (whole-repo check) | Not documented | Python |
|
|
40
|
+
| dependency-cruiser | Yes, rules | With a known-violations baseline | Via rules | JS/TS |
|
|
41
|
+
| ArchUnit | Yes, tests in code | With frozen violation stores | Via rules | Java/JVM |
|
|
42
|
+
|
|
43
|
+
ADRE is the option for teams that want guardrails on day one without writing an architecture spec first, and that review many AI-assisted pull requests. See [ROADMAP.md](ROADMAP.md) for what is next.
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## Core workflow
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
Repository
|
|
51
|
+
→ parse and graph
|
|
52
|
+
→ ArchitectureBaseline
|
|
53
|
+
→ save accepted baseline
|
|
54
|
+
→ review later changes / pull requests
|
|
55
|
+
→ evidence-backed drift
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
If a repository establishes:
|
|
59
|
+
|
|
60
|
+
`Controller → Service → Repository → Database`
|
|
61
|
+
|
|
62
|
+
and a change introduces:
|
|
63
|
+
|
|
64
|
+
`Controller → Database`
|
|
65
|
+
|
|
66
|
+
the reviewer reports architectural drift with the changed edge, the established path, evidence, and confidence.
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## Supported languages
|
|
71
|
+
|
|
72
|
+
- Python (AST)
|
|
73
|
+
- JavaScript / TypeScript (import analysis, including multi-line imports, `tsconfig.json` / `jsconfig.json` `baseUrl` and `paths` aliases, and ESM `./x.js` imports of `x.ts` sources)
|
|
74
|
+
- Java and Kotlin (`package`/`import` analysis: fully qualified, static and wildcard imports, Kotlin aliases and top-level functions; JPA, Hibernate, JDBC, Spring Data and similar imports count as database access)
|
|
75
|
+
- Go (import paths inside the module from the nearest `go.mod`; an import depends on every non-test file of that package; `database/sql`, GORM, pgx, sqlx and similar count as database access)
|
|
76
|
+
|
|
77
|
+
Python `from package import module` resolves to the submodule file, including namespace packages without `__init__.py`.
|
|
78
|
+
|
|
79
|
+
Unsupported languages are counted and skipped. Repository source is never executed.
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## Install
|
|
84
|
+
|
|
85
|
+
```
|
|
86
|
+
pip install adre-cli # CLI only, no dependencies
|
|
87
|
+
pip install "adre-cli[web]" # plus the local web UI
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Until the first PyPI release is published, install from GitHub instead: `pip install "git+https://github.com/christiangebru/architect-reviewer@v0.1.0"`.
|
|
91
|
+
|
|
92
|
+
This installs the `adre` command (the package is `adre-cli` because `adre` is taken on PyPI). From a source checkout, `./bin/adre` runs the same CLI without installing anything.
|
|
93
|
+
|
|
94
|
+
## CLI
|
|
95
|
+
|
|
96
|
+
Analyze current code (does not save a baseline):
|
|
97
|
+
|
|
98
|
+
```
|
|
99
|
+
adre analyze ./my-repository
|
|
100
|
+
adre analyze ./my-repository --select src/controllers
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Save the accepted architecture:
|
|
104
|
+
|
|
105
|
+
```
|
|
106
|
+
adre baseline ./my-repository
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
This writes `.adre/baseline.json`. Commit that file on the default branch.
|
|
110
|
+
|
|
111
|
+
Compare the current tree against a saved baseline:
|
|
112
|
+
|
|
113
|
+
```
|
|
114
|
+
adre review ./my-repository
|
|
115
|
+
adre review ./my-repository --against .adre/baseline.json
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Start the local web UI (needs the `web` extra; binds to 127.0.0.1 by default):
|
|
119
|
+
|
|
120
|
+
```
|
|
121
|
+
adre web --port 8000
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
The web UI gives the same answers as the CLI: **Review against baseline** runs exactly what `adre review` runs (baseline, declared rules, accepted and stale exceptions), and **Review a branch** runs the same pull-request review as the GitHub Action for the checked-out branch against a base you choose.
|
|
125
|
+
|
|
126
|
+
It only answers on localhost. Requests with another `Host` header or that the browser marks as cross-site are refused, and every action that changes something (saving a baseline, cloning or registering a repository, pinning, opening your editor) is a POST carrying a per-process token, so other websites cannot trigger them. Binding to another interface with `--host` prints a warning.
|
|
127
|
+
|
|
128
|
+
Review a pull request (current checkout is HEAD):
|
|
129
|
+
|
|
130
|
+
```
|
|
131
|
+
adre pr-review <base-sha-or-branch> HEAD
|
|
132
|
+
adre pr-check origin/main HEAD
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
Statuses:
|
|
136
|
+
|
|
137
|
+
- `PASS` (exit 0) — no new drift versus the accepted baseline
|
|
138
|
+
- `DRIFT` (exit 2) — new architectural drift in the PR
|
|
139
|
+
- `BASELINE_REQUIRED` (exit 3) — no `.adre/baseline.json` on the base ref
|
|
140
|
+
- `BASELINE_INVALID` (exit 1) — baseline could not be loaded
|
|
141
|
+
- `ERROR` (exit 1) — git or analysis failure
|
|
142
|
+
|
|
143
|
+
`pr-review` uses the baseline for the accepted architecture model (layers, directions, established paths), and analyzes the base commit in a throwaway clone to decide what is new. Only dependencies, cycles, and database imports that the PR adds relative to the base tree are reported. As a result:
|
|
144
|
+
|
|
145
|
+
- problems that already exist on the base branch are not blamed on the PR, even if they were merged after the baseline was saved
|
|
146
|
+
- renamed or moved files (detected by `git diff -M`) do not count as new dependencies
|
|
147
|
+
|
|
148
|
+
If the base tree cannot be analyzed, the review falls back to comparing against the saved baseline's own edges and says so in the output.
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
## GitHub Actions
|
|
153
|
+
|
|
154
|
+
ADRE ships as a GitHub Action. Add it to any repository:
|
|
155
|
+
|
|
156
|
+
```yaml
|
|
157
|
+
name: Architecture
|
|
158
|
+
on:
|
|
159
|
+
pull_request:
|
|
160
|
+
|
|
161
|
+
permissions:
|
|
162
|
+
contents: read
|
|
163
|
+
|
|
164
|
+
jobs:
|
|
165
|
+
drift:
|
|
166
|
+
runs-on: ubuntu-latest
|
|
167
|
+
steps:
|
|
168
|
+
- uses: actions/checkout@v4
|
|
169
|
+
with:
|
|
170
|
+
fetch-depth: 0 # the base commit and merge base must exist
|
|
171
|
+
- uses: christiangebru/architect-reviewer@v0.1.0 # or @v0 for the latest 0.x, or a commit SHA
|
|
172
|
+
with:
|
|
173
|
+
path: . # project directory inside the repository
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
The action compares the checked-out PR tree with the base commit, using `.adre/baseline.json` from the base commit as the accepted architecture, and fails the job on new drift. It writes the check summary to the job summary, adds an inline annotation on each finding (repository-relative paths, so projects in subdirectories work), and sets outputs `status`, `drift-count`, `accepted-count` and `sarif-file`.
|
|
177
|
+
|
|
178
|
+
| Input | Default | |
|
|
179
|
+
|---|---|---|
|
|
180
|
+
| `path` | `.` | Project directory to analyze |
|
|
181
|
+
| `base` | PR base SHA | Base commit or ref |
|
|
182
|
+
| `head` | `github.sha` | Checked-out commit |
|
|
183
|
+
| `baseline` | base commit's `.adre/baseline.json` | Baseline file |
|
|
184
|
+
| `sarif-file` | (none) | Also write SARIF 2.1.0 here |
|
|
185
|
+
| `python-version` | `3.12` | Python used to run ADRE |
|
|
186
|
+
| `setup-python` | `true` | `false` uses the runner's Python |
|
|
187
|
+
|
|
188
|
+
To show findings in GitHub code scanning, write SARIF and upload it even when the check fails (needs `security-events: write`; private repositories need GitHub Advanced Security):
|
|
189
|
+
|
|
190
|
+
```yaml
|
|
191
|
+
- uses: christiangebru/architect-reviewer@v0.1.0
|
|
192
|
+
id: adre
|
|
193
|
+
with:
|
|
194
|
+
sarif-file: adre.sarif
|
|
195
|
+
- uses: github/codeql-action/upload-sarif@v3
|
|
196
|
+
if: always() && steps.adre.outputs.sarif-file != ''
|
|
197
|
+
with:
|
|
198
|
+
sarif_file: adre.sarif
|
|
199
|
+
category: adre
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
Commit a baseline on the default branch before relying on CI:
|
|
203
|
+
|
|
204
|
+
```
|
|
205
|
+
adre baseline .
|
|
206
|
+
git add .adre/baseline.json
|
|
207
|
+
git commit -m "Save architecture baseline"
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
`.adre/baseline.json` and `.adre/accepted.json` are meant to be committed. `.adre/parse-cache.json` stays local and is gitignored.
|
|
211
|
+
|
|
212
|
+
`pr-review` analyzes the current checkout. In CI that is the pull request merge commit (`github.sha`). Locally, check out the PR head first.
|
|
213
|
+
|
|
214
|
+
Machine-readable output for other CI systems:
|
|
215
|
+
|
|
216
|
+
```
|
|
217
|
+
adre pr-review origin/main HEAD --format json
|
|
218
|
+
adre pr-review origin/main HEAD --sarif adre.sarif
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
---
|
|
222
|
+
|
|
223
|
+
## What counts as drift
|
|
224
|
+
|
|
225
|
+
Drift is a **new** relationship that contradicts the accepted ArchitectureBaseline.
|
|
226
|
+
|
|
227
|
+
Typical drift:
|
|
228
|
+
|
|
229
|
+
- a presentation module skipping an established service/repository path
|
|
230
|
+
- a module reversing an established dependency direction
|
|
231
|
+
- a new circular dependency: a file joining a group of files that import each other at load time, or two such groups merging
|
|
232
|
+
- direct database access after a repository/persistence boundary was established
|
|
233
|
+
|
|
234
|
+
Not drift:
|
|
235
|
+
|
|
236
|
+
- problems that already exist in the saved baseline
|
|
237
|
+
- documentation, config, or test-only changes
|
|
238
|
+
- imports of standard library or third-party packages
|
|
239
|
+
- utility/shared imports that are not established layer boundaries
|
|
240
|
+
- a repository that never demonstrated a layered architecture in the first place
|
|
241
|
+
|
|
242
|
+
---
|
|
243
|
+
|
|
244
|
+
## Accepting an intentional crossing
|
|
245
|
+
|
|
246
|
+
Record intentional exceptions in `.adre/accepted.json` instead of re-saving the whole baseline:
|
|
247
|
+
|
|
248
|
+
```json
|
|
249
|
+
{
|
|
250
|
+
"accepted": [
|
|
251
|
+
{
|
|
252
|
+
"from": "controllers/admin_controller.py",
|
|
253
|
+
"to": "repositories/*",
|
|
254
|
+
"type": "layer_skip",
|
|
255
|
+
"reason": "Admin bulk export reads repositories directly (ARCH-12)."
|
|
256
|
+
}
|
|
257
|
+
]
|
|
258
|
+
}
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
- `from` and `to` are glob patterns over project-relative paths (`*` also matches `/`). `to` defaults to `*`.
|
|
262
|
+
- For `repository_bypass`, `to` matches the database module, e.g. `sqlite3`. For `cycle`, `from` must match every file that joined the cycle group and `to` matches any file in it.
|
|
263
|
+
- `type` is optional: one of `layer_skip`, `layer_violation`, `unexpected_dependency`, `repository_bypass`, `cycle`, or a list.
|
|
264
|
+
- `reason` is required.
|
|
265
|
+
- Entries that no longer match any dependency, database import or cycle group are listed as **stale** in `review` and in the PR check. Add `"fail_on_stale": true` next to `"accepted"` to make stale entries fail the check, so old exceptions cannot quietly hide a future regression.
|
|
266
|
+
|
|
267
|
+
`review` and `pr-review` read the file from the checked-out tree, so a pull request can accept its own crossing. That change is part of the PR diff, the check summary lists every accepted finding with its reason, and it calls out PRs that edit `accepted.json`. Protect `.adre/` with CODEOWNERS if exceptions need a specific reviewer. An invalid file fails the check rather than being ignored.
|
|
268
|
+
|
|
269
|
+
## Declaring the intended architecture
|
|
270
|
+
|
|
271
|
+
Inference needs repeated structure to work. To state the architecture you want, add `.adre/architecture.json`:
|
|
272
|
+
|
|
273
|
+
```json
|
|
274
|
+
{
|
|
275
|
+
"layers": [
|
|
276
|
+
{"name": "presentation", "paths": ["src/controllers/*", "src/routes/*"]},
|
|
277
|
+
{"name": "application", "paths": ["src/services/*"]},
|
|
278
|
+
{"name": "data", "paths": ["src/repositories/*"]}
|
|
279
|
+
],
|
|
280
|
+
"strict": false,
|
|
281
|
+
"forbidden": [
|
|
282
|
+
{"from": "src/services/*", "to": "src/vendor_sdk/*", "reason": "Call vendors through the gateway."}
|
|
283
|
+
]
|
|
284
|
+
}
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
- Layers are listed top to bottom. A layer may import layers below it, never one above it, **directly or through a chain of other modules** (`indirect_violation`). With `"strict": true` a layer may only import the next layer down.
|
|
288
|
+
- `forbidden` rules ban specific dependencies. Paths are glob patterns over project-relative paths; a file belongs to the first layer that matches it.
|
|
289
|
+
- Declared rules work with or without a saved baseline. Without one, `review` checks every current dependency and `pr-review` checks what the PR adds.
|
|
290
|
+
- `pr-review` reads the rules from the **base commit**, so a pull request cannot loosen the rules it is checked against; a PR that edits them gets a note that the change applies after merge. Exceptions for a single PR still go in `accepted.json`.
|
|
291
|
+
- Declared findings replace inferred findings for the same import.
|
|
292
|
+
|
|
293
|
+
---
|
|
294
|
+
|
|
295
|
+
## Incremental analysis
|
|
296
|
+
|
|
297
|
+
Unchanged files are reused from `.adre/parse-cache.json` by content hash. Changed and added files are reparsed. The accepted baseline and the parse cache are separate files. `analyze` never overwrites the accepted baseline.
|
|
298
|
+
|
|
299
|
+
---
|
|
300
|
+
|
|
301
|
+
## Limitations
|
|
302
|
+
|
|
303
|
+
- Architecture is inferred from observed structure, not from preferred styles such as MVC or DDD.
|
|
304
|
+
- Framework apps that use an ORM from routes/views are not assumed to have a repository boundary.
|
|
305
|
+
- Generic folder names such as `core`, `lib`, `app`, and `src` are not treated as architecture layers by themselves.
|
|
306
|
+
- Test, example, vendor, generated, migration, and docs directories are skipped so they do not distort the baseline.
|
|
307
|
+
- Layer roles come from folder and file names. An ambiguous folder (`queries`, `commands`, `models`, `schemas`, `entities`, `handlers`, `interfaces`) inside a layer folder with a different role takes that outer role: `app/db/queries/` is data, `app/api/schemas/` is presentation. On its own, `queries/` is still application.
|
|
308
|
+
- Database access means importing a driver or ORM package. Relative imports and imports that resolve to a project file (a local `pg.py`) are not database access.
|
|
309
|
+
- GitHub annotations include a line number only when the parser recorded one. Missing lines are not invented.
|
|
310
|
+
- Incremental reuse is parse-level; the graph and findings are still rebuilt from the mixed index.
|
|
311
|
+
- C#, Ruby, PHP, Rust and Swift are not parsed yet. Java same-package references need no import, so they are not visible. Go `replace` directives are not followed.
|
|
312
|
+
- Indirect violations are checked for declared layers only, and are skipped when a single comparison adds more than 500 new dependencies.
|
|
313
|
+
- Only relative `extends` in `tsconfig.json` are followed; aliases defined in an npm-package base config are not resolved. Workspace package names (`@org/pkg` resolved through `node_modules` symlinks) are not resolved either.
|
|
314
|
+
- Changing the analyzer version changes which edges are detected. `pr-review` analyzes both trees with the same version, so this is safe there; re-save the baseline before using `review` against an older baseline.
|
|
315
|
+
- There is no LLM layer. Findings are deterministic and evidence-backed.
|
|
316
|
+
- Cycles are detected on the import-time graph only. Imports inside `if TYPE_CHECKING:`, TypeScript `import type` / all-`type` named imports, function-local imports, and dynamic `import()` still count as dependencies for layer drift, but cannot form a cycle.
|
|
317
|
+
- Cycles are tracked as groups of files that import each other (strongly connected components). A new import between files already in the same group is not new drift; a file joining a group is.
|
|
318
|
+
- Intentional load-time cycles, such as the Flask pattern of importing routes at the bottom of a package `__init__.py`, are still reported. If they already exist in the baseline or on the base branch they are not new PR drift.
|
|
319
|
+
|
|
320
|
+
---
|
|
321
|
+
|
|
322
|
+
## Development
|
|
323
|
+
|
|
324
|
+
The CLI and engine use only the Python standard library (3.9+). All code lives in the `adre` package; FastAPI and Uvicorn are only needed for the optional web UI (`adre/web.py`, extra `web`).
|
|
325
|
+
|
|
326
|
+
```
|
|
327
|
+
pip install -e ".[web]" # same as: pip install -r requirements.txt
|
|
328
|
+
python3 -m unittest discover
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
Web UI tests are skipped when FastAPI is not installed. CI runs the suite on Python 3.9 and 3.12, and this repository checks its own pull requests with its own action against its committed baseline.
|
|
332
|
+
|
|
333
|
+
---
|
|
334
|
+
|
|
335
|
+
## Status
|
|
336
|
+
|
|
337
|
+
Active product. The architecture baseline and PR review path are the source of truth for drift.
|
|
338
|
+
|
|
339
|
+
---
|
|
340
|
+
|
|
341
|
+
## License
|
|
342
|
+
|
|
343
|
+
Apache License 2.0. See [LICENSE](LICENSE).
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
adre/__init__.py,sha256=BOj_zY50mvdfE9FCBfOWO7aWyNahqBVpy5qG1nBUaFM,219
|
|
2
|
+
adre/cli.py,sha256=ax8oYJe8h5l3SPwAAlEkVQzS5XjQAC5h7TFut8uiFSg,37756
|
|
3
|
+
adre/rules.py,sha256=DjMQgy7Hg44xxN7gWojtDx_cD77vdEhbunImiYIjyjA,402
|
|
4
|
+
adre/web.py,sha256=PPUaRQiam7ugMy3-JIWJrGx3OlSztbhMUHsUmWGBma0,170086
|
|
5
|
+
adre/analyzers/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
6
|
+
adre/analyzers/architecture.py,sha256=LT9w8P50rinaWB9d8Q0fpI2rUT0Ej9Lpnv3bDGw5BCc,10066
|
|
7
|
+
adre/analyzers/findings.py,sha256=oDnYII7j4xFH3Wd76udQErTM_vtxi-RImTiU5A0ywKA,20160
|
|
8
|
+
adre/analyzers/inference.py,sha256=4IGiunjGUU5cogSgJ01laUDcGF3OzDdzXZXmQ41sve0,6339
|
|
9
|
+
adre/core/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
10
|
+
adre/core/accepted.py,sha256=lfTmFdlL0MX5nmyM_jBg-6MYmxrHoZ2IDQsA7RtJH7I,8550
|
|
11
|
+
adre/core/adaptive.py,sha256=65u5mI_I4m-H2L7nvtwhO-hb9P9HUggAsMtebssy1M4,8944
|
|
12
|
+
adre/core/baseline.py,sha256=TiWwCRwFNjd-5hX_PLdjFV-khiYsbZJoDnFpUo9tj-M,48372
|
|
13
|
+
adre/core/config.py,sha256=0AE8W6xHa13O9voMG5DGW1tiz19ZwI9niyuMd3rz6g4,1091
|
|
14
|
+
adre/core/decision_engine.py,sha256=rLxdYRZdrQGvKbWBpYKlZVkff8CsZsw-kAYWvLuCoyg,13899
|
|
15
|
+
adre/core/declared.py,sha256=JKg8h4XIcLsFpukn7PGF2tqUFi5gE_i1C744o7QPkHo,12517
|
|
16
|
+
adre/core/evolution_intelligence.py,sha256=k2722vq_JLzFJao1eyRTDB9KQ0J39fDZt7lQUW8W9GA,14139
|
|
17
|
+
adre/core/explainer.py,sha256=6Kv-6p3h3TSkyvXmFLKutaKupuIIB-REwOgQF13NTsM,15801
|
|
18
|
+
adre/core/git_intelligence.py,sha256=1w1Hk6hF6DDTVRh5zu-7VRyqdyOBO5SahkVwu0hX9xw,13874
|
|
19
|
+
adre/core/github_check.py,sha256=aaFi_V3S5D7JqwIYMeWvAucRKHt0I6uvk20-qlPbPIY,8334
|
|
20
|
+
adre/core/incremental.py,sha256=9ph-sjGpcmaznTUtC5jCvRweORGiieHF4bcHdtey9LY,10445
|
|
21
|
+
adre/core/layers.py,sha256=Zv0AqMdfSAcLhDRKVQyvFQq702S5-fRLdZ8GK3uMw0o,10647
|
|
22
|
+
adre/core/pr_intelligence.py,sha256=B0NSrZotQgeO0ZnK_3HV2cz0OHav8pjdMbJNMTjM_IU,10215
|
|
23
|
+
adre/core/pr_review.py,sha256=bR0XxBMjsAKl60-wj-NOxaxA-P-23nk_uhjyKNmq2Xw,16545
|
|
24
|
+
adre/core/prioritization.py,sha256=YIQ9A_N0LjXjxCyFBi3TFfCIgAj2zCzomfAR85oIy_g,5227
|
|
25
|
+
adre/core/project.py,sha256=ufrN5ETZKsf3ZXgt_trD0_qmhGeWDTZP8V-37jI3eME,1161
|
|
26
|
+
adre/core/refactor_intelligence.py,sha256=6TD38iuq-3A2MJUKn--d7Sr-yK_vLs1TUIa7KM9MdU4,7005
|
|
27
|
+
adre/core/repositories.py,sha256=7PtjmE2pMNScFdx-QkCOu_twd8qWr_-i1RTHwy-xfDU,11091
|
|
28
|
+
adre/core/review.py,sha256=Fh3owiKv-seVAszy-drzBMx_zcRM3Lg3owc1t4rYsWw,3785
|
|
29
|
+
adre/core/rules_shared.py,sha256=gYKXbH4CpCI3QCYc36MxSFGP1g-ppI4hIv24Ylz2HEU,1976
|
|
30
|
+
adre/core/sarif.py,sha256=sYT4p6Ekr237D1JUc_wiidKm57GrSgmO9NxiVRVHoJ8,5478
|
|
31
|
+
adre/core/scope.py,sha256=JRfxsQTuXEJ4mqkMdSj0gy-GXR3AT4bfBblbYvryOgM,4653
|
|
32
|
+
adre/core/snapshots.py,sha256=7V9YW9RIz7j6fLyrdXKyV6uDldbXpQR_92-VMgoCaSU,8553
|
|
33
|
+
adre/core/stability_intelligence.py,sha256=15kAlhBYdkeFNgX3CeSak8x11wY5XG-mvIS62N3bMo4,13313
|
|
34
|
+
adre/graph/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
35
|
+
adre/graph/dependencies.py,sha256=FYB7VTdOYoab_vv4QOc6bc_7bbQVdjtIPo9Q5cWMqkk,13459
|
|
36
|
+
adre/parsers/__init__.py,sha256=j1pQeo7NJy7yzA_HdHNBJlnlBIapt8zk19r1BamJn3E,3105
|
|
37
|
+
adre/parsers/go.py,sha256=_075gO-p_XALhdfG7ovkaYDQ0v65QlBe_cA0ETGL3SU,4964
|
|
38
|
+
adre/parsers/javascript.py,sha256=bV75JPK2GwwLMBqSqfowvCQemyyt34g_DQJatyfvAVY,13580
|
|
39
|
+
adre/parsers/jvm.py,sha256=EXqgiE_byMwOG55_zeN_qYV9zl3vsq1koXu0T0ydtGY,4445
|
|
40
|
+
adre/parsers/python.py,sha256=I17IByxgNFxx18er5X_JaHPGFaJGZ3yphpARhsSspy0,5403
|
|
41
|
+
adre/reports/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
42
|
+
adre/reports/architecture.py,sha256=UuNvLEO6M0G7647DKw9YZoWOYHKORUNVqA9KgP6iiyY,17118
|
|
43
|
+
adre_cli-0.1.0.dist-info/licenses/LICENSE,sha256=y16Ofl9KOYjhBjwULGDcLfdWBfTEZRXnduOspt-XbhQ,11325
|
|
44
|
+
adre_cli-0.1.0.dist-info/METADATA,sha256=684GqrhQSD4f0Ta30Fbn3SyPuVp_nxFf2fzSYJfGrVQ,16830
|
|
45
|
+
adre_cli-0.1.0.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
|
|
46
|
+
adre_cli-0.1.0.dist-info/entry_points.txt,sha256=xN9ZE6PoNBmKghchhJY-qXwzBIZTJewwYhWHNSKT8zU,39
|
|
47
|
+
adre_cli-0.1.0.dist-info/top_level.txt,sha256=08sX1MpVIZ2RpHxi8sarxFU1RLsSl97VMrM1ofXQhQ0,5
|
|
48
|
+
adre_cli-0.1.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "{}"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright {yyyy} {name of copyright owner}
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
|
202
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
adre
|