datalad-core/datalad_core/commands
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Michael Hanke 3e875e199b
All checks were successful
Codespell / Check for spelling errors (push) Successful in 32s
Ruff / Code linting (push) Successful in 40s
Type annotation (project) / check (push) Successful in 52s
Unit tests (Linux) / check (push) Successful in 2m24s
feat: cheaper, unvalidated instantiation of Repo|Worktree
This changeset reduces the cost for using `Repo` and `Worktree`
standard types for parameters and return value.

The respective constructors (`__init__()`) are reduced to merely
assign the essential `path` value. All parameter validation is moved to
corresponding class methods `.from_path()`.

The implementation of `(Ensure)Dataset` has been adjusted accordingly.

The flyweight pattern implementation has been simplified. There is no
longer a possibility of a difference between a given `path` parameter
given to the constructor, and the actual path by which uniqueness of an
instance is determined (which was previously the case due to internal
resolution of paths to worktree root paths).

All implementations of `.from_path()` class methods have been
homogenized to raise `ValueError` for any invalid path parameter values.

seealso: #57
2026-05-29 21:58:31 +02:00
..
tests rf: code linting informed beautifications 2026-03-19 18:01:12 +01:00
__init__.py rf: code linting informed beautifications 2026-03-19 18:01:12 +01:00
dataset.py feat: cheaper, unvalidated instantiation of Repo|Worktree 2026-05-29 21:58:31 +02:00
decorator.py rf: code linting informed beautifications 2026-03-19 18:01:12 +01:00
default_result_handler.py chore: reformat with a Python 3.10 target 2025-11-14 13:00:56 +01:00
exceptions.py feat: parameter preprocessor (for @datalad_command) 2024-10-25 10:23:08 +02:00
param_constraint.py feat: parameter preprocessor (for @datalad_command) 2024-10-25 10:23:08 +02:00
preproc.py feat: parameter preprocessor (for @datalad_command) 2024-10-25 10:23:08 +02:00
result_handler.py chore: reformat with a Python 3.10 target 2025-11-14 13:00:56 +01:00