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

Start using register_config() #239

Closed
mih opened this issue Oct 10, 2023 · 0 comments · Fixed by #244
Closed

Start using register_config() #239

mih opened this issue Oct 10, 2023 · 0 comments · Fixed by #244

Comments

@mih
Copy link
Member

mih commented Oct 10, 2023

# TODO: We should provide an entry point (or sth similar) for extensions
is already asking for it.

This would make it possible to discontinue the approach in definitions.py

register_config was introduced with datalad v0.16

mih added a commit to mih/datalad-container that referenced this issue Oct 10, 2023
Since v0.16 datalad provides a `register_config()` helper for extensions
to inject their own configuration into the central registry.

This changeset replaces the previous custom implementation with this
standard approach. It has not consequences re user behavior.

An additional benefit is that this configuration is now also
user-accessible, including a basic documentation:

```py
>>> import datalad_container
>>> from datalad.api import configuration
>>> configuration('dump', 'datalad.containers.location')
datalad.containers.location=.datalad/environments
[{'action': 'dump_configuration',
  'refds': '/home/mih/hacking/datalad/container',
  'name': 'datalad.containers.location',
  'value': '.datalad/environments',
  'purpose': 'Container location',
  'description': 'path within the dataset where to store containers',
  'value_type': constraint:str,
  'path': '/home/mih/hacking/datalad/container',
  'status': 'ok'}]
```

Closes datalad#239
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 a pull request may close this issue.

1 participant