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
The pairs repository_dir - metadata_base_url, and target_dir - target_base_url both describe the local and remote location respectively for the given file type. Maybe we could use names that show this duality more directly? Here are some naming suggestions
Rename repository_dir to metadata_dir. IMO repository_dir sounds more like something that contains metadata, targets and keys (at least that was the case in the old implementation), whereas here it only contains metadata.
Use remote and local prefixes, e.g. local_metadata_dir and remote_metadata_base_url or, to make the latter shorter, remote_metadata_dir?
At least metadata vs repository seems like an obvious flaw: no need to use two different terms.
The second one I'm not so sure about: the names are long enough that I already avoid naming the args because of it, and for me "url" vs "dir" does give a hint that one is remote and one is not remote...
Since we have this issue, I'll bring up another very mild naming concern I had.
When I read target_dir, I inevitably think of the man pages for ln or cp and that something is moved somewhere. There's probably not much we can do, but would targets_dir (plural) make it a little better? Or will that make it look like a directory for targets metadata? Not trying to bikeshed here, and happy to let it go if nobody thinks this is an issue or has a better idea.
Activity
lukpueh commentedon Oct 27, 2021
I did have a similar hunch. Just wanted to briefly rethink this together. But I'm fine with leaving those and don't make the names any longer.
lukpueh commentedon Oct 27, 2021
Since we have this issue, I'll bring up another very mild naming concern I had.
When I read
target_dir, I inevitably think of the man pages forlnorcpand that something is moved somewhere. There's probably not much we can do, but wouldtargets_dir(plural) make it a little better? Or will that make it look like a directory for targets metadata? Not trying to bikeshed here, and happy to let it go if nobody thinks this is an issue or has a better idea.jku commentedon Dec 8, 2021
Argument names currently
possible changes:
repository_dirclearer: rename tometadata_dirtarget_dirclearer: maybe rename totargets_dirordownload_dir? same rename should probably be done totarget_base_urlfilepathshould be better tied to the targets directory name: if we havedownload_dirwe could also renamefilepathtodownload_path?ngclient: Rename constructor arg