git_well.git_discover_remote module

class git_well.git_discover_remote.GitDiscoverRemoteCLI(*args, **kwargs)[source]

Bases: DataConfig

Attempt to discover a ssh remote based on an ssh host.

Like git-sync, the remote machine must have the same directory structure relative to the home drive.

Valid options: []

Parameters:
  • *args – positional arguments for this data config

  • **kwargs – keyword arguments for this data config

classmethod main(cmdline=1, **kwargs)[source]

Example

>>> from git_well.git_discover_remote import GitDiscoverRemoteCLI
>>> from git_well.repo import Repo
>>> cls = GitDiscoverRemoteCLI
>>> repo = Repo.demo()
>>> # TODO: make a plausible scenario
>>> cmdline = 0
>>> kwargs = dict()
>>> kwargs['repo_dpath'] = repo
>>> import pytest
>>> with pytest.raises(Exception):
>>>     cls.main(cmdline=cmdline, **kwargs)
default = {'forward_ssh_agent': <Value(False)>, 'home': <Value(None)>, 'host': <Value(None)>, 'remote': <Value(None)>, 'remote_cwd': <Value(None)>, 'repo_dpath': <Value('.')>, 'test_remote': <Value(True)>}
git_well.git_discover_remote.fsspec_shh_connect(host)[source]
git_well.git_discover_remote.main(cmdline=1, **kwargs)

Example

>>> from git_well.git_discover_remote import GitDiscoverRemoteCLI
>>> from git_well.repo import Repo
>>> cls = GitDiscoverRemoteCLI
>>> repo = Repo.demo()
>>> # TODO: make a plausible scenario
>>> cmdline = 0
>>> kwargs = dict()
>>> kwargs['repo_dpath'] = repo
>>> import pytest
>>> with pytest.raises(Exception):
>>>     cls.main(cmdline=cmdline, **kwargs)