Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UX/ENH: Disable reporting, and don't do superfluous internal subdatasets calls #6094

Merged
merged 2 commits into from
Oct 18, 2021

Conversation

adswa
Copy link
Member

@adswa adswa commented Oct 18, 2021

This fixes #6093 UX component by disabling the rendering of internal datalad subdataset calls that would be reported to the user.
It also fixes its performance component by not running an additional subdatasets query when the target dataset has already been installed.

Before, a simple get of a subdataset looked like this:

❱ datalad  get -n HCP1200/102513 
subdataset(ok): HCP1200/102513 (dataset)
[INFO   ] Fetching 'http://store.datalad.org/2e2/5d898-2c0f-11ea-961a-002590496000/config'                              
install(ok): /tmp/hcp/HCP1200/102513 (dataset) [Installed subdataset in order to get /tmp/hcp/HCP1200/102513]
subdataset(impossible): /tmp/hcp/HCP1200/102513 [path not contained in any matching subdataset]

Now, it looks like this:

datalad get -n HCP1200/104012 
[INFO   ] Fetching 'http://store.datalad.org/9c8/9f1c8-2be9-11ea-bf9f-002590496000/config'                              
install(ok): /tmp/hcp/HCP1200/104012 (dataset) [Installed subdataset in order to get /tmp/hcp/HCP1200/104012]

In case of a large hierarchy of subdatasets, the user would see one
subdataset(ok) result record per subdataset hierarchy level.
In the current implementation, the installation of a subdataset would
query subdatasets one time more than needed; By checking whether the
most recently installed subdataset is the target dataset and returning
when this is True, this change saves us one subdataset call.
@adswa adswa changed the title Ux 6093 UX/ENH: Disable reporting, and don't do superfluous internal subdatasets calls Oct 18, 2021
@adswa adswa added the semver-internal Changes only affect the internal API label Oct 18, 2021
@adswa adswa linked an issue Oct 18, 2021 that may be closed by this pull request
@codecov
Copy link

codecov bot commented Oct 18, 2021

Codecov Report

Merging #6094 (4963786) into maint (b33cf83) will increase coverage by 0.11%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##            maint    #6094      +/-   ##
==========================================
+ Coverage   90.11%   90.23%   +0.11%     
==========================================
  Files         312      312              
  Lines       42217    42219       +2     
==========================================
+ Hits        38045    38095      +50     
+ Misses       4172     4124      -48     
Impacted Files Coverage Δ
datalad/distribution/get.py 97.92% <100.00%> (+0.01%) ⬆️
datalad/support/tests/test_annexrepo.py 97.61% <0.00%> (+0.07%) ⬆️
datalad/tests/utils.py 89.22% <0.00%> (+0.10%) ⬆️
datalad/support/gitrepo.py 92.25% <0.00%> (+0.15%) ⬆️
datalad/utils.py 84.86% <0.00%> (+0.45%) ⬆️
datalad/ui/dialog.py 87.70% <0.00%> (+0.53%) ⬆️
datalad/tests/test_tests_utils.py 98.90% <0.00%> (+0.54%) ⬆️
datalad/tests/test_utils.py 97.19% <0.00%> (+0.56%) ⬆️
datalad/tests/test_log.py 99.30% <0.00%> (+0.69%) ⬆️
datalad/local/addurls.py 96.49% <0.00%> (+1.52%) ⬆️
... and 4 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b33cf83...4963786. Read the comment docs.

@adswa
Copy link
Member Author

adswa commented Oct 18, 2021

Ha, I haven't seen all green CIs in forever in my PRs 😄

Copy link
Member

@mih mih left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! Thx!

@mih mih merged commit ece1cbc into datalad:maint Oct 18, 2021
@adswa adswa deleted the ux-6093 branch October 18, 2021 12:34
@yarikoptic yarikoptic added this to the 0.15.3 milestone Nov 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver-internal Changes only affect the internal API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Superfluous and confusing subdataset result records with get
3 participants