Skip to content
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

BREAKING CHANGE: update models to use Set rather than List #160

Merged
merged 10 commits into from
Feb 8, 2022

Conversation

madpah
Copy link
Collaborator

@madpah madpah commented Feb 4, 2022

This PR looks to implement #159 for the reasons stated there.

As part of this, we have had to make our unit tests even better:

  • We should not (but previously did) care about ordering of elements in either JSON or XML output for comparisons to be equal - ordering DOES NOT MATTER for equality
  • Various updates made to adhere to PEP-0008 along the way

Resolves #159

…n `List[..]`

BREAKING CHANGE: update final models to use `@property`
wip

Signed-off-by: Paul Horton <[email protected]>
Signed-off-by: Paul Horton <[email protected]>
… from `List`

fix: change to how we are comparing XML output in tests so we do not care about element ordering

Signed-off-by: Paul Horton <[email protected]>
@madpah madpah requested a review from a team as a code owner February 4, 2022 10:23
@madpah madpah self-assigned this Feb 4, 2022
@madpah madpah linked an issue Feb 4, 2022 that may be closed by this pull request
Copy link
Member

@jkowalleck jkowalleck left a comment

Choose a reason for hiding this comment

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

all reviewd. added some remarks.

the outcome is such a milestone. 💟
now it is possible to create the structures and simply pass in the generators/iterables as parameters. which will make the cyclonedx-python likely more pythonic.

like

components = makeComponentFromRequirement(line) for line in requirements  # is a generator and no data is actually generated, until it is resolved 
Bom(components=components)

cyclonedx/model/service.py Outdated Show resolved Hide resolved
cyclonedx/model/bom.py Outdated Show resolved Hide resolved
@madpah madpah merged commit 142b8bf into feat/add-bom-services Feb 8, 2022
@madpah madpah deleted the feat/optional-lists-to-sets branch February 8, 2022 08:42
@madpah madpah mentioned this pull request Feb 8, 2022
@jkowalleck
Copy link
Member

also fixed #176

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BREAKING] All optional lists become non-optional sets
2 participants