Release 1.4.2: load-only dialog when nothing is selected
tests / fedora:latest (push) Successful in 1m15s
tests / ubuntu-latest · py3.11 (push) Successful in 1m32s
tests / ubuntu-latest · py3.13 (push) Successful in 1m1s
tests / archlinux:latest (push) Successful in 53s
tests / debian:12 (push) Successful in 51s
tests / ubuntu:24.04 (push) Successful in 1m8s
tests / NixOS (FHS wrapper from docs/NIXOS.md) (push) Skipped
Build PCM package / build (push) Successful in 10s
tests / fedora:latest (push) Successful in 1m15s
tests / ubuntu-latest · py3.11 (push) Successful in 1m32s
tests / ubuntu-latest · py3.13 (push) Successful in 1m1s
tests / archlinux:latest (push) Successful in 53s
tests / debian:12 (push) Successful in 51s
tests / ubuntu:24.04 (push) Successful in 1m8s
tests / NixOS (FHS wrapper from docs/NIXOS.md) (push) Skipped
Build PCM package / build (push) Successful in 10s
With neither mode derivable (nothing selected, no marker rectangles, no config) the dialog now opens anyway instead of failing with an error figure: both radios disabled with their reasons, OK/Save disabled, Load config… live - a saved config can bootstrap the run. README: note that macOS/NixOS field tests last ran with plugin v1.3. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HjSRLWQ8ywBBYyakvr3YTx
This commit is contained in:
+15
-6
@@ -7,7 +7,10 @@ config's terminal set) -> gather fills -> dialog with a Classic/PDN
|
||||
mode selector (classic: the two-contact form; PDN: editable per-role
|
||||
terminal tables) -> extract vias -> solve -> figures + report. The
|
||||
dialog's "Load config…" button loops back to the derivation with the
|
||||
picked file, so a run can be set up from any saved config.
|
||||
picked file, so a run can be set up from any saved config - and the
|
||||
dialog opens even when NEITHER mode is derivable (nothing selected, no
|
||||
marker rectangles, no config): load-only, both radios disabled with
|
||||
their reasons, so a saved config can bootstrap the run.
|
||||
|
||||
Every failure is reported twice: on stdout (lands in the KiCad status-bar
|
||||
warning list) and as a matplotlib error figure, so it cannot be missed.
|
||||
@@ -101,8 +104,10 @@ def main() -> None:
|
||||
configfile.apply_physics(cfg)
|
||||
|
||||
# BOTH terminal derivations always run; a failure only
|
||||
# disables that mode's radio (with the reason shown) - the
|
||||
# launch dies only when neither mode is possible
|
||||
# disables that mode's radio (with the reason shown).
|
||||
# Even with neither mode possible the dialog still
|
||||
# opens - load-only - so "Load config…" works without
|
||||
# first selecting pads or drawing marker rectangles
|
||||
classic_reason = pdn_reason = None
|
||||
es1: list = []
|
||||
es2: list = []
|
||||
@@ -210,9 +215,13 @@ def main() -> None:
|
||||
f"workable supply+load copper; PDN "
|
||||
f"candidates: {', '.join(pdn_nets)}")
|
||||
if classic_reason is not None and pdn_reason is not None:
|
||||
raise SelectionError(
|
||||
f"{classic_reason}\n(PDN mode is also "
|
||||
f"unavailable: {pdn_reason})")
|
||||
# nothing runnable right now: the dialog opens with
|
||||
# both radios and OK/Save disabled, offering only
|
||||
# Load config… (and Cancel) - a loaded file then
|
||||
# re-derives everything through the loop below
|
||||
print(f"note: classic mode unavailable: "
|
||||
f"{classic_reason}")
|
||||
print(f"note: PDN mode unavailable: {pdn_reason}")
|
||||
buildups = board_io.gather_mask_buildups(board)
|
||||
except ApiError as e:
|
||||
raise UserFacingError(
|
||||
|
||||
Reference in New Issue
Block a user