-
Notifications
You must be signed in to change notification settings - Fork 110
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
Core Repo/Dataset classes #4689
Conversation
This is now about as far as I'd go for a meaningful first step. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me as a first move, except for the os.path
issue I commented on. I think at least we shouldn't encourage users of the python API (or ourselves for that matter) to use it over pathobj
.
Codecov Report
@@ Coverage Diff @@
## master #4689 +/- ##
==========================================
- Coverage 89.71% 89.58% -0.13%
==========================================
Files 289 291 +2
Lines 40455 40231 -224
==========================================
- Hits 36295 36042 -253
- Misses 4160 4189 +29
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Glancing through --color-moved
diffs, the code movement looks fine to me, though admittedly my eyes glazed over at some point.
I pushed a series of commits that address all raised points. I will evaluate these changes in the context of #4698 now. |
Seems you stripped |
This is following up on the plan made in dataladgh-3192, and elaborated on in dataladgh-3988 and dataladgh-4589 (establish carefully filtered, minimized core repo classes).
Better fit with new structure
With the absolute bare essentials and pretty much no real functionality.
And a whole slew of changes that was necessary to be able to run AnnexRepo.is_valid_annex() in this new class.
and RF them to only rely on core functionality.
Rebased on master after an eternity has passed. |
This is recovering the first set of changes from the stale dataladgh-4689
Follow-up to dataladgh-4841 to eventually fulfill dataladgh-4689 Diff looks complicated but it is basically moving the function body into the `try` block to be able to use `call_git_items_()`
But use `call_git*()` methods instead. Follow-up to dataladgh-4841 to eventually fulfill dataladgh-4689
Follow-up to dataladgh-4841 to eventually fulfill dataladgh-4689
All `call_git*()` methods are now running `GitWitlessRunner`. Moreover, there is no `normalize_paths` decorator involvement for any such invokations anymore (ping dataladgh-3881, dataladgh-4595). For now `GitRepo._git_custom_command()` is kept -- at least until dataladgh-4847 and dataladgh-4848 are merged. Follow-up to dataladgh-4841 to eventually fulfill dataladgh-4689
This will need to be attempted at a later point again. Too much has changed. |
Merely the first steps towards a resolution of gh-3988 in the spirit of gh-3192, hopefully and eventually leading to a sliming/modernization of the public API (gh-4589).
There is not much happening here, other than moving code around and establishing the classes. The plan is to lower the threshold to transition some carefully filtered functionality in the core API. At the same time the main Repo classes will be used primarily for a long time still. But it should become progressively easier to write code that only uses the core API.
Major pieces:
GitRepo
andAnnexRepo
(i.e. identically named as suggested in Establish core*Repo
classes #3988 (comment))call_git*()
methods have moved and no longer rely on an execution helper that invokesnormalize_paths()
wrapt
Fixes gh-3988
I am currently pondering whether we might also want to established corresponding locations for core
utils
,exceptions
andsupport
with the analog goal of a rejuvenation/slimming of the code base. But later and in a separate effort.