-
Notifications
You must be signed in to change notification settings - Fork 109
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
Merge maint into master, DO NOT MERGE PR #6677
Conversation
Annex uses a `-` instead of `_` in its JSON key names. This correction should only have a minor impact on behavior. Instead of the intended replacement of a list of messages under `error-messages` with a joined message under `error_message`, the created record unintentionally had both. (Closes datalad#6621)
Replaced error_messages with error_message because the generic results renderer (from datalad.interface.utils) uses error_message. If there are multiple error messages, they will be joined into one multi-line string (as done e.g. by annexjson2result from datalad.interface.results).
BF: Fix wrong key name of annex' JSON records
The test expects that when calling drop with allkeys, potential error messages reported by git-annex will be passed on to the drop's result record (using 'error_message' key).
In particular useful while troubleshooting extensions, which would typically reuse the same setup/teardown as of the core package. Ran into such a desire while looking at mih/datalad-mihextras#27
This achieves the same modularization of the code as in datalad#6555, but without making any changes to the actual credential handling.
Datalad now depends on entry_points taking kwargs, introduced in python/importlib_metadata@8320ade, first released in importlib-metadata 3.6.
Factor out credential handling of create-sibling-ghlike
MNT: Require importlib-metadata >=3.6 for Python < 3.10 for entry_points taking kwargs
ENH: include version of datalad in tests teardown Versions: report
This commit delegates the actual data transfer in push to a new method: _transfer_data. This is done to simplify monkey-patching via "datalad_next", in order to implement export to git-annex special remotes with type webdav and exporttree enabled.
This commit add the 'todo_interface_extensions' decorator that helps to mark functions and methods that can be modified by monkey-patching via, for example, datalad_next.
Since '_set_request_headers' in 'create_sibling_ghlike.py' might be patched by by datalad_next, it is marked with the newly introduced 'todo_interface_for_extensions' decorator.
…-export-datalad-part Factor out actual data transfer in push
Previously, log messages like this would appear at DEBUG level: ``` [DEBUG] parseParameters: Given "exclude_special_remotes: bool, optional if True, don't return annex special remotes", we split into [('exclude_special_remotes', "exclude_special_remotes: bool, optional\n if True, don't return annex special remotes")] ``` These are very verbose and large in number, making debug output needlessly complicated to read. Moreover, they log the outcome of a trivial operation that practically never fails in production code, at a comparatively high level (DEBUG), and they did it in an expensive way that actually built the log string unconditionally of the effective log level. This change demote the log level to the lowest possible, and uses a proper logging pattern that avoid needless string operations.
Every invocation produces this INFO-level message: ``` % datalad create myds [INFO ] Creating a new annex repo at /tmp/myds create(ok): /tmp/myds (dataset) ``` This is not a long-running operation. In most cases, the INFO log and the result arrive near-simultaneously. It also duplicates DEBUG messages: ``` [INFO ] Creating a new annex repo at /tmp/demo12 [DEBUG ] Initialize empty Git repository at '/tmp/demo12' [DEBUG ] Initializing annex repository at /tmp/demo12... ``` Removed for a cleaner user experience. Fixes datalad#6633
Demote (to level 1 from DEBUG) and speed-up API doc logging (parseParameters)
Since majority use that form to signal beginning of some action. Also renamed one Initating into Initializing, and removed "Attempt" since all of them are
Add released plugin to .autorc to annotate PRs on when released
Remove unsupported parameter create_sibling_ria(existing=None)
Remove two too prominent create() INFO log message that duplicate DEBUG log and harmonize some other log messages
OPT: AnnexJsonProtocol - avoid dragging possibly long data around
Specifically, conflicts of branch name with with branch content. Fixes datalad#6650
Fix `GitRepo.get_branch_commits_()` to handle branch names conflicts with paths
Change a key-value pair in drop result record
not sure why travis and github actions didn't trigger :-/ Anyways -- now that #6273 is merged, conflicts came up -- redoing the merge |
Codecov Report
@@ Coverage Diff @@
## master #6677 +/- ##
==========================================
+ Coverage 88.85% 90.00% +1.15%
==========================================
Files 353 353
Lines 45652 45672 +20
==========================================
+ Hits 40562 41107 +545
+ Misses 5090 4565 -525
Continue to review full report at Codecov.
|
I have force pushed a newer merge, after migration to pytest. There is an oddity though which is not present in
also note -- it looks like it did it twice -- one XPASS and one XFAIL . @jwodder -- any clue why it might do that? here is how looks on master -- oddity that WTF is printed in the same line, not on a new one but that is the end of oddities since it runs/exits fine(git)lena:~datalad/datalad-master[master]__testhome__
$> python -m pytest -c ../tox.ini -s -v --pyargs ../datalad/tests/test_utils.py::test_is_interactive
================================================================================================ test session starts ================================================================================================
platform linux -- Python 3.9.12, pytest-7.1.2, pluggy-1.0.0 -- /home/yoh/proj/datalad/datalad-master/venvs/dev3/bin/python
cachedir: .pytest_cache
rootdir: /home/yoh/proj/datalad/datalad-master, configfile: tox.ini
plugins: cov-3.0.0, fail-slow-0.2.0
collected 1 item
../datalad/tests/test_utils.py::test_is_interactive XPASS (TODO: for some reason fails on Travis)Versions: annexremote=1.5.0 boto=2.49.0 cmd:7z=16.02 cmd:annex=8.20211123 cmd:bundled-git=UNKNOWN cmd:git=2.35.1 cmd:system-git=2.35.1 cmd:system-ssh=9.0p1 exifread=2.3.2 humanize=3.14.0 iso8601=1.0.2 keyring=23.5.0 keyrings.alt=UNKNOWN msgpack=1.0.3 mutagen=1.45.1 platformdirs=2.5.0 requests=2.27.1
Obscure filename: str=b' |;&%b5{}\'"\xce\x94\xd0\x99\xd7\xa7\xd9\x85\xe0\xb9\x97\xe3\x81\x82 .datc ' repr=' |;&%b5{}\'"ΔЙקم๗あ .datc '
Encodings: default='utf-8' filesystem='utf-8' locale.prefered='UTF-8'
Environment: PATH='/home/yoh/proj/datalad/datalad-master/venvs/dev3/bin:/home/yoh/miniconda/envs/datalad-py3.7/bin:/home/yoh/miniconda/condabin:/home/yoh/gocode/bin:/home/yoh/gocode/bin:/home/yoh/bin:/home/yoh/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/sbin:/usr/sbin:/usr/local/sbin' LANG='en_US.UTF-8' GIT_PAGER='less --no-init --quit-if-one-screen' GIT_CONFIG_PARAMETERS="'init.defaultBranch=dl-test-branch' 'clone.defaultRemoteName=dl-test-remote'" GIT_CONFIG_GLOBAL='/home/yoh/.tmp/datalad_temp_kp_6nn25/.gitconfig' GIT_ASKPASS='true' |
ok, that one is solved. Due to RF of code in setup/teardown fixtures and mismatch of variables, had to
which fixes it now (apparently error in fixture can result to such silent stalling upon exit !!!!). will force push adjusted merge with this fix |
* origin/maint: Link docs of datalad-next Fix GitRepo.get_branch_commits_() to handle branch names conflicts OPT: AnnexJsonProtocol - avoid dragging possibly long data around DOC: harmonize a few log messages to use -ing form for consistency Add released plugin to .autorc to annotate PRs on when released [skip ci] Update RST changelog Update CHANGELOG.md [skip ci] Remove too prominent create() INFO log message that duplicates DEBUG log Remove unsupported parameter create_sibling_ria(existing=None) Demote and speed-up API doc logging Fix typo in changelog add extension decorator to '_set_request_headers' add todo_interface_extensions decorator factor out actual data transfer in push MNT: Require importlib-metadata >=3.6 for Python < 3.10 Factor out credential handling of create-sibling-ghlike ENH: include version of datalad in tests teardown Add a test for drop Change a key-value pair in drop result record BF: Fix wrong key name of annex' JSON records Conflicts: datalad/__init__.py - due to switch to pytest and setup/teardown be minimalistic shims now, and we have no test - had to add that invocation of ev['datalad'] to get datalad version as well into moved location within datalad/tests/utils.py and replicate in datalad/conftest.py (as external_versions not ev)
I don't get it why trravis and gh aren't running... will take it out of draft -- since I am out of ideas. @jwodder - any ideas on that? |
eh, I guess CIs aren't running since merge commit has |
Code Climate has analyzed commit 9cec945 and detected 1 issue on this pull request. Here's the issue category breakdown:
View more on Code Climate. |
interesting -- it is similarish fail with test__version test picking up some prior tag instead of the logical "latest" 0.16.2
which is very odd since locally I get
So it is all a bit odd and I don't have an answer to above, but I think that there is no other issue left, so I will progress master forward to this merge now and push directly so |
🚀 PR was released in |
Just for CI, will merge locally and push