{"id":51564311,"url":"https://github.com/m-emm/mege-circuits","last_synced_at":"2026-07-10T13:32:40.548Z","repository":{"id":368175771,"uuid":"1283858877","full_name":"m-emm/mege-circuits","owner":"m-emm","description":"Alignment-first Python DSL for circuit schematics and stripboard layout previews.","archived":false,"fork":false,"pushed_at":"2026-06-29T10:08:19.000Z","size":67,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-29T12:08:50.098Z","etag":null,"topics":["circuits","python","schematics","schemdraw","stripboard"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/m-emm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-29T09:54:00.000Z","updated_at":"2026-06-29T10:08:22.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/m-emm/mege-circuits","commit_stats":null,"previous_names":["m-emm/mege-circuits"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/m-emm/mege-circuits","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-emm%2Fmege-circuits","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-emm%2Fmege-circuits/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-emm%2Fmege-circuits/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-emm%2Fmege-circuits/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/m-emm","download_url":"https://codeload.github.com/m-emm/mege-circuits/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-emm%2Fmege-circuits/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35333326,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-10T02:00:06.465Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["circuits","python","schematics","schemdraw","stripboard"],"created_at":"2026-07-10T13:32:39.775Z","updated_at":"2026-07-10T13:32:40.540Z","avatar_url":"https://github.com/m-emm.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mege-circuits\n\n`mege-circuits` is an alignment-first Python DSL for drawing small circuit\nschematics and projecting them onto diagnostic stripboard-style layout previews.\n\nIt grew out of the Ender 3 V3 KE IDEX wiring work, but is now a standalone\nproject for reusable circuit drawing, stripboard visualization, and experiments\naround hand-buildable electronics layouts.\n\nStatus: early open-source extraction. The schematic API and current\nschematic-to-stripboard projection are useful and tested, but the projection is\nnot yet a verified stripboard router or manufacturing plan.\n\n## Install\n\nFrom PyPI:\n\n```bash\npip install mege-circuits\n```\n\nFor local development:\n\n```bash\ngit clone git@github.com:m-emm/mege-circuits.git\ncd mege-circuits\npip install -e \".[testing]\"\n```\n\nVector A4 stripboard PDF generation uses `rsvg-convert`. Install it with\n`brew install librsvg` on macOS or `sudo apt-get install librsvg2-bin` on\nDebian/Ubuntu.\n\n## Quick Start\n\n```python\nfrom pathlib import Path\n\nfrom mege_circuits.simple import *\n\n\nvcc_net = create_net(\"vcc\")\nout_net = create_net(\"out\")\ngnd_net = create_net(\"gnd\")\n\nvcc = create_node(Dot, \"vcc\", net=vcc_net, label=\"+5V\")\nout = create_node(Dot, \"out\", net=out_net, label=\"OUT\")\ngnd = create_node(Ground, \"gnd\", net=gnd_net)\n\nr1 = create_element(Resistor, \"R1\", \"10K\", vcc, out)\nr2 = create_element(Resistor, \"R2\", \"20K\", out, gnd)\n\nr1 = align(r1, vcc, Alignment.STACK_BOTTOM)\nout = align(out, r1, Alignment.BOTTOM)\nr2 = align(r2, out, Alignment.STACK_BOTTOM)\ngnd = align(gnd, r2.end, Alignment.CENTER)\n\nschema = create_schema([vcc, out, gnd], [r1, r2])\nrender_schemdraw(schema, file=Path(\"voltage_divider.svg\"))\n```\n\nUse a `.png` filename to render a PNG preview.\n\n## Examples\n\nRun the small schematic examples from the repository root:\n\n```bash\npython examples/voltage_divider.py\npython examples/stripboard_blank.py\n```\n\nThe main real-world integration/regression example is the Pico-to-TB6600\nstripboard interface:\n\n```bash\npython examples/integration/tb6600_stripboard_interface.py\npython examples/integration/tb6600_stripboard_layout.py\n```\n\nThose scripts render both schematic and diagnostic stripboard projection\nartifacts next to the example by default. The test suite renders them into\n`examples/integration/diagrams/` as gitignored SVG/PNG files so the latest\nintegration output is easy to inspect after changes. Each render uses a unique\ntimestamped filename to avoid local preview caches; stable filenames in that\ndirectory are symlinks to the newest generated artifacts.\n\nFor the Mege Ender IDEX printer wiring, the source of truth lives in the\n`mege-ender-3v3ke-idex` repository. This copy stays here to exercise the public\nschematic and verified stripboard APIs against a realistic circuit.\n\n## Documentation\n\n- [DSL guide](docs/dsl-guide.md)\n- [Alignment notes](docs/alignment-based-schemdraw.md)\n- [Pinout diagrams](docs/pinout.md)\n- [Stripboard planning blueprint](docs/blueprint.md)\n- [PyPI publishing](docs/pypi-publishing.md)\n\nThe blueprint describes how the current projection path should evolve into a\nnetlist-driven, verified stripboard planner while keeping the visualization\nengine.\n\n## Development\n\n```bash\npip install -e \".[testing]\"\npython -m pytest\n```\n\nSlow integration and optimizer regressions are skipped by default. Run them\nexplicitly when changing the stripboard router or generated TB6600 artifacts:\n\n```bash\npython -m pytest --runslow\npython -m pytest --runslow -m slow\n```\n\nCI runs the test suite on Python 3.11 and 3.12.\n\n## License\n\nMIT. See [LICENSE.txt](LICENSE.txt).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm-emm%2Fmege-circuits","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fm-emm%2Fmege-circuits","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm-emm%2Fmege-circuits/lists"}