Skip to content

Import: document EDA/KiCad columns, add regression tests, fix eda_invisible inversion#1436

Open
Sebbeben wants to merge 1 commit into
Part-DB:masterfrom
Sebbeben:fix/import-eda-info-aliases
Open

Import: document EDA/KiCad columns, add regression tests, fix eda_invisible inversion#1436
Sebbeben wants to merge 1 commit into
Part-DB:masterfrom
Sebbeben:fix/import-eda-info-aliases

Conversation

@Sebbeben

@Sebbeben Sebbeben commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Summary

While importing parts with KiCad/EDA columns I hit some rough edges around the EDA import fields. This PR
does three small things: documents the EDA import columns (they were undocumented), locks in the two
supported column forms with tests, and fixes one alias that stored the wrong value.

1. Document the EDA / KiCad import columns

The eda_* import columns weren't documented anywhere, which made the flat names hard to discover. Added a
section to docs/usage/import_export.md listing them, and noting that the importer accepts both:

  • the flat form (eda_kicad_symbol, eda_value, … and short aliases like kicad_symbol), and
  • the nested eda_info.* form used by the CSV/JSON export and by the shipped part_import_example.csv
    (eda_info.kicad_symbol, …).

2. Regression tests for both column forms

The nested eda_info.* form already works today (the CSV encoder un-flattens the dotted headers and the
eda_info embeddable is in the import serialization group), but it wasn't covered by a test — so an export →
re-import round-trip, and the EDA columns in the example CSV, could silently regress. Added to
EntityImporterTest:

  • testImportAcceptsNestedEdaInfoColumnseda_info.kicad_symbol / …footprint / …reference_prefix /
    …value fill the part's EdaInfo.
  • testImportAcceptsFlatEdaColumns — the flat form and its aliases still work.

3. Fix: eda_invisible stored the inverse value

eda_invisible was mapped to eda_visibility by a plain key-rename, so eda_invisible=1 set
visibility=true — i.e. it made the part visible, the opposite of what the name says. It's now handled
explicitly and inverted, so eda_invisible=1 correctly hides the part. Covered by
testImportInvisibleAliasInvertsVisibility.

Notes

No schema/behaviour change beyond the eda_invisible fix; the nested-column support was already present and is
only being documented and tested here.

@Sebbeben Sebbeben force-pushed the fix/import-eda-info-aliases branch from 4b38eda to f25eb26 Compare July 5, 2026 10:55
@codecov

codecov Bot commented Jul 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 58.50%. Comparing base (523b07e) to head (16f0c4d).

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1436      +/-   ##
============================================
+ Coverage     58.49%   58.50%   +0.01%     
- Complexity     8701     8703       +2     
============================================
  Files           638      638              
  Lines         28123    28125       +2     
============================================
+ Hits          16451    16455       +4     
+ Misses        11672    11670       -2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

…nvisible inversion

- Document the eda_* import columns in docs/usage/import_export.md: the flat form and its short
  aliases, and the nested eda_info.* form used by the CSV/JSON export and the shipped
  part_import_example.csv.
- Add EntityImporterTest coverage locking in that BOTH the nested eda_info.* form and the flat
  form import the EDA fields correctly (the nested form already worked via the serializer but was
  untested, so an export -> re-import round-trip could silently regress).
- Fix the eda_invisible alias: it was a plain key-rename to eda_visibility, so eda_invisible=1
  stored visibility=true (made the part visible - the opposite of the name). It is now handled
  explicitly and inverted.
@Sebbeben Sebbeben force-pushed the fix/import-eda-info-aliases branch from f25eb26 to 16f0c4d Compare July 5, 2026 11:05
@Sebbeben Sebbeben changed the title Import: accept nested eda_info.* EDA columns (from the API/JSON export) so exported files re-import cleanly Import: document EDA/KiCad columns, add regression tests, fix eda_invisible inversion Jul 5, 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.

1 participant