Config as YAML files instead of python. Live translation of logs and TTS #31
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This will allow module creators to add a corresponding config yaml file for their module that will be made available automatically in the framework via the
Config.get([module], [parameter])
syntax.Also contains a method
get_all_pins()
to display the list of pins in use by the various modules. Useful for conflict detection and module planning.Currently untested
Creating a module
Create the python module (described in documentation)
Create a corresponding
.yaml
file in theconfig
directory.Populate the file with your module configuration parameters
Add a
docs
section that includes the following:description
of the moduleevents
includingpub
andsub
with details of published and subscribed eventsThe
config.py
script will import all yaml files in this directory and merge them into a single config, accessible viaConfig.get([module], [parameter])
. Ensure that your name does not conflict with other existing modules.Live Translation
The live translation module
translation.py
allows live translation of logs and TTS output via google translate.Call
translate.request(msg)
and optionally specify the source and destination languages.The
config/translation.yml
specifies the default languages.