Skip to content

Add integration test with verified BOM and submodules #238

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jackHay22
Copy link
Contributor

@jackHay22 jackHay22 commented Jul 8, 2025

Changes

  • Adds an integration test for which the BOM is compared against Altium
  • Uses a submodule to store device sheets for future design reuse support

TODO

  • Add check against the checked-in, altium-generated BOM

@jackHay22 jackHay22 requested a review from a team as a code owner July 8, 2025 14:17
Copy link

github-actions bot commented Jul 8, 2025

Coverage Summary

Total Project Coverage

  • Line Coverage: 87.27% (2207/2529)
  • Branch Coverage: 71.41% (457/640)

Coverage by File

File Line Coverage Branch Coverage Lines (Covered/Total) Branches (Covered/Total)
allspice/__init__.py 100.00% 100.00% 5/5 0/0
allspice/allspice.py 81.78% 68.42% 175/214 52/76
allspice/apiobject.py 84.52% 46.76% 1168/1382 101/216
allspice/baseapiobject.py 85.29% 75.00% 87/102 24/32
allspice/exceptions.py 100.00% 100.00% 14/14 0/0
allspice/ratelimiter.py 100.00% 100.00% 22/22 4/4
allspice/utils/__init__.py 100.00% 100.00% 0/0 0/0
allspice/utils/bom_generation.py 100.00% 100.00% 112/112 40/40
allspice/utils/core.py 94.12% 50.00% 16/17 1/2
allspice/utils/list_components.py 92.10% 87.40% 536/582 222/254
allspice/utils/netlist_generation.py 88.52% 78.57% 54/61 11/14
allspice/utils/retry_generated.py 100.00% 100.00% 18/18 2/2

Diff Coverage

Diff: origin/main...HEAD, staged and unstaged changes

No lines with coverage information in this diff.

assert len(bom) == 14
assert bom == csv_snapshot


Copy link
Contributor

Choose a reason for hiding this comment

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

This looks pretty similar to the test below it. Should we replace that one or is it testing something your new test doesn't?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For this test I added the design reuse repo as a submodule. When we support submodules via the project data API I plan on updating this particular integration test by removing the explicit design reuse repo reference.

That being said, I can close this PR if it's not worth merging and just include this test in the upcoming submodule support.

Copy link
Contributor

@kdumontnu kdumontnu Jul 8, 2025

Choose a reason for hiding this comment

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

I think it's worth testing both submodule as well as the explicit link for external sheets.

Can you add a comment in the test stating such?

If I understand it right: "TODO: Remove this explicit url once py-allspice / project.json supports submodules"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it's worth testing both submodule as well as the explicit link for external sheets.

There are a couple other tests that use the explicit repo reference that I won't change.

Copy link
Contributor

Choose a reason for hiding this comment

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

If we have duplicate tests doing the same thing, then we should remove them.

@shrik450
Copy link
Collaborator

shrik450 commented Jul 8, 2025

That being said, I can close this PR if it's not worth merging and just include this test in the upcoming submodule support.

I think that makes sense - this test isn't "red" because we're adding the reuse repo to the list, making it hard to tell what the point is right now.

@jackHay22 jackHay22 marked this pull request as draft July 9, 2025 20:03
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