v2.5.0
v2.5.0
A minor bump rather than a patch: 20 new board-lifecycle and geometry tools take the surface from 124 to 143. The rest is the tooling groundwork that v2.4.1's CI work deliberately deferred.
PCB editing interface tools (#311)
Twenty tools, thanks to @OHNope:
- Lifecycle —
open_board,reload_board,save_board,save_as,is_dirty,discard_or_reload,create_board_from_schematic - Graphics editing —
clear_board_outline,replace_board_outline,list_graphics,delete_graphic,update_graphic,move_footprint_text - Geometry queries —
batch_move_components,get_component_geometry,get_pads,get_net_pads,get_ratsnest,estimate_airwire_lengths,check_placement_clearance
All of them respect backend session pinning, which is the part worth dwelling on. When KiCad's GUI owns a session, a naive save writes the server's stale in-memory board instead of asking the GUI — the #223 divergence class, and it fails silently. Three gaps were closed here:
create_board_from_schematicre-pins after swapping the board, sosession_board_pathcan no longer point at the previous file.save_board/save_asroute through the command dispatcher rather than calling the save handler directly, keeping the dispatcher the single owner of the pinning decision.save_asadditionally realigns both the SWIG fallback and the session pin when an IPC save changes the board's identity — and drops the stale board outright if that reload fails, rather than retaining it under the new path.batch_move_componentsrefuses in an IPC-owned session and points atmove_component, since the IPC BoardAPI exposes only single-component moves.
tests/test_backend_session_pinning.py grew to 32 tests covering those paths on both backends.
Formatting normalized and enforced (#339)
The half v2.4.1 deferred. pre-commit run --all-files (black, isort, prettier, flake8, mypy, eslint, whitespace) is now a real CI gate — which is what CONTRIBUTING.md has always claimed while nothing checked it.
The normalization touched 31 files, almost entirely tests/ and src/tools/, which the old black --check python/ never covered. Verified formatting-only by AST-comparing every changed Python file against its predecessor: 16 identical, 5 differing only in import order, 0 semantic changes.
Four latent problems surfaced in the process:
- The pre-commit mypy hook could not resolve
dotenv— its isolated venv never listedpython-dotenv. npm run lintranblackin write mode against whateverblackwas onPATH(a global 25.1.0, while pre-commit pins 26.3.1), so "linting" silently rewrote your working tree with a formatter that disagreed with CI. It now checks only;npm run format:pyis the write path andnpm run lint:alldelegates to pre-commit.- Two more
|| echo-swallowed gates in thecode-qualityjob, replaced with real ones. mixed-line-ending's--fix=lfhad been fighting.gitattributes'*.ps1 text eol=crlfforever — hook rewrites to LF, git checks back out as CRLF, endlessly. Invisible on Windows becausecore.autocrlfmasks it, and unfixable on Linux..gitattributesnow owns line endings for Windows-native scripts.
Smaller items (#338)
Thanks to @mingyo186:
search_parts_registryandsearch_jlcpcb_partsnow each say when to prefer the other — verified footprint/symbol/3D bundle versus JLCPCB sourcing data.- The README's tool count is pinned to the registry by a test. The number had drifted twice already; this caught #311 within the hour of being merged (
expected 124 to be 143), which is precisely the point.
Full details in CHANGELOG.md.