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

Documentation update #513

Merged
merged 3 commits into from
Oct 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 includes 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
6 changes: 3 additions & 3 deletions docs/source/developer_guide/index.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.. _devguide:

The developer's guide to datalad-next
*************************************
Developer Guide
===============

This guide sheds light on new and reusable subsystems developed in ``datalad-next``.
The target audience are developers that intend to build up on or use functionality provided by this extension.
Expand All @@ -10,4 +10,4 @@ The target audience are developers that intend to build up on or use functionali
:maxdepth: 2

constraints.rst
contributing.rst
contributing.rst
68 changes: 5 additions & 63 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,82 +29,24 @@ extension has to be enabled for auto-loading by executing::
Doing so will enable the extension to also alter the behavior the core DataLad
package and its commands.

API
===

High-level API commands
-----------------------
Provided functionality
======================

.. toctree::
:maxdepth: 2
:maxdepth: 1

api.rst

Command line reference
----------------------

.. toctree::
:maxdepth: 2

cmd.rst


Python tooling
--------------

``datalad-next`` comprises a number of more-or-less self-contained
mini-packages providing particular functionality.

.. toctree::
:maxdepth: 1

Infrastructure classes and utilities <pyutils.rst>


Git remote helpers
------------------

.. toctree::
:maxdepth: 2

git-remote-helpers.rst


Git-annex backends
------------------

.. toctree::
:maxdepth: 2

annex-backends.rst



Git-annex special remotes
-------------------------


.. toctree::
:maxdepth: 2

annex-specialremotes.rst



DataLad patches
---------------

Patches that are automatically applied to DataLad when loading the
``datalad-next`` extension package.

.. toctree::
:maxdepth: 2

patches.rst


Developer Guide
---------------
Contributor information
=======================

.. toctree::
:maxdepth: 2
Expand Down
11 changes: 9 additions & 2 deletions docs/source/patches.rst
Original file line number Diff line number Diff line change
@@ -1,19 +1,26 @@
DataLad patches
***************

Patches that are automatically applied to DataLad when loading the
``datalad-next`` extension package.

.. currentmodule:: datalad_next.patches
.. autosummary::
: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
Loading