tscircuit/autorouting-dataset-01
This code manages the hardware and electronic components for circuit design and PCB layout, defining components like resistors, capacitors, transistors, connectors, and footprints, and providing tools for component placement, PCB topology, and electrical connections.
- Version
- 1.0.102
- License
- unset
- Stars
- 4
lib/shouldAutorouterRun.ts
/**
* Decide when the autorouter should run in CLI-only dataset generation.
*/
export const shouldAutorouterRun = () => {
if (typeof process === "undefined" || !process.env) return false
if (process.env.TSCIRCUIT_DATASET_DISABLE_AUTOROUTER === "true") {
return false
}
const isCli = typeof window === "undefined" && Array.isArray(process.argv)
if (!isCli) return false
const argv = process.argv ?? []
return argv.some((arg) => arg.includes("create-dataset"))
}