Skip to main content

Trace EDA converter: .trace_sch/.trace_pcb <-> KiCad s-expression, plus the trace_parser. Single source of truth for the CLI, backend, and desktop.

Project description

buildwithtrace-converter

The Trace EDA converter, extracted into a single installable package so the CLI, backend, and desktop app stop carrying their own copies.

It converts between Trace's intermediate .trace_sch / .trace_pcb format and KiCad's native .kicad_sch / .kicad_pcb s-expression format (both directions), and exposes the trace_parser used to read the intermediate format.

  • Package (PyPI/dist) name: buildwithtrace-converter
  • Import root: buildwithtrace_converter (a self-contained top-level — deliberately NOT a buildwithtrace.* namespace, to avoid colliding with the CLI's buildwithtrace package and the backend's vendored buildwithtrace.altium)
  • GitHub: buildwithtrace/converter (org, canonical) / elcruzo/trace-converter (personal)

Install

# core (pure stdlib, no deps)
pip install buildwithtrace-converter

# with the optional vector-search helper (numpy / onnxruntime / tokenizers)
pip install "buildwithtrace-converter[vectorsearch]"

Pre-publish (private), install from git or a local checkout:

pip install "buildwithtrace-converter @ git+https://github.com/buildwithtrace/converter@main"
pip install -e ../converter   # local dev

Usage

from buildwithtrace_converter.eeschema.trace_parser import parse_trace_sch
from buildwithtrace_converter.eeschema.trace_json_to_sexp import trace_json_to_sexp
from buildwithtrace_converter.eeschema.sexp_to_trace_json import sexp_to_trace_json
from buildwithtrace_converter.pcbnew.trace_parser import parse_trace_pcb

The unified file CLI (used by the desktop via subprocess):

python -m buildwithtrace_converter.eeschema.trace IN OUT -f trace_sch -t kicad_sch
python -m buildwithtrace_converter.pcbnew.trace  IN OUT -f trace_pcb -t kicad_pcb

Notes

  • Core is pure-stdlib (no runtime dependencies). Only common/local_vector_search.py needs the [vectorsearch] extra, and the embedding model + tokenizer are NOT bundled — pass their paths in.

  • Source of truth. Edit here. Consumers (trace-cli, backend, and later the Trace desktop) depend on this package; do not re-fork the sources.

  • Drift is enforced. scripts/verify_sync.py diffs every shared converter source against the bundled copies and exits non-zero on drift. Run it locally after editing (it defaults to the sibling trace-cli + Trace/trace bundles):

    python3 scripts/verify_sync.py
    

    It is also a CI gate: the converter-sync job in trace-cli/.github/workflows/ci.yml clones this repo and checks the CLI bundle on every PR.

  • License: see LICENSE (proprietary — distribute via a private index or git, not public PyPI).

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

buildwithtrace_converter-0.1.0.tar.gz (161.8 kB view details)

Uploaded Source

Built Distribution

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

buildwithtrace_converter-0.1.0-py3-none-any.whl (177.3 kB view details)

Uploaded Python 3

File details

Details for the file buildwithtrace_converter-0.1.0.tar.gz.

File metadata

  • Download URL: buildwithtrace_converter-0.1.0.tar.gz
  • Upload date:
  • Size: 161.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for buildwithtrace_converter-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4c864698f20037fd6430f8c81ea66edcb08ec5c2c3472a72a110aab36360e16c
MD5 7f5261c20250b4babd448bb2bc1d15ca
BLAKE2b-256 f9f967c7dfdaa7a9577a565b334258161e58de1e3154cc82ac5eef149891bd6d

See more details on using hashes here.

Provenance

The following attestation bundles were made for buildwithtrace_converter-0.1.0.tar.gz:

Publisher: release.yml on elcruzo/trace-converter

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file buildwithtrace_converter-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for buildwithtrace_converter-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bd2fdb541f7f52b9a8bd760e32f55271e970e0a2c2322153c2bfec2665ef9d53
MD5 16da2cf96e4599347c74cb11a6aaf956
BLAKE2b-256 44e49461ff42fcc0d1d6ff41f7ed193f7e168956beee899931750f37fd043f6b

See more details on using hashes here.

Provenance

The following attestation bundles were made for buildwithtrace_converter-0.1.0-py3-none-any.whl:

Publisher: release.yml on elcruzo/trace-converter

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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