Skip to content

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
@codacy-production
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 <jan.kowalleck@gmail.com>
@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

2 participants