-
Notifications
You must be signed in to change notification settings - Fork 108
Codebaseresource features mapping with commoncode.resource #1585 #1638
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
base: main
Are you sure you want to change the base?
Conversation
2d10d52
to
1fd7e65
Compare
Signed-off-by: AbanoubAziz <[email protected]> Signed-off-by: abanoubfarhan <[email protected]>
Signed-off-by: AbanoubAziz <[email protected]> Signed-off-by: abanoubfarhan <[email protected]>
Signed-off-by: abanoubfarhan <[email protected]>
27eb239
to
fc85c21
Compare
Hi @AyanSinhaMahapatra , I have made some changes to the |
Signed-off-by: abanoubfarhan <[email protected]>
Hello @tdruez, Can you please review the changes I have made and tell me if it require any further imporvements ? |
scanpipe/models.py
Outdated
""" | ||
if not self.has_parent(): | ||
return [] | ||
anscesotrs = deque() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor typo:
anscesotrs = deque() | |
ancestors = deque() |
scanpipe/models.py
Outdated
that can be serialized to JSON, YAML, etc. it can be used to reconstruct | ||
the resource | ||
""" | ||
serializable = defaultdict(dict) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why two nested dicts and a defaultdict?
scanpipe/models.py
Outdated
@@ -3059,6 +3078,19 @@ def as_spdx(self): | |||
types=self.get_spdx_types(), | |||
) | |||
|
|||
def serialize(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you really need this function? or is this used only for tests? If so move if there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so after second considerations, even in testing so I removed it from both sides.
Signed-off-by: Abanoub Aziz <[email protected]>
Thanks for your feedback @pombredanne , I have reviewed the code and removed the unnecessary |
Fixes #1585
Tasks
CodeBaseResource
model and tested itCodebaseResource
model and tested it