Skip to content

docs: explain import roots in the README quickstart - #66

Open
LukasNiessen wants to merge 1 commit into
mainfrom
docs/explain-import-roots
Open

LukasNiessen wants to merge 1 commit into
mainfrom
docs/explain-import-roots

Conversation

@LukasNiessen

Copy link
Copy Markdown
Owner

The README used project_files("src/") and metrics("src/") without explaining how that argument affects import resolution. In a src layout, filtering with in_path("src/**") alone can leave first-party imports classified as external and hide architecture violations.

Add a short import-root explanation before the first test example, linked to a detailed Setup section. Document the working-directory default, source-root versus selector behavior, examples for src, flat, and backend layouts, and the effect on dependency rules and metrics. Simplify the first cycle example by removing its redundant folder filter.

Validation:

  • Executed the new README test functions against a small source-layout fixture.
  • Checked file rules, metrics, and cycle detection for src, flat, and backend layouts.
  • Reproduced the missed cycle with the wrong root and detected it with the documented root.
  • git diff --check and ruff check src/ scripts/ pass.
  • ruff format --check src/ scripts/ reports pre-existing formatting in the unchanged src/archunitpython/graph/graph_reporter.py.

README-only change; no runtime behavior changes.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant