Repository navigation
Make some helper functions for determining hashed bins part of repository_lib - #1058
Conversation
Remove the non-public function _get_hash() from repository_tool in favour of the public function get_target_hash() in repository_lib Signed-off-by: Joshua Lock <[email protected]>
|
TODO: these functions don't yet have explicit tests (though they are tested implicitly by the |
|
|
||
|
|
||
|
|
||
| def find_bin_for_hash(path_hash, number_of_bins): |
There was a problem hiding this comment.
Should perhaps be find_bin_for_target_hash() for better consistency with get_target_hash()
lukpueh
left a comment
There was a problem hiding this comment.
Thanks for relocating the code, @joshuagl! I support your find_bin_for_target_hash rename suggestion.
Also, I'm for moving on without adding explicit tests. The delegate_hashed_bins tests cover the functionality sufficiently for the time being. And we can still add tests when we set the public API in stone. What do you think?
Move repository_tool._find_bin_for_hash() and helper functions it uses to non-protected functions in repository_lib. _find_bin_for_hash() becomes find_bin_for_target_hash() These functions will be useful to adopters using the WIP low-level API for updating metadata files (see theupdateframework#1048) Signed-off-by: Joshua Lock <[email protected]>
7f1c790 to
ed45fb2
Compare
Pushed an update with the rename in ed45fb2
I think this makes sense, thanks @lukpueh |
Fixes issue #: N/A
Description of the changes being introduced by the pull request:
In order to support users of the WIP low-level API for updating individual metadata on addition of a target (see #1048), specifically Warehouse and PEP 458, make some of the helper functions for determining the appropriate bin for a given target part of the public API in
repository_lib.Please verify and check that the pull request fulfills the following
requirements: