Skip to content

Commit

Permalink
Merge pull request datalad#7460 from mslw/doc-subdataset-candidates
Browse files Browse the repository at this point in the history
Fix docstring about "getting subdatasets" in get
  • Loading branch information
yarikoptic authored Aug 1, 2023
2 parents 5b69f70 + 1e42133 commit 9fe3f9e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
6 changes: 6 additions & 0 deletions changelog.d/pr-7460.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
### 📝 Documentation

- Fix a property name and default costs described in "getting subdatasets" section of `get` documentation.
Fixes [#7458](https://github.com/datalad/datalad/issues/7458) via
[PR #7460](https://github.com/datalad/datalad/pull/7460)
(by [@mslw](https://github.com/mslw))
16 changes: 10 additions & 6 deletions datalad/distribution/get.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def _get_flexible_source_candidates_for_submodule(ds, sm):
under the shortened name `id`.
Additionally, the URL of any configured remote that contains the respective
submodule commit is available as `remote-<name>` properties, where `name`
submodule commit is available as `remoteurl-<name>` property, where `name`
is the configured remote name.
Lastly, all candidates are sorted according to their cost (lower values
Expand Down 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 All @@ -784,7 +788,7 @@ class Get(Interface):
under the shortened name `id`.
Additionally, the URL of any configured remote that contains the respective
submodule commit is available as `remote-<name>` properties, where `name`
submodule commit is available as `remoteurl-<name>` property, where `name`
is the configured remote name.
Hence, such a template could be `http://example.org/datasets/{id}` or
Expand Down

0 comments on commit 9fe3f9e

Please sign in to comment.