-
Notifications
You must be signed in to change notification settings - Fork 111
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
Dataset configuration management via git-config
calls
#744
Conversation
Codecov Report
@@ Coverage Diff @@
## master #744 +/- ##
==========================================
+ Coverage 86.6% 86.77% +0.16%
==========================================
Files 195 198 +3
Lines 17640 17884 +244
==========================================
+ Hits 15277 15518 +241
- Misses 2363 2366 +3
Continue to review full report at Codecov.
|
@@ -129,7 +129,7 @@ def _get_default_file_candidates(self): | |||
cfg_file_candidates.append(opj(home_cfg_base_path, 'datalad.cfg')) | |||
|
|||
# current dir config | |||
cfg_file_candidates.append(opj('.datalad', 'config')) | |||
cfg_file_candidates.append('datalad.cfg') |
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.
as talked elsewhere, let's keep .datalad/config
and better fix the docs, than the code
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.
It does not work. This parser requires Python's format. But a dataset's .datalad/config is in Git's format.
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.
ah right... since we are aiming for unification and don't think anyone would have those datalad.cfg laying around -- just comment it out entirely I guess. later it should read .datalad/config right?
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.
Yes.
On Tue, Aug 30, 2016 at 3:27 PM, Yaroslav Halchenko <
notifications@github.com> wrote:
In datalad/config.py
#744 (comment):@@ -129,7 +129,7 @@ def _get_default_file_candidates(self):
cfg_file_candidates.append(opj(home_cfg_base_path, 'datalad.cfg'))# current dir config
cfg_file_candidates.append(opj('.datalad', 'config'))
cfg_file_candidates.append('datalad.cfg')
ah right... since we are aiming for unification and don't think anyone
would have those datalad.cfg laying around -- just comment it out entirely
I guess. later it should read .datalad/config right?—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/datalad/datalad/pull/744/files/65570c6d158c41afcab243aca653d2b3b08e833e#r76793811,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAIVH8Vn2ODoeYD5mvcJOnYKgynbPCKyks5qlC_DgaJpZM4JwXjp
.
Michael Hanke
http://mih.voxindeserto.de
please merge/rebase on top of current master to make nd90 happy again |
25b2396
to
baea9c3
Compare
Rebased. |
25d0c04
to
781a155
Compare
git-config
calls
GitPython's is complex and cannot handle multi-value options
@bpoldrack @yarikoptic I think this is now a reasonably functional draft. Of course many more things could be implemented... I still needs some docs. Maybe later today. |
@yarikoptic When this gets merged, I'll replace the then obsolete code in nf-metaparser with this and should be able to complete (and fix) the current draft implementation. |
2 similar comments
1 similar comment
1 similar comment
# make sure we reset this variable completely, in case of a re-create | ||
ds.config.unset('datalad.annex.origin', where='dataset') | ||
ds.config.add('datalad.annex.origin', vcs.uuid, where='dataset') | ||
ds.repo.add('.datalad', git=True) |
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.
btw what happens to it when merging multiple datasets/repos? one to be chosen or a new one created or ... ? just this tracking of the origin and siblings -- still not feeling where the benefit would come
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.
That needs human attention. Impossible to infer what would be appropriate.
Since
with a section in
and do mapping between |
# overwrite existing value, do not amend to get multi-line | ||
# values | ||
self._store = _parse_gitconfig_dump( | ||
stdout, self._store, replace=True) |
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.
so .datalad/config
would be overriding any setting -- global or local... kinda suboptimal... I might even say don't we want the reverse -- dataset config (stored in git, might be coming from aliens) to be the first one considered and then possibly augmented by the non-persistent global and/or local?
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.
RF: swap logic (first dataset, then git), centralize calls to git config, etc
No description provided.