CycloneDX / cyclonedx-python-lib

Python implementation of OWASP CycloneDX
https://cyclonedx.org/
Apache License 2.0
70 stars 40 forks source link

feat: add `cyclonedx.model.dependency.Dependency.provides` #735

Open uzairchhapra opened 2 weeks ago

uzairchhapra commented 2 weeks ago

Fixes #691

uzairchhapra commented 2 weeks ago

@jkowalleck PR is ready for review. I am not too sure about the test cases so any guidance here would help. Thanks!

jkowalleck commented 1 week ago

thank you for your contribution, @uzairchhapra .

the implementation looks promising.

Regarding tests, we tend to go with an integration-test snapshot-solution, over detailed unit tests. Please add new fixtures to https://github.com/CycloneDX/cyclonedx-python-lib/blob/main/tests/_data/models.py. your new function must start with get_bom_. After adding new test data, please recreate the snapshots as described here: https://github.com/CycloneDX/cyclonedx-python-lib/blob/main/tests/_data/snapshots/README.md

jkowalleck commented 1 week ago

@uzairchhapra , could you also see to integrate some plausibility-checks into model.bom.validate()

PS: you already did that, found it. that is fantastic.