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

CLI Improvements #29

Open
NeonDaniel opened this issue Mar 2, 2023 · 2 comments
Open

CLI Improvements #29

NeonDaniel opened this issue Mar 2, 2023 · 2 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@NeonDaniel
Copy link
Member

As discussed in #24

  • Add flag to specify the module to get config for (respecting submodule_mappings in config)
  • Add flag to specify a module (respecting module_overrides in config)
  • Add CLI option to print (modify?) meta config
@JarbasAl
Copy link
Member

JarbasAl commented Mar 2, 2023

from the other PR comments

Maybe for a future PR, this needs an option to show different base directories/config filenames. I'd propose adding flags:

-m/--module: Module to get config for

Under the hood, this has to read submodule_mappings

-o/--override: Get config for a specific module

Arg passed here should be a valid key under module_overrides, otherwise return error

Also, another command might be useful: meta: Show meta config (ovos.conf)

we should move/deprecate the OCA utils too, so OCA is just the web ui

from ovos_config_assistant.module_helpers import pprint_core_module_info
pprint_core_module_info()
"""
## Mycroft module info
     can import mycroft     : True
     is ovos-core           : True
     mycroft module location: /home/user/ovos-core/mycroft

## Downstream ovos.conf overrides
Module: neon_core
     can import neon_core     : False
     neon_core module location: None
     xdg compliance            : True
     base xdg folder           : neon
     mycroft config filename   : neon.conf
     default mycroft.conf path :
          /home/user/NeonCore/neon_core/configuration/neon.conf
Module: hivemind
     can import hivemind     : False
     hivemind module location: None
     xdg compliance            : True
     base xdg folder           : hivemind
     mycroft config filename   : hivemind.conf
     default mycroft.conf path :
          /home/user/PycharmProjects/ovos_workspace/ovos-core/.venv/lib/python3.9/site-packages/mycroft/configuration/mycroft.conf

## Downstream module overrides:
Module: neon_speech
     uses config from   : neon_core
     can import neon_speech     : False
     neon_speech module location: None
Module: neon_audio
     uses config from   : neon_core
     can import neon_audio     : False
     neon_audio module location: None
Module: neon_enclosure
     uses config from   : neon_core
     can import neon_enclosure     : False
     neon_enclosure module location: None
Module: hivemind_voice_satellite
     uses config from   : hivemind
     can import hivemind_voice_satellite     : True
     hivemind_voice_satellite module location: /home/user/HiveMind-voice-sat/hivemind_voice_satellite
"""

from ovos_config_assistant.config_helpers import pprint_ovos_conf
pprint_ovos_conf()
"""
## OVOS Configuration
 ovos.conf exists          : True
      /home/user/.config/OpenVoiceOS/ovos.conf
 xdg compliance            : True
 base xdg folder           : mycroft
 mycroft config filename   : mycroft.conf
 default mycroft.conf path :
      /home/user/ovos-core/.venv/lib/python3.9/site-packages/mycroft/configuration/mycroft.conf
"""

@JarbasAl JarbasAl added enhancement New feature or request help wanted Extra attention is needed labels Mar 2, 2023
@NeonDaniel
Copy link
Member Author

Related, #47 allows global env to override defaults

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants