feat: support .archignore exclusions#14
Open
TristanKruse wants to merge 5 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
Adds first-class .archignore support so file-based analysis (dependency graph extraction and metrics scanning) can exclude generated/legacy/irrelevant files, and tightens release automation by synchronizing version metadata checks + package build in CI.
Changes:
- Implement
.archignoreparsing and path-based exclusion handling in the core Python file discovery / graph extraction pipeline. - Apply resolved exclude patterns to file-metric scans and class-info extraction, and add tests covering ignore behavior (including dependency-target suppression).
- Add release metadata helper scripts, wire them into semantic-release + CI, and ensure CI builds the package.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
src/archunitpython/common/extraction/extract_graph.py |
Adds .archignore loading, path-aware exclude matching, and ensures ignored files aren’t retained as dependency targets. |
src/archunitpython/metrics/fluentapi/metrics.py |
Updates file-metric scanning to use resolved exclude patterns (defaults + .archignore). |
src/archunitpython/metrics/extraction/extract_class_info.py |
Ensures class-info extraction respects .archignore via resolved exclude patterns. |
tests/common/test_extract_graph.py |
Adds tests for .archignore exclusions and for ignoring dependency targets. |
tests/metrics/test_metrics_fluentapi.py |
Adds a regression test ensuring file metrics respect .archignore. |
README.md |
Documents how to use .archignore patterns. |
scripts/check_release_metadata.py |
New script to validate pyproject / package __version__ / changelog version synchronization. |
scripts/bump_release_version.py |
New script used by semantic-release to update version metadata consistently. |
.releaserc.json |
Switches prepare step to the new bump script and commits __init__.py version updates. |
.github/workflows/integrate.yaml |
Adds release metadata check, expands Ruff scope to scripts/, and builds the package in CI. |
pyproject.toml |
Adds build to dev dependencies to support CI package build. |
BACKLOG.md |
Marks .archignore and release-metadata items as completed. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Pull Request
Adds
.archignoresupport so projects can exclude generated, legacy, or otherwise irrelevant files from architecture checks and file-based metrics.The ignore file is loaded automatically from the analyzed project root and supports:
Ignored files are excluded from graph extraction and metric file scans. Local files ignored by
.archignoreare also not retained as internal dependency targets.Change Type
Validation
243 passedsrc/archunitpython/git diff --checkpassesNotes
This intentionally implements a small
.gitignore-style subset. Negation patterns like!keep.pyare not supported yet and can be added later if needed.