Skip to content

Commit

Permalink
docs: update candidate priorities (costs) in get docstring
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mslw committed Jul 26, 2023
1 parent 09cd0b8 commit 626ca70
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions datalad/distribution/get.py
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down

0 comments on commit 626ca70

Please sign in to comment.