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]"

For local development, install from a checkout:

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.

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.3.tar.gz (164.4 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.3-py3-none-any.whl (180.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: buildwithtrace_converter-0.1.3.tar.gz
  • Upload date:
  • Size: 164.4 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.3.tar.gz
Algorithm Hash digest
SHA256 578c473e1e0b25aaf8b854d2cd49ee2eec600bfd559a64e12982713beb7f205b
MD5 ed6df3d2c78bea0ed0a8737d180c136b
BLAKE2b-256 dda461047c849804ec14532b26839e3ea326da835f481743c4025ec11067533b

See more details on using hashes here.

Provenance

The following attestation bundles were made for buildwithtrace_converter-0.1.3.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.3-py3-none-any.whl.

File metadata

File hashes

Hashes for buildwithtrace_converter-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e38b2d7db9eb7a5b521e53f6ea79dd1f90665cc93222b65546d5f5dd88064a6f
MD5 954a7c7be731d5fa80f0942615a7facb
BLAKE2b-256 1d4b29201711ef491d344c3eeb47af337e217bda89a8bda2fac7d43f6b215bb5

See more details on using hashes here.

Provenance

The following attestation bundles were made for buildwithtrace_converter-0.1.3-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