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

ENH: Record a dataset's ID in a superdataset on add/save (fixes gh-3303) #3304

Merged
merged 6 commits into from
Apr 10, 2019

Conversation

mih
Copy link
Member

@mih mih commented Apr 8, 2019

Otherwise we have incomplete identity information on all dataset components (i.e. we only have the state of a subdataset, but not its persistent ID). This is an issue during metadata extraction, where we would require subdatasets to be around in order to be able to give a full report.

We already ensure that create(force=True) does not alter a dataset's ID, so getting out of sync would require manual fiddling with DataLad's internal config. Sure be safe...

@mih mih added the Metadata label Apr 8, 2019
@mih mih force-pushed the enh-subds-id branch 2 times, most recently from d254ad3 to ac85a35 Compare April 8, 2019 16:28
@yarikoptic
Copy link
Member

Should be ok... but the code which starts relying on it (probably should later add check to install/clone) should assure to not crash if there is no ID recorded.

Copy link
Contributor

@kyleam kyleam left a comment

Choose a reason for hiding this comment

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

Makes sense.

The --add in the git config call made me pause, but I suppose it doesn't matter in practice.

@mih
Copy link
Member Author

mih commented Apr 8, 2019

Well, tests are going nuts in a few places. Apparently datalad/interface/tests/test_ls_webui.py tests on scenarios where .gitmodules is an annexed file. Not yet sure whether this makes any sense or why it is happening.

@mih
Copy link
Member Author

mih commented Apr 8, 2019

I think I should move this into rev_save(). It should still catch all relevant cases, but not run counter to more simple-minded command assumptions

mih and others added 3 commits April 9, 2019 14:36
…aladgh-3303)

Otherwise we have incomplete identity information on all dataset
components (i.e. we only have the state of a subdataset, but not its
persistent ID). This is an issue during metadata extraction, where we
would require subdatasets to be around in order to be able to give a
full report.

We already ensure that create(force=True) does not alter a dataset's
ID, so getting out of sync would require manual fiddling with DataLad's
internal config. Sure be safe...
@codecov
Copy link

codecov bot commented Apr 9, 2019

Codecov Report

Merging #3304 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3304      +/-   ##
==========================================
+ Coverage   91.03%   91.04%   +<.01%     
==========================================
  Files         263      263              
  Lines       34221    34229       +8     
==========================================
+ Hits        31154    31163       +9     
+ Misses       3067     3066       -1
Impacted Files Coverage Δ
datalad/core/local/tests/test_create.py 100% <100%> (ø) ⬆️
datalad/support/gitrepo.py 89.1% <100%> (+0.06%) ⬆️
datalad/interface/run_procedure.py 89.87% <0%> (+0.63%) ⬆️

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 e52de4c...bfd93f2. Read the comment docs.

@mih
Copy link
Member Author

mih commented Apr 9, 2019

Finally!

@mih mih merged commit 2e283e6 into datalad:master Apr 10, 2019
@mih mih deleted the enh-subds-id branch April 10, 2019 05:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants