Skip to content

v2.5.0

Choose a tag to compare

@mixelpixx mixelpixx released this 26 Jul 14:39
· 101 commits to main since this release

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:

  • Lifecycleopen_board, reload_board, save_board, save_as, is_dirty, discard_or_reload, create_board_from_schematic
  • Graphics editingclear_board_outline, replace_board_outline, list_graphics, delete_graphic, update_graphic, move_footprint_text
  • Geometry queriesbatch_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_schematic re-pins after swapping the board, so session_board_path can no longer point at the previous file.
  • save_board/save_as route through the command dispatcher rather than calling the save handler directly, keeping the dispatcher the single owner of the pinning decision.
  • save_as additionally 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_components refuses in an IPC-owned session and points at move_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 listed python-dotenv.
  • npm run lint ran black in write mode against whatever black was on PATH (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:py is the write path and npm run lint:all delegates to pre-commit.
  • Two more || echo-swallowed gates in the code-quality job, replaced with real ones.
  • mixed-line-ending's --fix=lf had been fighting .gitattributes' *.ps1 text eol=crlf forever — hook rewrites to LF, git checks back out as CRLF, endlessly. Invisible on Windows because core.autocrlf masks it, and unfixable on Linux. .gitattributes now owns line endings for Windows-native scripts.

Smaller items (#338)

Thanks to @mingyo186:

  • search_parts_registry and search_jlcpcb_parts now 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.