Skip to content

Support 24/12 Eco BoM#693

Merged
Andy-Grigg merged 29 commits into
mainfrom
feat/support-2412-bom
Feb 19, 2025
Merged

Support 24/12 Eco BoM#693
Andy-Grigg merged 29 commits into
mainfrom
feat/support-2412-bom

Conversation

@Andy-Grigg

@Andy-Grigg Andy-Grigg commented Jan 31, 2025

Copy link
Copy Markdown
Collaborator

Closes #689

  • Add a new eco2412 submodule for the 24/12 eco schema.
  • Refactor the bom_helper submodule to be able to handle different BoMs with different namespaces. Any supported BoM can be loaded and dumped, and a BoM can be converted to a different namespace

This is part of a series of 3 PRs:

  1. Optionally raise exceptions if a BoM can't be fully deserialized #702
  2. Move bom types to submodule #703
  3. This PR

Comment thread src/ansys/grantami/bomanalytics/bom_types/__init__.py Outdated
@github-actions github-actions Bot added documentation Improvements or additions to documentation enhancement New features or code improvements labels Jan 31, 2025
@codecov

codecov Bot commented Jan 31, 2025

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 96.69903% with 17 lines in your changes missing coverage. Please review.

Project coverage is 97.76%. Comparing base (5306a89) to head (9149b5f).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/ansys/grantami/bomanalytics/_bom_helper.py 89.52% 11 Missing ⚠️
...ntami/bomanalytics/bom_types/eco2301/_bom_types.py 83.33% 2 Missing ⚠️
...ntami/bomanalytics/bom_types/eco2412/_bom_types.py 99.43% 2 Missing ⚠️
...ntami/bomanalytics/bom_types/gbt1205/_bom_types.py 66.66% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #693      +/-   ##
==========================================
+ Coverage   97.64%   97.76%   +0.11%     
==========================================
  Files          24       28       +4     
  Lines        2591     3038     +447     
==========================================
+ Hits         2530     2970     +440     
- Misses         61       68       +7     
Flag Coverage Δ
integration 82.02% <76.89%> (-0.65%) ⬇️
unittests 97.39% <96.69%> (+0.17%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@Andy-Grigg Andy-Grigg force-pushed the feat/support-2412-bom branch from 75cb128 to dd79fef Compare February 12, 2025 22:03
@Andy-Grigg Andy-Grigg force-pushed the feat/support-2412-bom branch from dd79fef to 683335f Compare February 12, 2025 22:13
@Andy-Grigg Andy-Grigg changed the base branch from main to maint/move-bom-types-to-submodule February 12, 2025 22:13
@Andy-Grigg Andy-Grigg force-pushed the feat/support-2412-bom branch from 683335f to 08f7681 Compare February 12, 2025 23:53
Comment thread src/ansys/grantami/bomanalytics/bom_types/_bom_reader.py Outdated
Comment thread src/ansys/grantami/bomanalytics/bom_types/eco2412/__init__.py
@Andy-Grigg

Copy link
Copy Markdown
Collaborator Author

The first example test sometimes times out. I'll try upgrading, see if that fixes it.

Base automatically changed from maint/move-bom-types-to-submodule to main February 14, 2025 16:55
Comment thread src/ansys/grantami/bomanalytics/bom_types/_bom_reader.py
@Andy-Grigg

Copy link
Copy Markdown
Collaborator Author

Since we've converted the reader and writer classes to generics, we could define the BoMHandler class itself as a generic instead.

It's a choice between whether we want to make the user decide ahead of time which version BoM version they want to work with or not.

Comment thread doc/source/api/bom_builder/eco2301.rst Outdated
Comment thread src/ansys/grantami/bomanalytics/_bom_helper.py Outdated
Comment thread src/ansys/grantami/bomanalytics/_bom_helper.py Outdated
Comment thread src/ansys/grantami/bomanalytics/_bom_helper.py Outdated
Comment thread src/ansys/grantami/bomanalytics/_bom_helper.py Outdated
Comment thread tests/test_bom_handler.py
@Andy-Grigg Andy-Grigg added this pull request to the merge queue Feb 19, 2025
Merged via the queue into main with commit a74f92a Feb 19, 2025
@Andy-Grigg Andy-Grigg deleted the feat/support-2412-bom branch February 19, 2025 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New features or code improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enhance BoM Handler to support 2412 XSD

3 participants