I am implementing a walk() method on the CodebaseResource and ProjectCodebase models that is analogous to the Resource and Codebase models from commoncode. I decided to try the walk() methods on a Project that I created using the scan_codebase pipeline. I created another pipeline that instantiates a ProjectCodebase instance and then tried using the walk() method, but I get the following exception: Codebase root cannot be determined. (https://github.com/nexB/scancode.io/blob/main/scanpipe/pipes/codebase.py#L71)
This is happening because the root is being stripped when the CodebaseResource is being created in the scan_codebase pipeline. I do not think the root should be stripped when scanning a codebase in order to preserve directory structure and to allow us to perform tree operations (for example, creating a Merkle tree from a Codebase).