Skip to content

[IDEA] feat!: discriminate every BomRef as promissed #861

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 1 commit into
base: main
Choose a base branch
from

Conversation

jkowalleck
Copy link
Member

@jkowalleck jkowalleck commented Jul 23, 2025

Note

This is a draft, an idea.

The philosophy/contract of this library, i it's early days, was to auto-populate all bom-refs,
so the JSON/XML result after deserializarion might be Bom-Link-able out of the box.

Over the years, some new bom-refs were introduced, and did no longer auto-populatd (maybe they were forgotten? maybe on purpose to prevent breaking changes?)

This PR is a fix to follow that contract, again.


BREAKING change

  • All known BomRefs for model classes are autopopulated when deserializing.
  • All known BomRefs for model classes are properly discriminated when deserializing.

TODO / DONE

  • have all the existing bomRefs added to BomRefDiscriminator.from_bom()
    • PostalAddress
    • Requirement
    • Level
    • Standard
  • adjust test's models if needed

  • on top of #938

@jkowalleck jkowalleck added enhancement New feature or request breaking change labels Jul 23, 2025
@jkowalleck jkowalleck changed the title feat!: discriminate all bomrefs [DRAFT] feat!: discriminate all bomrefs Jul 23, 2025
@jkowalleck jkowalleck force-pushed the feat/discriminate_all_bomrefs branch from 313c279 to b58abc7 Compare July 23, 2025 09:20
Copy link

codacy-production bot commented Jul 23, 2025

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.01% 100.00% (target: 80.00%)
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (0898cf7) 5684 5323 93.65%
Head commit (68794c4) 5695 (+11) 5334 (+11) 93.66% (+0.01%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#861) 12 12 100.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Signed-off-by: Jan Kowalleck <[email protected]>
@jkowalleck jkowalleck force-pushed the feat/discriminate_all_bomrefs branch from b58abc7 to 68794c4 Compare July 23, 2025 09:27
@jkowalleck jkowalleck changed the title [DRAFT] feat!: discriminate all bomrefs [IDEA] feat!: discriminate all bomrefs Jul 23, 2025
@jkowalleck jkowalleck changed the title [IDEA] feat!: discriminate all bomrefs [IDEA] feat!: discriminate every BomRef as promissed Jul 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant