Skip to content

Commit 3fd87ca

Browse files
committed
Release version 0.2.23
1 parent 1758dbe commit 3fd87ca

File tree

2 files changed

+99
-7
lines changed

2 files changed

+99
-7
lines changed

CHANGELOG.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1495,3 +1495,33 @@ HTTPException(detail="error", problem_type="custom-error", status=422)
14951495
- Fixed HTTPException constructor to handle problem details more consistently
14961496
- Updated related tests to reflect HTTPException constructor changes
14971497
- Improved error response formatting in OpenAPI documentation
1498+
1499+
## version 0.2.23
1500+
1501+
### Improvements
1502+
1503+
- **Contributing Guidelines Enhancement**: Moved CONTRIBUTING.md to .github folder with comprehensive fork/PR workflow instructions
1504+
- **Plugin System Documentation**: Added detailed ASCII diagram illustrating plugin execution flow and architecture
1505+
- **README.md Updates**:
1506+
- Separated Contributing and Roadmap sections for better organization
1507+
- Enhanced plugin system documentation with visual execution flow diagram
1508+
- Added step-by-step contributor guide with branch management instructions
1509+
- **Release Process**: Integrated remote master changes and resolved merge conflicts
1510+
1511+
### Features
1512+
1513+
- **Enhanced Fork Workflow**: Added detailed instructions for finding latest development branches using `git branch -r | grep "version/"`
1514+
- **Plugin Execution Visualization**: Created comprehensive ASCII diagram showing setup-time vs runtime plugin execution patterns
1515+
- **Contributor Experience**: Improved onboarding with clear branch naming conventions and PR targeting guidelines
1516+
1517+
### Documentation
1518+
1519+
- **Plugin System**: Added visual representation of nested/onion pattern execution flow
1520+
- **Contributing**: Enhanced with practical examples using Premier plugins (timeout, retry, cache)
1521+
- **Branch Management**: Clear guidance on working with version/x.x.x development branches
1522+
1523+
### Fixes
1524+
1525+
- **Remote Sync**: Successfully merged changes from remote master branch
1526+
- **Version Management**: Corrected release versioning from 0.2.24 to 0.2.23
1527+
- **Git Conflicts**: Resolved merge conflicts in version tracking

README.md

Lines changed: 69 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,56 @@ There will also be tutorials on how to develop your own AI agent/chatbot using l
113113

114114
Lihil's plugin system enables you to integrate external libraries seamlessly into your application as if they were built-in features. Any plugin that implements the `IPlugin` protocol can access endpoint information and wrap functionality around your endpoints.
115115

116+
### Plugin Execution Flow
117+
118+
When you apply multiple plugins like `@app.sub("/api/data").get(plugins=[plugin1.dec, plugin2.dec])`, here's how they execute:
119+
120+
```
121+
📦 Plugin Application (Setup Time - Left to Right)
122+
┌─────────────────────────────────────────────────────────────┐
123+
│ original_func → plugin1(ep_info) → plugin2(ep_info) │
124+
│ │
125+
│ Result: plugin2(plugin1(original_func)) │
126+
└─────────────────────────────────────────────────────────────┘
127+
128+
🚀 Request Execution (Runtime - Nested/Onion Pattern)
129+
┌─────────────────────────────────────────────────────────────┐
130+
│ │
131+
│ 📨 Request │
132+
│ │ │
133+
│ ▼ │
134+
│ ┌─────────────────────────────────────────────────────┐ │
135+
│ │ Plugin2 (Outermost) │ │
136+
│ │ ┌─────────────────────────────────────────────────┐ │ │
137+
│ │ │ Plugin1 (Middle) │ │ │
138+
│ │ │ ┌─────────────────────────────────────────────┐ │ │ │
139+
│ │ │ │ Original Function (Core) │ │ │ │
140+
│ │ │ │ │ │ │ │
141+
│ │ │ │ async def get_data(): │ │ │ │
142+
│ │ │ │ return {"data": "value"} │ │ │ │
143+
│ │ │ │ │ │ │ │
144+
│ │ │ └─────────────────────────────────────────────┘ │ │ │
145+
│ │ └─────────────────────────────────────────────────┘ │ │
146+
│ └─────────────────────────────────────────────────────┘ │
147+
│ │ │
148+
│ ▼ │
149+
│ 📤 Response │
150+
│ │
151+
└─────────────────────────────────────────────────────────────┘
152+
153+
🔄 Execution Order:
154+
Request → Plugin2 → Plugin1 → get_data() → Plugin1 → Plugin2 → Response
155+
156+
📋 Real Example with Premier Plugins:
157+
@app.sub("/api").get(plugins=[
158+
plugin.timeout(5), # Applied 1st → Executes Outermost
159+
plugin.retry(max_attempts=3), # Applied 2nd → Executes Middle
160+
plugin.cache(expire_s=60), # Applied 3rd → Executes Innermost
161+
])
162+
163+
Flow: Request → timeout → retry → cache → endpoint → cache → retry → timeout → Response
164+
```
165+
116166
### Creating a Custom Plugin
117167

118168
A plugin is anything that implements the `IPlugin` protocol - either a callable or a class with a `decorate` method:
@@ -370,23 +420,35 @@ lihil follows semantic versioning after v1.0.0, where a version in x.y.z represe
370420
- y: minor, feature updates
371421
- z: patch, bug fixes, typing updates
372422

373-
## Contributions & Roadmap
423+
## Contributing
424+
425+
We welcome all contributions! Whether you're fixing bugs, adding features, improving documentation, or enhancing tests - every contribution matters.
426+
427+
### Quick Start for Contributors
428+
429+
1. **Fork & Clone**: Fork the repository and clone your fork
430+
2. **Find Latest Branch**: Use `git branch -r | grep "version/"` to find the latest development branch (e.g., `version/0.2.23`)
431+
3. **Create Feature Branch**: Branch from the latest version branch
432+
4. **Make Changes**: Follow existing code conventions and add tests
433+
5. **Submit PR**: Target your PR to the latest development branch
434+
435+
For detailed contributing guidelines, workflow, and project conventions, see our [Contributing Guide](.github/CONTRIBUTING.md).
374436

375-
All contributions are welcome
437+
## Roadmap
376438

377-
Road Map before v1.0.0
439+
### Road Map before v1.0.0
378440

379-
- [x] v0.1.x: Feature parity (alpha stage)
441+
- [x] **v0.1.x: Feature parity** (alpha stage)
380442

381443
Implementing core functionalities of lihil, feature parity with fastapi
382444

383-
- [x] v0.2.x: Official Plugins (current stage)
445+
- [x] **v0.2.x: Official Plugins** (current stage)
384446

385447
We would keep adding new features & plugins to lihil without making breaking changes.
386448
This might be the last minor versions before v1.0.0.
387449

388-
- [ ] v0.3.x: Performance boost
450+
- [ ] **v0.3.x: Performance boost**
389451

390452
The plan is to rewrite some components in c, roll out a server in c, or other performance optimizations in 0.3.x.
391453

392-
If we can do this without affect current implementations in 0.2.0 at all, 0.3.x may never occur and we would go stright to v1.0.0 from v0.2.x
454+
If we can do this without affect current implementations in 0.2.0 at all, 0.3.x may never occur and we would go straight to v1.0.0 from v0.2.x

0 commit comments

Comments
 (0)