Skip to main content

Measure exact routed pad-to-pad signal lengths from KiCad PCB files.

Project description

kicad-signal-path

kicad-signal-path measures exact routed pad-to-pad signal lengths directly from KiCad .kicad_pcb files.

It supports:

  • single pad-to-pad path measurement
  • regex-based source and destination net matching
  • explicit 2-pin pass-through selection for series resistors and similar zero-length bridge parts
  • default auto pass-through discovery for exact 2-pin resistor-style refs matching R*
  • separate Track mm, Via mm, Total mm, and Delta mm reporting
  • CLI and Python usage from the same package

Install

Run it without installing:

uvx kicad-signal-path --help

Install it as a CLI tool:

uv tool install kicad-signal-path

Add it to a Python project:

uv add kicad-signal-path

Quick Start

Single path measurement:

kicad-signal-path board.kicad_pcb --start U1:B3 --end J1:H23

Regex batch matching:

kicad-signal-path \
  board.kicad_pcb \
  --src-net-regex '/AXIS_I_(.*)/' \
  --dst-net-template '/FMC_AXIS_I_($1)/'

Verbose path breakdown:

kicad-signal-path \
  board.kicad_pcb \
  --start U1:B3 \
  --end J1:H23 \
  --verbose

Pass-through parts are traversed when explicitly listed with --pass-through or selected automatically by default. Auto selection is intentionally constrained to exact 2-pin resistor-style refs matching R*. Use --no-auto-pass-through to disable it.

Use the module form if you prefer:

python -m kicad_signal_path --help

Development

Create a local environment and install the project in editable mode through uv:

uv sync --dev

Run tests:

uv run pytest

Build distributable artifacts:

uv build --no-sources

Local smoke test against built artifacts:

uv run --isolated --no-project --with dist/*.whl tests/smoke_test.py
uv run --isolated --no-project --with dist/*.tar.gz tests/smoke_test.py

Release

This repo is prepared for public PyPI publishing with uv and GitHub Actions.

  1. Create the PyPI project kicad-signal-path.
  2. In PyPI trusted publishing, allow your GitHub repository for this package.
  3. Set the trusted publishing workflow to .github/workflows/publish.yml.
  4. Set the trusted publishing environment name to pypi.
  5. Create and push an annotated release tag such as v0.1.2 on the commit you want to publish.
  6. The package version is derived from that git tag during build, so the tag must match the intended release version.

Manual local publish also works after authentication is configured, but build from the tagged commit so the derived version is exact:

rm -rf dist/
uv build --no-sources
uv publish

Test Data

This repository intentionally ships no KiCad board design files. Tests generate a small synthetic board description at runtime so the package can be validated without bundling proprietary PCB data.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kicad_signal_path-0.1.3.tar.gz (23.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kicad_signal_path-0.1.3-py3-none-any.whl (28.6 kB view details)

Uploaded Python 3

File details

Details for the file kicad_signal_path-0.1.3.tar.gz.

File metadata

  • Download URL: kicad_signal_path-0.1.3.tar.gz
  • Upload date:
  • Size: 23.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for kicad_signal_path-0.1.3.tar.gz
Algorithm Hash digest
SHA256 091f9cc491ef67f0d2b40c6775760d968a98372f3e0343bcf1a74c8bdff44d46
MD5 1b77c2e9e7ff87e0b1bff7ce1fca706f
BLAKE2b-256 ab98f8478aee563ddbcd2bf7f3702ea76a56cc836b479f75d500ae1119be730c

See more details on using hashes here.

File details

Details for the file kicad_signal_path-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: kicad_signal_path-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 28.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for kicad_signal_path-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 226ad702c6570d1fd847eb224247573735f647e86a38a7385be0a93f0d5e5d9c
MD5 830782c418dcca5a26faf49479df59f4
BLAKE2b-256 54c12abeea2d2ff2c33314e5decae9488cc4a505de532f90c93f0a6d9662a943

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page