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.2.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.2-py3-none-any.whl (177.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: buildwithtrace_converter-0.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 50b88dea8a197b60983f9eba96d1e184316dbbaa6634bfaf3fecd51212aea838
MD5 2f435899994023bcf8e332b7ffb7a446
BLAKE2b-256 bca22b082b7975c6e939f18e0b33f792c72a5d929245e4a8d7ef423a16757701

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for buildwithtrace_converter-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ed973094016e9b3339ffedb4db698bfcac8106efe5b951f7ab9d342fa35b5d92
MD5 19d5a1712294c7d0349a710e29998e5a
BLAKE2b-256 1c26386e8d01851991ca7eb40ad6c0ac7903a456a75c9437a0101cd0f626d87e

See more details on using hashes here.

Provenance

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