docs: update refactor progress — all phases complete
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
# pm3py Refactor Progress
|
# pm3py Refactor Progress
|
||||||
|
|
||||||
**Design:** [2026-03-18-refactor-design.md](2026-03-18-refactor-design.md)
|
**Design:** [2026-03-18-refactor-design.md](2026-03-18-refactor-design.md)
|
||||||
**Branch:** `refactor/core-package`
|
**Branch:** merged to `master`
|
||||||
**Started:** 2026-03-18
|
**Started:** 2026-03-18
|
||||||
|
|
||||||
## Phase 1 — Create `core/`, normalize names, fix imports
|
## Phase 1 — Create `core/`, normalize names, fix imports
|
||||||
@@ -33,11 +33,19 @@
|
|||||||
|
|
||||||
## Phase 2 — Extract `sniff/`
|
## Phase 2 — Extract `sniff/`
|
||||||
|
|
||||||
**Status: Scaffolded — extraction deferred**
|
**Status: Complete**
|
||||||
|
|
||||||
`hf_iso15.py` is 94 lines of clean reader commands + thin `sniff()` firmware call. The trace parsing, 15693 decoders, NDEF annotation, and ANSI formatting described in the design doc haven't been written yet. Nothing to extract.
|
Extracted sniff infrastructure from `core/hf_iso15.py` (615→130 lines) into dedicated modules:
|
||||||
|
- `sniff/trace.py` — `parse_tracelog()`, `TRACELOG_HDR_SIZE` (protocol-agnostic)
|
||||||
|
- `sniff/ndef.py` — NDEF TLV/record decode (`decode_ndef_annotation()`)
|
||||||
|
- `sniff/decode_iso15.py` — ISO 15693 command/response decoders, command tables
|
||||||
|
- `sniff/format.py` — ANSI color formatting, `format_sniff_line()`
|
||||||
|
- `sniff/session.py` — `SniffSession` with `iso15()` method (replaces `sniff_decoded()`)
|
||||||
|
- `sniff/__init__.py` — re-exports all public symbols
|
||||||
|
|
||||||
Created `pm3py/sniff/__init__.py` placeholder. Will extract into sub-modules when sniff infrastructure is implemented.
|
`core/hf_iso15.py` retains `HF15Commands` (scan/rdbl/wrbl/sniff) and re-exports sniff symbols for backward compat. `download_trace()` and `sniff_decoded()` delegate to `SniffSession`.
|
||||||
|
|
||||||
|
**65/65 tests passing** (35 sniff tests work through re-exports, no test changes needed).
|
||||||
|
|
||||||
## Phase 3 — Scaffold `transponders/`
|
## Phase 3 — Scaffold `transponders/`
|
||||||
|
|
||||||
@@ -68,7 +76,7 @@ All directories have `__init__.py`. Sim migration (~41 files, 7.8k LOC) is a sep
|
|||||||
|
|
||||||
## Next Steps
|
## Next Steps
|
||||||
|
|
||||||
- Sniff infrastructure: implement trace parsing, 15693 decoders, NDEF annotation, ANSI formatting in `sniff/`
|
|
||||||
- Transponder migration: extract base classes from sim worktree, populate `transponders/` modules
|
- Transponder migration: extract base classes from sim worktree, populate `transponders/` modules
|
||||||
- Sim migration: move sim session, table compiler, relay into `sim/`
|
- Sim migration: move sim session, table compiler, relay into `sim/`
|
||||||
- Reader modes: implement inventory, programming, access workflows in `reader/modes/`
|
- Reader modes: implement inventory, programming, access workflows in `reader/modes/`
|
||||||
|
- Sniff: add `decode_iso14a.py` stub when 14443-A sniff support is added
|
||||||
|
|||||||
Reference in New Issue
Block a user