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

Initial annex support #24

Merged
merged 2 commits into from
Oct 16, 2024
Merged

Initial annex support #24

merged 2 commits into from
Oct 16, 2024

Conversation

mih
Copy link
Member

@mih mih commented Oct 14, 2024

This is the seamless continuation of #19 -- just to set an arbitrary merge cutoff.

@mih mih force-pushed the init branch 2 times, most recently from be77127 to 2f0f874 Compare October 14, 2024 14:18
@codecov-commenter
Copy link

codecov-commenter commented Oct 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (e432e31) to head (fcd1237).

Additional details and impacted files
@@            Coverage Diff             @@
##              main       #24    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files           27        31     +4     
  Lines          882      1111   +229     
  Branches        54        73    +19     
==========================================
+ Hits           882      1111   +229     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mih mih force-pushed the init branch 4 times, most recently from 25b04d9 to d3f5b18 Compare October 15, 2024 09:54
@mih mih changed the title Init annex repos Annex support Oct 15, 2024
@mih mih changed the title Annex support Initial annex support Oct 15, 2024
Low-level helper to execute git-annex command that support `--json` and
`--json-error-messages`.

This initial implementation does not (yet) support input iterables.
@mih mih force-pushed the init branch 3 times, most recently from 7dc5291 to fcd1237 Compare October 15, 2024 10:24
`Repo` and `Worktree` received dedicated, optional support for annexes,
and their initialization.

The concept is is substantially different from that implemented in
legacy DataLad. There, an `AnnexRepo` class was derived from a `GitRepo`
class and extended and overwrote individual methods, forming a
relatively high-level API.

Here, any `Repo` or `Worktree` can have an optional annex. All
operations related to that annex are implemented in dedicated handlers
that are fully independent of a `Repo` or `Worktree` instance.

The aim is to reduce the complex interdependencies that cripple the
validity and robustness of the legacy implementations. Git is used more
"directly", even in git-annex repositories and git-annex is used
more directly, and agnostic of the context and demands of high-level
operations.

This has important consequences. For example, a method like the
legacy `AnnexRepo.save()` cannot exist, because there is no
`GitRepo.save` that it can override and "do the right thing" for a
git-annex repository.

This is acceptable here, because the API provided in this module
is not targeting the level of compound/convenience operations like
`save()` that aim to alleviate a developer's required expertise.
Instead, the aim here is to provide primitives that can be used in a
higher-level (possibly function-based) API.
@mih mih merged commit 93be257 into main Oct 16, 2024
8 of 9 checks passed
@mih mih deleted the init branch October 16, 2024 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants