Conversation
- Created abstract NfcInterface base class - Refactored NfcHandler to NfcpyHandler implementing NfcInterface - Added create_nfc_handler factory function to select implementations - Added --nfc-implementation command-line option to nfc2klipper_backend.py - Updated MockNfcHandler to implement NfcInterface - Default implementation is 'nfcpy' (current behavior) - Placeholder for 'pn5180-tagomatic' implementation ready for future addition Co-authored-by: bofh69 <1444315+bofh69@users.noreply.github.com>
Dependency ReviewThe following issues were found:
Snapshot WarningsEnsure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice. License Issuesrequirements.txt
OpenSSF Scorecard
Scanned Files
|
There was a problem hiding this comment.
Bandit found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
|
@copilot Fix the mypy errors. |
3530688 to
651fd7a
Compare
|
@copilot Fix build errors |
ae85347 to
e5ddcba
Compare
|
@copilot fix the mypy and pylint errors, without changing the files under open_print_tag |
eb0cc50 to
4d24068
Compare
There was a problem hiding this comment.
Pull request overview
This PR adds support for OpenPrintTag NFC tags by integrating the OpenPrintTag data format parser and adding PN5180 reader support. The main changes enable nfc2klipper to read OpenPrintTag tags (which use NFC Type-V), parse their structured data, and automatically create corresponding entries in Spoolman.
Changes:
- Added OpenPrintTag parser implementation with field mapping support
- Integrated PN5180 reader support for NFC Type-V tags
- Introduced NFC handler abstraction layer with interface-based design
Reviewed changes
Copilot reviewed 41 out of 42 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| open_print_tag/utils/* | OpenPrintTag reference implementation copied from upstream project |
| lib/openprinttag_parser.py | New parser for OpenPrintTag format with Spoolman integration |
| lib/nfc_handler.py | Refactored to support multiple reader implementations (nfcpy, PN5180) |
| lib/nfc_interface.py | New abstract interface for NFC handlers |
| lib/config.py | Added configuration methods for OpenPrintTag field mappings |
| nfc2klipper_backend.py | Integrated OpenPrintTag parser and PN5180 support |
| nfc2klipper.cfg | Added configuration sections for PN5180 and OpenPrintTag |
| README.md | Updated documentation for PN5180 reader and OpenPrintTag support |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
5f23435 to
d15d74e
Compare
ea3b48f to
e8a0b1c
Compare
The intro is updated. Removed the secion about write_tags.py. Minor clarifications.
e8a0b1c to
d5f0a53
Compare
|
@copilot please review, except files under open_print_tag |
The OpenPrintTag support seems to work fine as well as OpenTag3D and reading nfc2klipper's own formatted tags.
There is no support for updating the auxiliary section with the usage yet. Unless using the spool back and forth between a printer with klipper and a Prusa with NFC reader, that's not a drawback.