Skip to content

Commit

Permalink
Complete list of patches in documentation
Browse files Browse the repository at this point in the history
Add minimal documentation to all patches that had none yet.
  • Loading branch information
mih committed Oct 26, 2023
1 parent 826ec15 commit 2e2d794
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 6 deletions.
7 changes: 7 additions & 0 deletions datalad_next/patches/cli_configoverrides.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
"""Post DataLad config overrides CLI/ENV as GIT_CONFIG items in process ENV
This enables their propagation to any subprocess. This include the
specification of overrides via the ``datalad -c ...`` option of the
main CLI entrypoint.
"""

from datalad.config import _update_from_env as _update_from_datalad_env
from datalad.cli.helpers import _parse_overrides_from_cmdline

Expand Down
11 changes: 8 additions & 3 deletions datalad_next/patches/commanderror.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
"""Improve ``CommandError`` rendering
Without this patch that overwrites ``__repr__``, it would use
``RuntimeError``'s variant and ignore all additional structured information
except for ``.msg`` -- which is frequently empty and confuses with a
`CommandError('')` display.
"""

from datalad.runner.exception import CommandError


def commanderror_repr(self) -> str:
return self.to_str()


# without overwriting __repr__ it would use RuntimeError's variant
# with ignore all info but `.msg` which will be empty frequently
# and confuse people with `CommandError('')`
CommandError.__repr__ = commanderror_repr
4 changes: 3 additions & 1 deletion datalad_next/patches/create_sibling_gitlab.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
"""
"""Streamline user experience
Discontinue advertizing the ``hierarchy`` layout, and better explain
limitations of the command.
"""

import datalad.distributed.create_sibling_gitlab as mod_gitlab
Expand Down
8 changes: 6 additions & 2 deletions docs/source/patches.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,18 @@ Patches that are automatically applied to DataLad when loading the
:toctree: generated

annexrepo
cli_configoverrides
commanderror
common_cfg
configuration
create_sibling_ghlike
create_sibling_gitlab
customremotes_main
distribution_dataset
interface_utils
push_optimize
push_to_export_remote
test_keyring
siblings
run
siblings
test_keyring
update

0 comments on commit 2e2d794

Please sign in to comment.