Repository navigation
fix(zoom-html): show business domains in projects organised by type - #61
Merged
Merged
Conversation
Type folders (Controller, Command, Form, Enum, DataFixtures...) are never domains; unplaced classes go to an explicit Common group. Refs #58 Co-Authored-By: Claude <noreply@anthropic.com>
|
Thanks for the pull request, @alexwrite. A maintainer will review it soon. Want to talk it through while it is in review? Come join us on our Discord server. For longer-form discussion there is also GitHub Discussions. A couple of things that speed up review: make sure the test suite passes on Python 3.10 and 3.13, and that the change keeps extraction deterministic. |
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
Closes #58 on merge. On a Symfony project organised by type (
src/Controller/,src/Service/,src/Command/...), level 1 ofzoom-htmlpresented type folders as domains (Command,Form,Enum,EventSubscriber,DataFixtures), put 290 classes in "(no domain)" and folded 89 small domains. The business split lives one level lower:src/Service/<Domain>/,src/Controller/<Domain>/.Fix
_TYPE_DIRS: closed list of folder names that framework generators give to a kind of class (Symfony maker, Laravelmake:*) plus the layer folders. Never a business domain.detect_layout(class_files, root):by-typewhen at least half of the classes under the code root sit below a type folder, elseby-domain. Exposed aslayoutin the page data and stated in the level 1 introduction.classify_domain(path, root, layout): by type, the first non-type folder below the root (src/Service/Billing/X.phpgives Billing,app/Http/Controllers/Admin/X.phpgives Admin); by domain, the first folder unless it is a type folder. No domain folder: the explicit "Common" group (was "(no domain)"), with its own legend entry.Measured on real repositories (
--code-only)by-type; 94 business or module domains (ProbeNetwork, Admin, Retention, Osint, Host, Account, Economy...); Common 1,068by-type; 24 domains (Admin, Billing, Core, Store, Provisioning, Helpdesk...); Common 190by-domainQuality (commands actually run, after the last change)
uv run pytest tests/test_zoom_html.py -q: 29 passed. Without the change: import error onmain; with layout detection forced toby-domain: 2 failed.uv run pytest tests/ -q: 7648 passed, 14 skipped.uv run ruff check .: all checks passed.uv run pyrighton the touched files: 0 errors.Limits
Entity/,Repository/,Enum/,Message/): zoom-html : rattacher par l'usage les classes du groupe Common à leur domaine unique #60 proposes attaching a class to the single domain that uses it, by evidence.Logging,Sentry,Mailer...) appear as domains; declared domains are Contrôles d'architecture déclaratifs avec score et SARIF, sur le modèle de Plumber #51.