Rework frame format architecture to use composable language-agnostic definitions - #116
Conversation
…ame_formats/ Co-authored-by: rijesha <7819200+rijesha@users.noreply.github.com>
…ntation Co-authored-by: rijesha <7819200+rijesha@users.noreply.github.com>
…odule Co-authored-by: rijesha <7819200+rijesha@users.noreply.github.com>
…rofiles Co-authored-by: rijesha <7819200+rijesha@users.noreply.github.com>
Co-authored-by: rijesha <7819200+rijesha@users.noreply.github.com>
| # Framing Architecture | ||
|
|
||
| This document provides detailed technical information about the struct-frame framing system architecture, payload types, frame types, and complete format reference. | ||
| This document provides detailed technical information about the struct-frame framing system architecture, including the new composable design using language-agnostic frame format definitions. |
There was a problem hiding this comment.
Done. Removed "detailed" from line 3. (e5af3ea)
|
|
||
| This architecture allows for flexible customization while providing simple, intent-based profiles for most users. | ||
|
|
||
| ## New Architecture (v2.0+) |
There was a problem hiding this comment.
Remove this V2.0. The project has not been adopted yet so there is no need for revisioning now.
There was a problem hiding this comment.
Done. Removed "New Architecture (v2.0+)" section and restructured to remove version references. (e5af3ea)
| ## Frame Format Definitions | ||
|
|
||
| All supported frame formats are defined in [`examples/frame_formats.proto`](https://github.com/mylonics/struct-frame/blob/main/examples/frame_formats.proto). This file provides: | ||
| Frame format definitions are now in language-agnostic Python modules rather than in the proto file. This allows for: |
There was a problem hiding this comment.
Remove the are now in and rather than. beacause as mentioned previously this project is not yet released. Find any other places like this and remove them.
There was a problem hiding this comment.
Done. Removed temporal language ("are now in", "rather than", etc.) throughout the document. (e5af3ea)
| All supported frame formats are defined in [`examples/frame_formats.proto`](https://github.com/mylonics/struct-frame/blob/main/examples/frame_formats.proto). This file provides: | ||
| Frame format definitions are now in language-agnostic Python modules rather than in the proto file. This allows for: | ||
|
|
||
| - **Code reuse**: Payloads can import and extend simpler payloads |
There was a problem hiding this comment.
Done. Removed the bullet list and simplified to a single sentence. (e5af3ea)
There was a problem hiding this comment.
Done. Deleted examples/frame_formats.proto.backup. (e5af3ea)
There was a problem hiding this comment.
Done. Deleted src/struct_frame/frame_formats.proto.backup. (e5af3ea)
Co-authored-by: rijesha <7819200+rijesha@users.noreply.github.com>
All requested changes have been addressed in commit e5af3ea:
|
Rework Frame Formats - Complete ✅
This PR successfully reworks the frame formatting system to make it less confusing for users.
🎯 Issue Addressed
The original issue requested:
📦 What's New
1. Language-Agnostic Frame Format Module (
src/struct_frame/frame_formats/)Key Features:
2. Five Standard Profiles
3. Simplified frame_formats.proto
Before (552 lines): Message definitions for all 27+ frame format variants
After (168 lines): Profile enums + ProfileAlias for custom combinations
4. Updated Documentation
framing.md- Added code examples for using profilesframing-calculator.md- Added frame_format.proto snippetsframing-architecture.md- Documented architectureframe_formats/README.md- Complete API referenceexamples/frame_format_profiles.py- Working example (205 lines)5. Comprehensive Tests
tests/py/test_profiles.py- Tests all 5 profiles🔧 Usage Examples
Standard Profile (Recommended):
Custom Profile:
In frame_format.proto:
📊 Test Results
📁 Files Changed
Added (10 files):
src/struct_frame/frame_formats/*.py(6 files)src/struct_frame/frame_formats/README.mdtests/py/test_profiles.pyexamples/frame_format_profiles.pyModified (5 files):
src/struct_frame/frame_formats.proto(simplified)examples/frame_formats.proto(simplified)docs/user-guide/framing-calculator.md(added snippets)docs/user-guide/framing-architecture.md(documented architecture)docs/user-guide/framing.md(added code examples)✨ Benefits
📝 Recent Updates
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.