You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Classify Eagle, OrCAD/Allegro, EasyEDA and Protel filenames - #471
IN-6 now covers the default output names of more EDA tools. The new classifier pass (other_eda_scheme in etchy-core/src/naming.rs) runs before the stem heuristics. It only matches extensions and stems that the tools document as defaults.
same extensions as Altium; pinned by its own corpus list, no new rules
These names stay Other on purpose, and the tests pin that: .drd (Eagle Excellon vs OrCAD drill drawing; content sniff still loads Excellon as drill), plane .gp<n> without the EasyEDA stem, Eagle .ly<n>, OrCAD .gnd/.pwr/.fab, Allegro user-named inner films, malformed copper_inner_l1.
Tests
corpus/naming/<scheme>.txt lists <filename> => <kind> with source citations. tests/naming_corpus.rs checks every file.
The altium.txt and kicad.txt baselines passed against the code before this change, so the existing classifications are unchanged.
Per-scheme unit tests are in naming.rs.
cargo fmt, clippy -D warnings, and cargo test --workspace --exclude etchy-gui all pass.
Docs: IN-6 is marked ✅, plus a CHANGELOG [Unreleased] entry and a note in corpus/README.md.
Add default output names for Eagle (legacy CAM and Eagle 9 templates), OrCAD Layout, Allegro artwork and EasyEDA to the filename classifier. Protel shares Altium's extensions and is pinned by its own corpus list. Ambiguous names (.drd, plane .gp<n>, Eagle .ly<n>, OrCAD .gnd/.pwr/.fab) stay Other. Per-scheme corpus lists live under corpus/naming/ and are checked by tests/naming_corpus.rs; the Altium and KiCad baselines are unchanged.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Review finding: Gerber_InnerLayer<n> was trusted with any extension. Now only .G<n>/.GP<n> with the same number classify as inner copper; anything else stays Other.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Layer detection still misclassifies files because the new scheme pass follows conflicting inner-copper heuristics and the DRILL substring check matches board-name prefixes, breaking rename-tolerant pairing.
Validate EasyEDA stem before generic numeric extensions
crates/etchy-core/src/naming.rs:135
The extension-agreement check is bypassed for .G<n>: classify("Gerber_InnerLayer2", "G3") returns InnerCopper(3) through the earlier generic extension branch, while the equivalent .GP3 mismatch returns Other. This can pair a conflicting EasyEDA export with the wrong copper layer. Validate recognized EasyEDA stems before the generic numeric-extension branch, explicitly return Other on disagreement, and add a mismatched .G3 regression case.
Review effort: Balanced
This branch has not been deployed
No deployments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #426
IN-6 now covers the default output names of more EDA tools. The new classifier pass (
other_eda_schemeinetchy-core/src/naming.rs) runs before the stem heuristics. It only matches extensions and stems that the tools document as defaults..cmp .sol .stc .sts .plc .pls .crc .crscopper_top[_l1],copper_inner_l<n>(physical position → ordinal),copper_bottom[_l<n>],soldermask_*,solderpaste_*,silkscreen_*,profile.gbr.top .bot .smt .smb .sst .ssb,.ast→ documentationTOP.art,BOTTOM.art,SOLDERMASK_*,SILKSCREEN_*,PASTEMASK_*;DRILL.art→ documentation (previously read as the drill layer)Gerber_InnerLayer<n>(any ext, incl. plane.GP<n>),.GTA/.GBA→ documentationThese names stay
Otheron purpose, and the tests pin that:.drd(Eagle Excellon vs OrCAD drill drawing; content sniff still loads Excellon as drill), plane.gp<n>without the EasyEDA stem, Eagle.ly<n>, OrCAD.gnd/.pwr/.fab, Allegro user-named inner films, malformedcopper_inner_l1.Tests
corpus/naming/<scheme>.txtlists<filename> => <kind>with source citations.tests/naming_corpus.rschecks every file.altium.txtandkicad.txtbaselines passed against the code before this change, so the existing classifications are unchanged.naming.rs.cargo fmt,clippy -D warnings, andcargo test --workspace --exclude etchy-guiall pass.Docs: IN-6 is marked ✅, plus a CHANGELOG [Unreleased] entry and a note in
corpus/README.md.