Skip to content

Conversation

@JonoYang
Copy link
Member

@JonoYang JonoYang commented Mar 1, 2023

* Remove root property and create root_resources
* Update walk to walk from root resources
* Update tests

@JonoYang JonoYang requested a review from tdruez March 1, 2023 02:45
@JonoYang
Copy link
Member Author

JonoYang commented Mar 1, 2023

    * Remove root property and create root_resources
    * Update walk to walk from root resources
    * Update tests

Signed-off-by: Jono Yang <jyang@nexb.com>
@JonoYang JonoYang force-pushed the update-ProjectCodebase branch from 5558430 to 61bd452 Compare March 1, 2023 02:48
@tdruez
Copy link
Contributor

tdruez commented Mar 2, 2023

@tdruez Is this something we want to keep?

Nop, removed in 3cf6394

@tdruez tdruez merged commit 3105715 into main Mar 2, 2023
@tdruez tdruez deleted the update-ProjectCodebase branch March 2, 2023 15:42
@tdruez
Copy link
Contributor

tdruez commented Mar 2, 2023

@JonoYang This seems related to #378
What's the status on #378? Is it still relevant following this PR?

@JonoYang
Copy link
Member Author

JonoYang commented Mar 2, 2023

@tdruez

#378 addresses the same issue I had before, where I wanted a root CodebaseResource created whenever we create a Project such that I can do depth-first traversal of a Project codebase. I made changes to create a root CodebaseResource with the name and path of ., but there were issues with creating a VirtualCodebase object from scancode.io JSON results where the we could not visit any other Resource than the root Resource in the VirtualCodebase because no other Resource starts with . (VirtualCodebase/Resource walk logic uses the parent path to find its children). The changes I made in this PR work around this issue by just walking from each Resource in the root of the project, rather than from a single root resource. This way, we do not need to perform major changes to how Project/CodebaseResource and commoncode Codebase/VirtualCodebase/Resource works.

@tdruez
Copy link
Contributor

tdruez commented Mar 3, 2023

@JonoYang could you add an entry with those implementation details in the CHANGELOG about the changes?

JonoYang added a commit that referenced this pull request Mar 3, 2023
    *Add entry for PR #624

Signed-off-by: Jono Yang <jyang@nexb.com>
tdruez pushed a commit that referenced this pull request Mar 13, 2023
*Add entry for PR #624

Signed-off-by: Jono Yang <jyang@nexb.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants