-
Notifications
You must be signed in to change notification settings - Fork 2
Sync up of many additions, incl. documentation and new sample apps #16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
bvandewe
wants to merge
323
commits into
neuroglia-io:main
Choose a base branch
from
bvandewe:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
- Reorganized test files: Mario Pizzeria tests to samples/mario-pizzeria/tests/, generic framework tests to tests/cases/ - Added comprehensive JsonSerializer configuration examples in docs/examples/ - Enhanced configurable type discovery with practical examples and reusable functions - Updated changelog and version for release - Improved project structure and maintainability
- Update tutorial and domain-design docs with real implementation - Add GitHub repository links with line number references - Replace placeholder code with actual multi-app architecture - Fix run commands and enhance code formatting - Update CHANGELOG with comprehensive documentation improvements
- Add UnitOfWork implementation for coordinating domain events - Add DomainEventDispatchingMiddleware for automatic event handling - Add StateBasedPersistenceExtensions for service registration - Fix syntax errors in type_extensions.py and service_provider.py - Add comprehensive unit tests for UnitOfWork pattern
- Add persistence-patterns.md with detailed comparison of all patterns - Add unit-of-work.md guide with practical examples - Add pipeline-behaviors.md moved from features to patterns - Add persistence-documentation-guide.md reference - Update mkdocs navigation for better organization - Relax markdownlint requirements (disable MD013, MD051, MD029) - Exclude notes/ and samples/ from markdown linting - Update all cross-references and imports throughout codebase - Add comprehensive docstring updates and state-based persistence demo
- Use poetry run python for all sample commands to ensure dependencies - Fix PID file creation timing with proper shell grouping - Add sample-mario-status command to check running status - Improve sample-mario-stop with better error handling - Increase sleep time to 0.5s for reliable PID file creation - Add helpful URLs and error messages for better user experience
- Explain when and why to choose Neuroglia over alternatives - Add comparison table for decision making - Compare with FastAPI, Django, and Spring Boot - Include real-world use case scenarios - Highlight developer experience and code quality benefits - Provide clear guidance on ideal vs non-ideal use cases
…cope - Add all missing pattern documents to navigation - Order patterns logically from architectural to implementation level - Structure: Clean Architecture → DDD → Event-Driven → ROA → CQRS → Persistence → Repository → Unit of Work → Pipeline Behaviors → DI → Reactive → Watcher patterns - Ensure comprehensive coverage of all framework patterns - Maintain logical learning progression from concepts to implementation
- Add DDD vs Declarative Architecture philosophy comparison - Include detailed comparison table with core differences - Explain Event-Driven Architecture as foundational pattern - Show how EDA integrates with both DDD and Declarative approaches - Provide practical analogies (chef instructions vs final photo) - Guide developers in choosing appropriate architectural patterns - Create educational foundation before diving into specific patterns
- Add 'Mario's Pizzeria: Debug' configuration for standard debugging on port 8000 - Add 'Mario's Pizzeria: Debug (Custom Port)' configuration for port 8001 to avoid conflicts - Include serverReadyAction to auto-open API docs when debugging starts - Add comprehensive VS Code tasks for Mario's Pizzeria management: - Start in foreground with poetry - Start/Stop/Status background processes with make commands - Run all tests with proper Python path - Configure proper working directory and Python path for debugging - Enable debugging of both framework and application code
…d_scheduler Support for mongo in background scheduler
- Added kitchen-order-placement-ddd-analysis.md with comprehensive DDD guidance - Enhanced JsonSerializer to automatically handle AggregateRoot state extraction - Added FileSystemRepository support for both Entity and AggregateRoot - Updated MongoRepository with unified _get_id() helper for both patterns - Added comprehensive test suites for aggregate serialization - Created validation tests for nested dataclass deserialization - Added scoped pipeline behavior tests and validation scripts - Code formatting improvements and import organization
- Rewrote use_controllers() to retrieve from DI and use include_router() - Added auto-mounting in build() method (auto_mount_controllers=True) - Controllers now properly mount with Swagger UI and OpenAPI working - Version bump to 0.4.1
- Fixed AttributeError when resolving parameterized generic types - Replaced manual __getitem__ calls with typing.get_origin/get_args - Added comprehensive test suite (8 test cases, all passing) - Version bump to 0.4.2
…(v0.4.3) - Fixed type variable substitution in constructor parameters - Constructor params with type variables (e.g., CacheRepositoryOptions[TEntity, TKey]) now correctly substitute to concrete types - Added TypeExtensions._substitute_generic_arguments() call in both ServiceScope and ServiceProvider _build_service() methods - Enables AsyncCacheRepository pattern with parameterized dependencies - Added 6 comprehensive test cases in test_type_variable_substitution.py - All 14 tests passing (8 from v0.4.2 + 6 new) - Organized test files: moved integration tests and validation notes to proper directories - Updated CHANGELOG and documentation Fixes the issue where DI container looked for CacheRepositoryOptions[TEntity, TKey] instead of CacheRepositoryOptions[MozartSession, str] when building services with generic constructor parameters.
- Document all 5 critical fixes - Add migration notes for breaking changes - Include validation and testing information
- Override _publish_domain_events() to skip direct publishing - ReadModelReconciliator handles all event publishing from EventStore - Fixes duplicate CloudEvents (1 per event instead of 2) - 100% backward compatible with state-based repositories
- EventStore returns AckableEventRecord with ack/nack delegates - ReadModelReconciliator calls ack_async() AFTER mediator.publish_async() - Consumer controls acknowledgment timing, not producer - Prevents duplicate CloudEvents on service restart
- Tests ack called after successful processing - Tests nack called on processing failure - Tests acknowledgment timing (mediator before ack) - Tests multiple events acknowledged independently - All 6 tests passing
- Root cause analysis with event flow diagrams - Solution design using producer-consumer pattern - Code changes in EventStore and ReadModelReconciliator - Testing strategy and troubleshooting guide - Performance considerations and migration guide
- Fixed event acknowledgment timing issue - Added comprehensive test suite - 100% backward compatible - Prevents duplicate CloudEvent delivery
- Add DeleteMode enum (DISABLED, SOFT, HARD) - EventStore.delete_async() interface for stream deletion - EventSourcingRepository deletion mode implementation
Signed-off-by: Bruno van de Werve <bvandewe@gmail.com>
- Skip tombstone events (68551-prefixed streams) with DEBUG logging - Skip system events (569JNRXZghikmsprefixed types) with DEBUG logging - Handle invalid JSON gracefully with WARNING logging - Prevents ReadModelReconciliator subscription crashes
- Optimize subscription config (min/max checkpoint=1, timeout=60s) - Add detailed ACK/NACK logging at DEBUG level - Add periodic ACK queue metrics logging - Prevent 30-second event redelivery loop
BREAKING CHANGE: ESEventStore now uses AsyncioEventStoreDBClient instead of EventStoreDBClient Migrated from sync esdbclient API to native async AsyncioEventStoreDBClient. This eliminates threading workarounds and properly handles ACK delivery. Key changes: - All operations use async/await - Native async iteration over subscriptions - AckableEventRecord properly awaits async delegates - All 18 EventStore tests passing Benefits: - ACKs sent immediately via async stream - Removes threading complexity - Improved performance and maintainability
AsyncioEventStoreDBClient is an async factory that must be awaited, not a regular class. This fixes the Mypy error about missing append_to_stream method. Changes: - Import as AsyncClientFactory to clarify its nature - Add lazy client initialization via _ensure_client() method - Store connection string and create client on first use - Update all operations to call _ensure_client() before using client - Support both connection string and pre-initialized client in __init__ for testing - Update configure() to use factory function for proper DI registration All 18 EventStore tests passing.
Signed-off-by: Bruno van de Werve <bvandewe@gmail.com>
The AsyncioEventStoreDBClient migration is NOT breaking for standard usage. Updated to clarify that ESEventStore.configure() is unchanged and breaking only affects direct instantiation (uncommon pattern).
- Added await to client.subscribe_to_stream() in observe_async() - Added await to client.read_subscription_to_stream() in observe_async() - Updated test mock to use AsyncMock for read_subscription_to_stream() Both subscribe_to_stream() and read_subscription_to_stream() are async coroutines in AsyncioEventStoreDBClient that must be awaited. The code was calling them without await, causing runtime warnings and potential issues. Fixes issue where coroutines were not being properly awaited, which could cause 'coroutine was never awaited' warnings.
- Updated CHANGELOG.md with bug fix details for missing await statements - Bumped version in pyproject.toml from 0.6.16 to 0.6.17
Signed-off-by: Bruno van de Werve <bvandewe@gmail.com>
- Added await to client.read_stream() on line 104 (get_async first read) - Added await to client.read_stream() on line 112 (get_async second read) - Added await to client.read_stream() on line 135 (read_async) All three read_stream() calls are async coroutines in AsyncioEventStoreDBClient that must be awaited. These were missed in the initial async migration.
Added documentation for three missing await statements on client.read_stream() calls discovered after v0.6.17 release. All EventStore async methods now properly awaited.
Signed-off-by: Bruno van de Werve <bvandewe@gmail.com>
Critical bug: esdbclient async ACKs fail silently due to missing subscription_id propagation. Added runtime patch that fixes the issue. Documented in CHANGELOG and detailed analysis in notes/.
ESEventStore now correctly uses ack_id instead of id for ACKs when resolveLinktos=true. Fixes event redelivery on category streams. Tests updated to include ack_id in mock events.
Added detailed documentation of Neuroglia event publishing design: - Why events are published only from Read Path - Complete data flow with sequence diagram - Comparison with state-based repositories - Best practices for projection handlers - Verified with diagnostic logging evidence
Add EventSourcingRepositoryOptions support in DataAccessLayer.WriteModel() Reduces boilerplate from 37 lines to 5 lines. Fully backwards compatible.
Add database_name parameter to DataAccessLayer.ReadModel() constructor Eliminates verbose lambda functions. Consistent with WriteModel API. Fully backwards compatible.
Add database_name parameter to DataAccessLayer.ReadModel() constructor Eliminates verbose lambda functions. Consistent with WriteModel API. Fully backwards compatible.
- Removed patches.py module (kurrentdbclient 1.1.2 includes fix) - Removed patches import from __init__.py - No longer need monkey-patching for subscription_id propagation
Signed-off-by: Bruno van de Werve <bvandewe@gmail.com>
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.
mario-pizzeriaas a full featured sample app showcasing most framework features and serving as the base reference implementation for most tests, code illustrations and concepts explanations in the supporting Mkdocs documentationPardon me for the huge MR... I'll try to push more frequently moving forward :)