__init__.py 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. """DataLad Gooey"""
  2. __docformat__ = 'restructuredtext'
  3. import logging
  4. lgr = logging.getLogger('datalad.ext.gooey')
  5. # Defines a datalad command suite.
  6. # This variable must be bound as a setuptools entrypoint
  7. # to be found by datalad
  8. command_suite = (
  9. # description of the command suite, displayed in cmdline help
  10. "Gooey (GUI)",
  11. [
  12. ('datalad_gooey.gooey', 'Gooey'),
  13. ('datalad_gooey.askpass', 'GooeyAskPass',
  14. 'gooey-askpass', 'gooey_askpass'),
  15. ('datalad_gooey.lsdir', 'GooeyLsDir', 'gooey-lsdir', 'gooey_lsdir'),
  16. ('datalad_gooey.status_light', 'GooeyStatusLight',
  17. 'gooey-status-light', 'gooey_status_light'),
  18. ]
  19. )
  20. from datalad.support.extensions import register_config
  21. from datalad.support.constraints import (
  22. EnsureChoice,
  23. EnsureStr,
  24. )
  25. register_config(
  26. 'datalad.gooey.active-suite',
  27. 'Which user interface suite to use in the application',
  28. description=\
  29. "A suite is a particular set of commands that is available through "
  30. "the application. The command interface can be customized, such that "
  31. "different features and different levels of complexity can be exposed "
  32. "for the same command in different suites. "
  33. "Two standard suites are provided, but extension package may provide "
  34. "additional suites that can be configured. "
  35. "In the 'simplified' suite advanced operations operations are hidden "
  36. "in the user interface. In 'complete' mode, all functionality "
  37. 'is exposed.',
  38. type=EnsureStr() | EnsureChoice('gooey-simplified', 'gooey-complete'),
  39. default='gooey-simplified',
  40. scope='global')
  41. register_config(
  42. 'datalad.gooey.ui-theme',
  43. 'Which user interface theme to use in the application',
  44. description=\
  45. "Besides the standard 'system' theme, additional 'light' and 'dark' "
  46. "themes are available, if the `qdarktheme` package is installed.",
  47. type=EnsureChoice('system', 'light', 'dark'),
  48. default='system',
  49. scope='global')
  50. from ._version import get_versions
  51. __version__ = get_versions()['version']
  52. del get_versions