Skip to content

feat: add spdip alias for shrink DIP footprints#508

Closed
bitdeckai wants to merge 3 commits intotscircuit:mainfrom
bitdeckai:bounty-spdip28
Closed

feat: add spdip alias for shrink DIP footprints#508
bitdeckai wants to merge 3 commits intotscircuit:mainfrom
bitdeckai:bounty-spdip28

Conversation

@bitdeckai
Copy link

Refs #180.\n\nAdds spdip footprint alias that maps to existing DIP geometry (default 300mil width / 2.54mm pitch) so spdip28 is supported. Includes a small test asserting geometry parity with dip28.\n\nTests: not run locally (bun not installed on this machine).

Copy link
Contributor

@rushabhcodes rushabhcodes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add snapshot test and kicad parity test

@bitdeckai
Copy link
Author

Added follow-up tests requested in review:\n\n1. Snapshot test for spdip28 in ests/spdip.test.ts\n2. KiCad parity test for spdip28 in ests/kicad-parity/spdip28_kicad_parity.test.ts\n\nCommit: de5a446\n\nNote: I could not run Bun locally in this environment due network timeouts while installing Bun; CI should run the full suite.

Comment on lines +6 to +21
test("spdip28 matches dip28 geometry parameters", () => {
const sp = fp.string("spdip28").json()
const dip = fp.string("dip28").json()

expect(sp.num_pins).toBe(dip.num_pins)
expect(sp.w).toBe(dip.w)
expect(sp.p).toBe(dip.p)
expect(sp.id).toBe(dip.id)
expect(sp.od).toBe(dip.od)
})

test("spdip28 svg snapshot", () => {
const circuitJson = fp.string("spdip28").circuitJson() as AnyCircuitElement[]
const svgContent = convertCircuitJsonToPcbSvg(circuitJson)
expect(svgContent).toMatchSvgSnapshot(import.meta.path, "spdip28")
})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test file contains 2 test() functions (lines 6 and 17), which violates the rule that a *.test.ts file may have AT MOST one test(...). After that, the user should split into multiple, numbered files. To fix this, split the tests into separate files like spdip1.test.ts and spdip2.test.ts, with each file containing only one test() function.

Spotted by Graphite Agent (based on custom rule: Custom rule)

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

This comment came from an experimental review—please leave feedback if it was helpful/unhelpful. Learn more about experimental comments here.

Copy link
Contributor

@rushabhcodes rushabhcodes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

snapshot did not generate

@justinleeyang

This comment was marked as spam.

@bitdeckai bitdeckai closed this by deleting the head repository Mar 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants