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

General create-sibling RF and few enhancements #1232

Merged
merged 24 commits into from
Jan 29, 2017
Merged

Conversation

mih
Copy link
Member

@mih mih commented Jan 27, 2017

So far, mostly sorting checks to fail as early (and as cheap) as possible, plus some RF to use more common code. And now also various minor fixes and simplifications. Brought back previously disabled tests.

If you are happy about what you see feel free to click the merge button.

@mih mih added the WIP work in progress label Jan 27, 2017
@codecov-io
Copy link

codecov-io commented Jan 27, 2017

Codecov Report

Merging #1232 into master will increase coverage by 0.04%.
The diff coverage is 87.91%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1232      +/-   ##
==========================================
+ Coverage   89.01%   89.06%   +0.04%     
==========================================
  Files         235      235              
  Lines       23688    23728      +40     
==========================================
+ Hits        21086    21133      +47     
+ Misses       2602     2595       -7
Impacted Files Coverage Δ
datalad/interface/common_opts.py 100% <ø> (ø) ⬆️
datalad/distribution/tests/test_target_ssh.py 98.79% <100%> (+0.14%) ⬆️
datalad/distribution/add_sibling.py 91.66% <83.33%> (+2.51%) ⬆️
datalad/distribution/create_sibling.py 81.98% <84.54%> (+3.65%) ⬆️

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 f3320d5...be2b174. Read the comment docs.

raise ValueError("""insufficient information for target creation
(needs at least a dataset and a SSH URL).""")
# there is no point in doing anything further
not_supported_on_windows(
Copy link
Member

Choose a reason for hiding this comment

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

This is superfluous. SSHManager instantiation raises this before we get here.

Copy link
Member Author

Choose a reason for hiding this comment

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

Cool. Note that I only moved this up....

sshri = RI(sshurl)

if not isinstance(sshri, SSHRI) \
and not (isinstance(sshri, URL) and sshri.scheme == 'ssh'):
Copy link
Member

Choose a reason for hiding this comment

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

While at it: condition should be replaceable by not datalad.support.network.is_ssh() now.

Copy link
Member Author

Choose a reason for hiding this comment

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

OK, will do. If "should" means "that works".

Copy link
Member

Choose a reason for hiding this comment

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

:-) I used it with the entire connection sharing mechanic.
Therefore "should" means: "If I didn't miss an important point".

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.


# find datasets with existing remotes with the target name
remote_existing = [p for p in datasets
if name in datasets[p].repo.get_remotes()]
Copy link
Member

Choose a reason for hiding this comment

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

Not sure, but as a hint: If we run into issues here with real data, we might need an AnnexRepo.get_remotes() (overriding the one from GitRepo) in order to filter out special remotes.

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't get this. If we have an AnnexRepo instance, this will be called anyways. If we don't have one, we cannot have special remotes. What am I missing?

Copy link
Member

Choose a reason for hiding this comment

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

You miss, that AnnexRepo currently is just using the method inherited from GitRepo. It's all fine herein, but we might need to change this within AnnexRepo.

Copy link
Member Author

Choose a reason for hiding this comment

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

OK, so nothing that needs to go into this change.

Copy link
Member

Choose a reason for hiding this comment

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

Yes, just wanted to save you time, in case to try with an setup, that would trigger that issue. ;-)

Copy link
Member Author

Choose a reason for hiding this comment

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

@bpoldrack an issue for that would be good. This information will soon be lost in this PR otherwise.

@mih mih added needs-review and removed WIP work in progress labels Jan 27, 2017
@mih
Copy link
Member Author

mih commented Jan 28, 2017

FTR: All untested lines correspond to code that was just moved, but was there before.

@mih
Copy link
Member Author

mih commented Jan 29, 2017

FTR: This will not see further changes, unless required by something in #1237

@mih
Copy link
Member Author

mih commented Jan 29, 2017

Alrighty, life goes on. Merge.

@mih mih merged commit c3f4ad0 into datalad:master Jan 29, 2017
@mih mih deleted the rf-createsibling branch January 29, 2017 14:14
bpoldrack added a commit that referenced this pull request Feb 9, 2017
Continuation of #1232, focus on add-sibling, create-sibling*, publish interaction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fragile create_sibling() and add_sibling() interaction
3 participants