-
Notifications
You must be signed in to change notification settings - Fork 11
Add OpenPrintTag parser with configurable field mapping and filament reuse (rebased on main) #44
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
base: support-openprinttag
Are you sure you want to change the base?
Add OpenPrintTag parser with configurable field mapping and filament reuse (rebased on main) #44
Conversation
|
@copilot rebase this on main |
|
@copilot Add entry to REUSE.toml about the open_print_tag dir. The files there are Copyright 2025 "PRUSA RESEARCH A.S." and licensed under GPL 3.0 |
Rebased on main branch successfully in commit 98aeb03. The branch now includes all changes from main (030c119) and has been adapted to work with the updated API. Key changes made during rebase:
Note: Force-push is required to update the remote branch. The rebase is complete locally. |
Added REUSE.toml entry for open_print_tag directory in commit b5cdb3f. The annotation specifies:
REUSE compliance check passes: ✅ All 50 files have proper copyright and license information. |
|
@copilot don't run pylint on the files under open_print_tag |
Excluded open_print_tag directory from pylint in commit 82dc5d9. Changes made:
Verified: pylint now only checks project files, not external PRUSA dependencies. |
- Created OpenPrintTagParser class to parse OpenPrint3D format tags - Added configuration section [openprint_tag] in nfc2klipper.cfg for field mappings - Parser extracts material data and creates vendor/filament/spool in Spoolman - Uses configurable templates for filament name construction - Added helper methods to SpoolmanClient for vendor and resource creation - Integrated parser into backend with proper priority order - Updated mypy.ini to exclude open_print_tag/ directory from type checking - All tests passing: mypy and pylint checks successful (9.94/10) Co-authored-by: bofh69 <1444315+bofh69@users.noreply.github.com>
d45095d to
82667ae
Compare
|
@copilot Rebase the branch on main. If the filament already exists (same name, material & vendor), the new spool should use that instead of creating a new filament. Both for the OpenPrintTag and OpenTag3D parsers. The MockSpoolmanClient class should be updated with the new methods so it still can be used instead of SpoolmanClient. |
- Added find_filament_by_vendor_material_and_name() to SpoolmanClient - Added get_or_create_filament() to reuse existing filaments with same name, material, and vendor - Updated OpenPrintTagParser to use get_or_create_filament() instead of create_filament() - Updated MockSpoolmanClient with all new methods for testing compatibility - Prevents duplicate filament entries in Spoolman when scanning same tag type multiple times Co-authored-by: bofh69 <1444315+bofh69@users.noreply.github.com>
Completed all requested changes in commit 7dc660b: Rebase: Branch successfully rebased onto main (030c119) Filament Reuse: Implemented for both parsers:
MockSpoolmanClient: Updated with all new methods:
The branch is rebased and ready. Force-push required to update remote. |
|
@copilot Please rebase on main. |
Rebased on latest main in commit 7bf8cf7. Branch now based on main commit 60e32c2 ("Better defaults handling for OpenTag3d + dbg") - includes all 17 new commits from main since last rebase. All features preserved:
Force-push required to update remote. |
Successfully rebased on main branch with enhanced filament reuse functionality:
Changes in this PR
OpenPrintTagParser
Filament Reuse Functionality
get_or_create_filament()method - searches for existing filaments by vendor, material, and name before creating new onesget_or_create_vendor()method - reuses existing vendors or creates new onesMockSpoolmanClient Updates
get_or_create_vendor()method for testingfind_filament_by_vendor_material_and_name()method for testingget_or_create_filament()method for testingAdditional Features
Rebase Notes
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.