You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be handy to obtain an aggregate of the information that dirhash used to compute the final hash for the root directory. For example, in the form of a ordered dictionary data structure that could be pretty printed to a yaml or json file. These printed files could be easily diffable, enabling use cases for logging or highlighting file tree or content changes to end users.
I see from the scantree examples, the .apply() function can be used for such recursive transforms:
It would be handy to obtain an aggregate of the information that
dirhash
used to compute the final hash for the root directory. For example, in the form of a ordered dictionary data structure that could be pretty printed to a yaml or json file. These printed files could be easily diffable, enabling use cases for logging or highlighting file tree or content changes to end users.I see from the scantree examples, the
.apply()
function can be used for such recursive transforms:However, the
root_node
internally computed for this is not easily accessed without reimementing much of the library internals.dirhash-python/src/dirhash/__init__.py
Line 269 in 37c8974
dirhash-python/src/dirhash/__init__.py
Line 296 in 37c8974
I'm also unsure yet how to leverage scantree with the
RecursionPath
class to render/print this aggregate data structure.https://github.com/andhus/scantree/blob/25b51ca9be973389d671565de20cbb021871521d/src/scantree/_path.py#L16
Related: colcon/colcon-package-selection#44
The text was updated successfully, but these errors were encountered: