From 626ca70bf05032601e00431076e1a7f04075fbcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Szczepanik?= Date: Wed, 26 Jul 2023 15:34:38 +0200 Subject: [PATCH] docs: update candidate priorities (costs) in get docstring The doctrings for get and its helper function _get_flexible_source_candidates_for_submodule() seem to have diverged w.r.t. the default costs for subdataset source candidates. This commit brings them back in line by updating get's docstring. Some changes to cost values happened e.g. in 9138af0 After a cursory look, I am under the impression that the values reported in helper function's docstring match its code, and as long as they aren't modified elsewhere these would be the valid ones for get. --- datalad/distribution/get.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/datalad/distribution/get.py b/datalad/distribution/get.py index 248bc9f385..a5a927548a 100644 --- a/datalad/distribution/get.py +++ b/datalad/distribution/get.py @@ -752,16 +752,20 @@ class Get(Interface): cost is given in parenthesis, higher values indicate higher cost, and thus lower priority: + - A datalad URL recorded in `.gitmodules` (cost 590). This allows for + datalad URLs that require additional handling/resolution by datalad, like + ria-schemes (ria+http, ria+ssh, etc.) + + - A URL or absolute path recorded for git in `.gitmodules` (cost 600). + - URL of any configured superdataset remote that is known to have the desired submodule commit, with the submodule path appended to it. - There can be more than one candidate (cost 500). + There can be more than one candidate (cost 650). - In case `.gitmodules` contains a relative path instead of a URL, the URL of any configured superdataset remote that is known to have the desired submodule commit, with this relative path appended to it. - There can be more than one candidate (cost 500). - - - A URL or absolute path recorded in `.gitmodules` (cost 600). + There can be more than one candidate (cost 650). - In case `.gitmodules` contains a relative path as a URL, the absolute path of the superdataset, appended with this relative path (cost 900).