Spaces:
Running

OpenPELS / docs /architecture /repository_map.md
minjiechen's picture Elvis0001's picture
Add qualified 2:1 SI2, SP2, RSC2, and Buck_Stacked workflows (#1)
0a53b5b
|
Raw History Blame Contribute Delete
10.2 kB

OpenPELS repository map

The Git checkout is a deployable release plus local development tooling. The source archive includes the larger Analog Canvas workspace and the earlier analysis project. This distinction matters when tracing code or identifying where an implementation change would belong. Archived paths referenced here are relative to the archive root. The existing local-source/ extraction provides the line references.

Tracked checkout

Path Role and key symbols
AGENTS.md, README.md, .gitignore Development rules, local launch and rebuild instructions, and local state exclusions. AGENTS.md:5, README.md:38, .gitignore:1
run-local.sh, Dockerfile, requirements-simulator.txt, restore-local-assets.py Native and container entry points, Python dependency bounds, and a separate public asset restore utility that checks pointer size and SHA-256. Asset restoration is a checkout setup operation. run-local.sh:14, Dockerfile:1, restore-local-assets.py:18
server.py WorkbenchHandler, create_server(), CLI and static/API routing. server.py:20
simulator_service.py, simulator-source.json Simulator, request validation, source case instrumentation, job queue and artifacts, and engine provenance/checksum. simulator_service.py:40, simulator_service.py:85, simulator-source.json:1
simulator_frame.py, simulator_bridge.js simulator_html() rewrites the pinned GUI at serve time. Browser functions adapt its legacy call sites to the asynchronous API, retain the latest reference while busy, and expose artifacts. simulator_frame.py:4, simulator_bridge.js:2, simulator_bridge.js:100
simulator/library/ngspice/studies/xfly6s_xfly8s_c3l_scaled_comparison/gui/xfly_compare_gui.py Runtime copy of the pinned engine, including original HTML, deck transformations, subprocess execution, raw parser, plots, and standalone handler. The OpenPELS server imports it rather than starting its standalone server. engine:62, engine:1123, engine:1695
library/ngspice/studies/xfly6s_xfly8s_c3l_scaled_comparison/ Historical study retained in Git with its own GUI, scripts, graphs, raw deck sources, and figures. The active launcher uses the separate simulator/ copy and the service points it at static/testbenches/. study README, run-local.sh:18, simulator_service.py:101
static/index.html, pe.js, pe.css, gallery.js, analysis.js, simulator.js Workbench shell and view coordination, gallery registry/filter, editor recovery, and frame contracts. index.html:137, pe.js:24, gallery.js:4
static/compare/ Browser analysis UI, catalog and prompt (models-data.json), equations and image inspection (engine.js), constraint screening (recommend.js), technology example (technology.js), and score presentation (scoreboard.js). assets/ contains reference drawing SVGs. compare/index.html:13, engine.js:32, recommend.js:10
static/pe-editor.html, static/assets/ Built editor entry, hashed TypeScript/React output and lazy chunks, styles, fonts, and WebAssembly. Use corresponding source in the archive for human-readable editor logic. pe-editor.html:7
static/starters/ Manifest and editable .icproj.json projects with structural .sp inputs for buck2, XFLY6S, and XFLY8S. starters/index.json:1, starters/xfly6s.sp:1
static/testbenches/ Nine pinned runnable decks with manifest and case hashes, simulator schematic PNGs, a standalone validation runner, and a downloadable archive. index.json:1, run_testbench.py:21, testbench README
static/office/, static/sw.js, static/manifest.webmanifest, static/third-party/ Packaged supporting assets from the editor build. The Office task pane is a separate entry. The service worker file implements a shell cache with API exclusions, but its presence alone does not establish registration by the OpenPELS entry or verified offline coverage. office/taskpane.html:1, sw.js:61

Corresponding source archive

Archive path Role
openpels/apps/editor/src/pe/ OpenPELS editor composition and the electricalSignature() reference check. The Vite composition builds a desktop-style entry into dist-pe. editor.tsx:12, electrical-signature.ts:4, vite.pe.config.ts:6
openpels/apps/editor/src/app/, document/, features/, hosts/, services/ Shared Analog Canvas application, transactional controller, editor surfaces, browser export delivery, and host service abstractions. App.tsx:669, document-controller.ts:444, editor-file-commands.ts:165
openpels/packages/ model and project-protocol provide schemas and the project codec. derived and edit-engine derive connectivity and transact edits. devices, symbols, and components supply definitions. spice, netlist, and rnl handle import, extraction and formats. exporters and render-svg generate graphical exports. agent-*, simulation-service, and spice-run supply upstream capabilities with different host composition. workspace manifest:11, project schema:115, connectivity.ts:99
openpels/apps/desktop/, apps/powerpoint/, apps/mcp-server/ Other upstream compositions bundled as source. The integrated launcher starts only server.py. An upstream application's presence does not establish an enabled OpenPELS capability. run-local.sh:14, archive package.json:30
openpels/scripts/openpels/ Integration source and build, fixture generation, packaging, deployment and verification scripts. build.py checks types, runs Vite, generates and verifies starters, and packages testbenches and the site. package-site.py copies and adapts the sibling analysis static files and generates the source ZIP. build.py:5, package-site.py:5, archived guide:12
openpels-analysis/ Sibling source of the reference analysis static scripts. Contains former standalone Python app.py, agent.py, model equations in models.py, and study copies. package-site.py copies its static/ subtree. The standalone Python server is outside current OpenPELS launch. package-site.py:11, legacy app.py:50, legacy models.py:151

Ownership by workflow

  • Gallery and handoff live in the workbench shell and analysis/simulator adapters. Check gallery.js where catalog IDs are mapped to starter/preset IDs and pe.js where view transitions and eligibility are enforced. gallery.js:4, pe.js:61
  • Editing, project compatibility and design exports belong to the native editor composition and its shared packages. A checked-in starter is a generated fixture. Its generator, emitted SPICE source, and browser loader are different stages. generate-starters.mjs:131, generate-starters.mjs:445, pe.js:185
  • Execution, artifacts, and retention belong to the deployed Python job service, pinned engine, and testbench inputs. Code that regenerates the site or deploys the Space is distinct from the runtime. simulator_service.py:172, simulator_service.py:214, archived guide:45
  • Local-only data includes .venv/, .openpels-runtime/, and local-source/. Git LFS stores the large assets as pointers in Git and hydrated payloads in the working tree and cache. The source archive, WASM, testbench images, and several fonts are among them. .gitignore:1, .gitattributes:31, restore-local-assets.py:18