-
Notifications
You must be signed in to change notification settings - Fork 11
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
Develop replacement for ConfigManager
#397
Comments
linking a few config manager related issues from core: |
More corner/use cases are:
|
This achieve the main goal of making any `datalad -c ...` specification affect not just the datalad-specific config in the main Python process, but can now handle *any* Git config, and also impact the behavior of any subprocesses. Furthermore this handling is extended to cover also `DATALAD_...` ENV variables, including `DATALAD_CONFIG_OVERRIDES_JSON`. Within the session `ConfigManager` instance the behavior is now more uniform. `ConfigManager.overrides` are now exclusively instance-specific overrides -- matching their description and implementation. No configuration override coming from CLI or process ENV is reflected in `ConfigManager.overrides` anymore. Closes datalad#325 -- although the scope is a bit broader. This changeset defers the need to address datalad#397, but does not resolve it. Ideally there would not be a need for any CLI specific behavior and implementation -- everything should be done by the `ConfigManager`. However, given the numerous conceptual and design limitations, it felt necessary to address the override impact limitation separately. Ping - datalad/datalad#4119 - datalad/datalad#3456 - datalad/datalad#7344
This achieve the main goal of making any `datalad -c ...` specification affect not just the datalad-specific config in the main Python process, but can now handle *any* Git config, and also impact the behavior of any subprocesses. Furthermore this handling is extended to cover also `DATALAD_...` ENV variables, including `DATALAD_CONFIG_OVERRIDES_JSON`. Within the session `ConfigManager` instance the behavior is now more uniform. `ConfigManager.overrides` are now exclusively instance-specific overrides -- matching their description and implementation. No configuration override coming from CLI or process ENV is reflected in `ConfigManager.overrides` anymore. Closes datalad#325 -- although the scope is a bit broader. This changeset defers the need to address datalad#397, but does not resolve it. Ideally there would not be a need for any CLI specific behavior and implementation -- everything should be done by the `ConfigManager`. However, given the numerous conceptual and design limitations, it felt necessary to address the override impact limitation separately. Ping - datalad/datalad#4119 - datalad/datalad#3456 - datalad/datalad#7344
This achieve the main goal of making any `datalad -c ...` specification affect not just the datalad-specific config in the main Python process, but can now handle *any* Git config, and also impact the behavior of any subprocesses. Furthermore this handling is extended to cover also `DATALAD_...` ENV variables, including `DATALAD_CONFIG_OVERRIDES_JSON`. Within the session `ConfigManager` instance the behavior is now more uniform. `ConfigManager.overrides` are now exclusively instance-specific overrides -- matching their description and implementation. No configuration override coming from CLI or process ENV is reflected in `ConfigManager.overrides` anymore. Closes datalad#325 -- although the scope is a bit broader. This changeset defers the need to address datalad#397, but does not resolve it. Ideally there would not be a need for any CLI specific behavior and implementation -- everything should be done by the `ConfigManager`. However, given the numerous conceptual and design limitations, it felt necessary to address the override impact limitation separately. Ping - datalad/datalad#4119 - datalad/datalad#3456 - datalad/datalad#7344
The ping in datalad/datalad#5383 reminded me that the present config manager also has no support for git annex config. And this one is special, because it has a fixed set it items, and rules of "engagement" are more complex |
Making a start for this effort now. |
This will eventually fix datalad#397
This will eventually fix datalad#397
This will eventually fix datalad#397
This will eventually fix datalad#397
This will eventually fix datalad#397
This will eventually fix datalad#397
This will eventually fix datalad#397
This will eventually fix datalad#397
This will eventually fix datalad#397
This will eventually fix datalad#397
The new sub-package `datasalad.settings` provides a framework for implementing a system where information items can be read from and written to any number of sources, and sources are ordered to implement a simple precedence rule. An example of such a system is the layered Git config setup, which system, global, local and other scopes. This can serve as the basis for a revamped configuration manager for DataLad. This changeset is complete with tests and documentation. Refs: datalad/datalad-next#397
The new sub-package `datasalad.settings` provides a framework for implementing a system where information items can be read from and written to any number of sources, and sources are ordered to implement a simple precedence rule. An example of such a system is the layered Git config setup, which system, global, local and other scopes. This can serve as the basis for a revamped configuration manager for DataLad. This changeset is complete with tests and documentation. Refs: datalad/datalad-next#397
This will eventually fix datalad#397
The new sub-package `datasalad.settings` provides a framework for implementing a system where information items can be read from and written to any number of sources, and sources are ordered to implement a simple precedence rule. An example of such a system is the layered Git config setup, which system, global, local and other scopes. This can serve as the basis for a revamped configuration manager for DataLad. This changeset is complete with tests and documentation. Refs: datalad/datalad-next#397
The new sub-package `datasalad.settings` provides a framework for implementing a system where information items can be read from and written to any number of sources, and sources are ordered to implement a simple precedence rule. An example of such a system is the layered Git config setup, which system, global, local and other scopes. This can serve as the basis for a revamped configuration manager for DataLad. This changeset is complete with tests and documentation. Refs: datalad/datalad-next#397
The new sub-package `datasalad.settings` provides a framework for implementing a system where information items can be read from and written to any number of sources, and sources are ordered to implement a simple precedence rule. An example of such a system is the layered Git config setup, which system, global, local and other scopes. This can serve as the basis for a revamped configuration manager for DataLad. This changeset is complete with tests and documentation. Refs: datalad/datalad-next#397
This will eventually fix datalad#397
This will eventually fix datalad#397
This will eventually fix datalad#397
This will eventually fix datalad#397
The new sub-package `datasalad.settings` provides a framework for implementing a system where information items can be read from and written to any number of sources, and sources are ordered to implement a simple precedence rule. An example of such a system is the layered Git config setup, which system, global, local and other scopes. This can serve as the basis for a revamped configuration manager for DataLad. This changeset is complete with tests and documentation. Refs: datalad/datalad-next#397
The new sub-package `datasalad.settings` provides a framework for implementing a system where information items can be read from and written to any number of sources, and sources are ordered to implement a simple precedence rule. An example of such a system is the layered Git config setup, which system, global, local and other scopes. This can serve as the basis for a revamped configuration manager for DataLad. This changeset is complete with tests and documentation. Refs: datalad/datalad-next#397
The new sub-package `datasalad.settings` provides a framework for implementing a system where information items can be read from and written to any number of sources, and sources are ordered to implement a simple precedence rule. An example of such a system is the layered Git config setup, which system, global, local and other scopes. This can serve as the basis for a revamped configuration manager for DataLad. This changeset is complete with tests and documentation. Refs: datalad/datalad-next#397
The new sub-package `datasalad.settings` provides a framework for implementing a system where information items can be read from and written to any number of sources, and sources are ordered to implement a simple precedence rule. An example of such a system is the layered Git config setup, which system, global, local and other scopes. This can serve as the basis for a revamped configuration manager for DataLad. This changeset is complete with tests and documentation. Refs: datalad/datalad-next#397
The new sub-package `datasalad.settings` provides a framework for implementing a system where information items can be read from and written to any number of sources, and sources are ordered to implement a simple precedence rule. An example of such a system is the layered Git config setup, which system, global, local and other scopes. This can serve as the basis for a revamped configuration manager for DataLad. This changeset is complete with tests and documentation. Refs: datalad/datalad-next#397
The new sub-package `datasalad.settings` provides a framework for implementing a system where information items can be read from and written to any number of sources, and sources are ordered to implement a simple precedence rule. An example of such a system is the layered Git config setup, which system, global, local and other scopes. This can serve as the basis for a revamped configuration manager for DataLad. This changeset is complete with tests and documentation. Refs: datalad/datalad-next#397
The new sub-package `datasalad.settings` provides a framework for implementing a system where information items can be read from and written to any number of sources, and sources are ordered to implement a simple precedence rule. An example of such a system is the layered Git config setup, which system, global, local and other scopes. This can serve as the basis for a revamped configuration manager for DataLad. This changeset is complete with tests and documentation. Refs: datalad/datalad-next#397
The new sub-package `datasalad.settings` provides a framework for implementing a system where information items can be read from and written to any number of sources, and sources are ordered to implement a simple precedence rule. An example of such a system is the layered Git config setup, which system, global, local and other scopes. This can serve as the basis for a revamped configuration manager for DataLad. This changeset is complete with tests and documentation. Refs: datalad/datalad-next#397
datalad/datalad-core#19 provides a new #760 has an exploration whether it would be possible to implement an adapter for the new manager with the API of the old one. This seems possible, except for some edge cases (some of which a more like bugs than features). I am closing this issue here. Feature requests can be posted to https://github.com/datalad/datalad-core |
This is a key component of any datalad code. It is present in any datalad session
datalad.cfg
and part of anyDataset
or*Repo
instance.The implementation in datalad-core is old, has various spaghetti pieces, and comprises at least 3 different APIs.
I believe this code needs an update for a number of reasons:
git-config
-- ie. no support forworktree
overrides
is clashing with Git's owncommand
scope -- see AdjustConfigManager
to post overrides into the ENV #325 for the struggle to sort this outGiven the essential nature of this code, I think a replacement must
ConfigManager
dict
, andConfigParser
in Python andConfigParser
in GitPython, and some other pieces) via deprecations resulting actual removalgit-config
in terms of scopes and conceptsTODO:
.gitmodules
) to inform refactoringreplace-all
within a particular scope...)CommandError
to communicate permission issues when setting (e.g. system) configurationThoughts
Maybe have a dataclass
maybe with additional accessors like
section
name
asbool()
asint()
The internal representation within
ConfigManager
could be a list of these items, with amend/overwrite/replace rules applied on access. Or a series of lists, grouped byscope
in adict
(likelyscope
removed fromGitConfigScopeType
then), or even grouped by(scope, origin)
to facilitate reloads.It could also make sense to have an explicit
GitConfigMultiValueItem
, that exposes aget_all()
equivalent, rather than (only) havingConfigManager.get(getall: bool)
The text was updated successfully, but these errors were encountered: