refactor: move examples/ into docs/examples/#10
Merged
Conversation
Groups all reference material under docs/ so the repository structure is more intuitive for contributors. Updates pythonpath, pyright extraPaths, ruff targets, CI commands, internal example imports, and all documentation links accordingly. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR relocates the bank_account example bounded context under docs/examples/ to consolidate reference material within the documentation tree, and updates tooling/configuration so tests, linting, and type-checking continue to resolve the example package correctly.
Changes:
- Moved the
bank_accountexample code intodocs/examples/bank_account/and updated its internal imports tofrom bank_account.... - Updated test imports to reference
bank_accountdirectly (instead ofexamples.bank_account). - Updated tooling/docs pointers (pytest
pythonpath, pyrightinclude/extraPaths, Makefile, CI, and documentation links) to the new location.
Reviewed changes
Copilot reviewed 22 out of 35 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/infrastructure/test_registry_command_bus.py | Update example-domain import path to bank_account.*. |
| tests/infrastructure/test_in_memory_repository.py | Update example-domain import paths to bank_account.*. |
| tests/infrastructure/test_domain_event_publishing_repository.py | Update example-domain import paths to bank_account.*. |
| tests/domain/test_value_object.py | Update example-domain import path to bank_account.*. |
| tests/domain/test_domain_error.py | Update example-domain import path to bank_account.*. |
| tests/domain/test_aggregate_root.py | Update example-domain import paths to bank_account.*. |
| tests/application/test_get_balance_handler.py | Update example-application import paths to bank_account.*. |
| README.md | Point readers to the example’s new location under docs/examples/. |
| pyproject.toml | Update pytest pythonpath and pyright paths to include docs/examples. |
| Makefile | Update ruff targets to lint/format docs/examples instead of examples. |
| docs/README.md | Update docs link to the example under docs/examples. |
| docs/getting-started.md | Update example links to the new location. |
| docs/examples/bank_account/domain/money.py | Add moved example domain Money value object implementation. |
| docs/examples/bank_account/domain/events/account_opened.py | Add moved example domain event record/payload. |
| docs/examples/bank_account/domain/events/account_debited.py | Add moved example domain event record/payload. |
| docs/examples/bank_account/domain/events/account_credited.py | Add moved example domain event record/payload. |
| docs/examples/bank_account/domain/events/init.py | Package marker for example domain events. |
| docs/examples/bank_account/domain/errors.py | Add moved example domain errors. |
| docs/examples/bank_account/domain/bank_account.py | Add moved example aggregate root and domain behavior. |
| docs/examples/bank_account/domain/bank_account_repository.py | Add moved example repository protocol. |
| docs/examples/bank_account/domain/bank_account_id.py | Add moved example ID NewType. |
| docs/examples/bank_account/domain/init.py | Package marker for example domain. |
| docs/examples/bank_account/application/get_balance/get_balance_query.py | Add moved example query object with updated imports. |
| docs/examples/bank_account/application/get_balance/get_balance_handler.py | Add moved example handler with updated imports. |
| docs/examples/bank_account/application/get_balance/bank_account_read_repository.py | Add moved example read-repo protocol with updated imports. |
| docs/examples/bank_account/application/get_balance/balance_response.py | Add moved example DTO for query results. |
| docs/examples/bank_account/application/get_balance/init.py | Package marker for example application module. |
| docs/examples/bank_account/application/init.py | Package marker for example application layer. |
| docs/examples/bank_account/init.py | Package marker for the bank_account example package. |
| docs/examples/init.py | Package marker for docs examples root. |
| docs/best-practices.md | Update reference to the new example location. |
| CLAUDE.md | Update contributor guidance and example location references. |
| .github/workflows/ci.yml | Update ruff CI paths to docs/examples. |
| .github/SECURITY.md | Update out-of-scope wording to reference docs/examples. |
| .github/CONTRIBUTING.md | Update contributor commands to reference docs/examples. |
💡 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.
Summary
examples/bank_account/todocs/examples/bank_account/to group all reference material underdocs/pyproject.toml(pythonpath, pyrightinclude+extraPaths),Makefile, and CI workflow to point at the new pathfrom examples.bank_account.→from bank_account.) and in all test filesREADME.md,CLAUDE.md,docs/, and.github/Test plan
make lint— ruff passes onsrc tests docs/examplesmake typecheck— pyright reports 0 errors (resolvesbank_accountviaextraPaths)make test— 79 tests pass, coverage 100%🤖 Generated with Claude Code