Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master' into bf-6940-enh-3
* origin/master: Switch macOS appveyor builds to Monterey Automated deployment to update contributors 2022-12-14 BF: Don't change ui.backend of test process ENH(DX,TST): log at DEBUG about encountered error, unit-test that exception handling block RF: Move basic functionality to SpecialRemote BF: Don't overwrite AVAILABILITY Send ERROR to annex when special remote process fails Add Matthias Riße to .zenodo.json Update changelog.d/pr-7213.md [release-action] Autogenerate changelog snippet for PR 7213 NF: make extra_remote_settings configurable in git config Don't be scary when failing to annex-enable
- Loading branch information
Showing
19 changed files
with
219 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
### 🚀 Enhancements and New Features | ||
|
||
- New config `datalad.create-sibling-ghlike.extra-remote-settings.NETLOC.KEY=VALUE` allows to add and/or overwrite local configuration for the created sibling by the commands `create-sibling-<gin|gitea|github|gitlab|gogs>`. [PR #7213](https://github.com/datalad/datalad/pull/7213) (by [@matrss](https://github.com/matrss)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
### 🚀 Enhancements and New Features | ||
|
||
- The `siblings` command does not concern the user with messages about | ||
inconsequential failure to annex-enable a remote anymore. | ||
[PR #7217](https://github.com/datalad/datalad/pull/7217) | ||
(by [@bpoldrack](https://github.com/bpoldrack)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# emacs: -*- mode: python; py-indent-offset: 4; tab-width: 4; indent-tabs-mode: nil -*- | ||
# ex: set sts=4 ts=4 sw=4 et: | ||
# ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ## | ||
# | ||
# See COPYING file distributed along with the datalad package for the | ||
# copyright and license terms. | ||
# | ||
# ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ## | ||
"""Tests for the "main" driver of the special remotes""" | ||
|
||
import logging | ||
import os | ||
import pytest | ||
|
||
from ..main import main | ||
|
||
from ..base import AnnexCustomRemote | ||
|
||
from datalad.tests.utils_pytest import ( | ||
patch, | ||
swallow_logs, | ||
swallow_outputs, | ||
) | ||
from datalad.ui import ui | ||
|
||
|
||
def test_erroring_out(): | ||
class TooAbstract(AnnexCustomRemote): | ||
pass | ||
|
||
# patch to not let `main` change the ui.backend | ||
# of the test process (instead of a special remote process it is actually | ||
# targeting) | ||
with swallow_logs(new_level=logging.DEBUG) as cml, \ | ||
swallow_outputs() as cmo: | ||
with pytest.raises(SystemExit) as cme,\ | ||
patch.object(ui, "set_backend", autospec=True): | ||
main(args=[], cls=TooAbstract) | ||
assert cme.value.code == 1 | ||
assert 'passing ERROR to git-annex' in cml.out | ||
# verify basic correct formatting of string to git-annex | ||
assert cmo.out.startswith('ERROR ') | ||
assert os.linesep not in cmo.out.rstrip() | ||
assert cmo.out.endswith('\n') # This is the case even on Windows. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.