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: Support dataset aliases in RIA stores #4459
Conversation
`clone()` can now handle URLs of the format 'ria+<protocol>://<storelocation>#~<aliasname>' in addition to those containing UUIDs. A future addition should likely equip `create-sibling-ria()` with the ability to establish those aliases too. But for now it is not clear to me how to do that best (in particular how to perform properly on reconfigure). Given time-pressure this needs to wait for another time. Fixes dataladgh-4424
LGTM. Somehow I like the tilde. |
trace = '{}/{}'.format(dsid[:3], dsid[3:]) | ||
default_destpath = dsid | ||
elif dsid.startswith('~'): | ||
trace = 'alias/{}'.format(dsid[1:]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since this is more of an internal purpose, why not to have it as .alias/
or even .ria/aliases/
or alike? then you could still have an alias
dataset (happen ria allow it at some point)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is fine to not have further obfuscation. Having a dataset stored in a directory named like this would represent a fundamental concept change. I doubt that we would keep the name or URL scheme at that point.
sorry if I am missing something. |
All ria URLs require explicit handling. None are meant to expose the underlying store organization. That organization is versioned and may change. URLs must not change in that case. |
haven't spotted any reflection of any possible versioning of the "organization" in the code ATM... but it is ok with me if you say that no direct symlinks would work. |
This looks nice implementation-wise, and I don't have any issue with using
It seems to me that there is freedom to restructure only in terms of future cloners. Wouldn't it break all existing clones that already point directly to the resolved location? An example clone from a ria test:
|
Codecov Report
@@ Coverage Diff @@
## master #4459 +/- ##
===========================================
+ Coverage 49.62% 88.90% +39.28%
===========================================
Files 285 285
Lines 37844 37900 +56
===========================================
+ Hits 18779 33696 +14917
+ Misses 19065 4204 -14861
Continue to review full report at Codecov.
|
Yes, correct. The explicitness is there, after the ria URLs get resolved. That is no change from before. I think, if persistence like that is desired/required than it should either be achieved at the server side, or with a dedicated remote helper (I tried one of those already https://github.com/datalad/git-remote-rclone) re @yarikoptic You are correct that there is no trace of versioning in the code, because we are still at version |
Given the carefully positive feedback, I will merge this now. thx! |
clone()
can now handle URLs of the formatria+<protocol>://<storelocation>#~<aliasname>
in addition to those containing UUIDs (examples inside).
A future addition should likely equip
create-sibling-ria()
with the abilityto establish those aliases too. But for now it is not clear to me how to
do that best (in particular how to perform properly on reconfigure).
Given time-pressure this needs to wait for another time.
Fixes gh-4424