-
Notifications
You must be signed in to change notification settings - Fork 85
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
configuration system #220
configuration system #220
Conversation
My initial first pass is really positive! I think this is a great step in providing the optional ability to add per-user configurations. I'll give a more in-depth review later. Nice work. 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is excellent. The examples and documentation are clear and easy to follow. This will be a great addition to the EuroPi ecosystem! Thanks Matthew!
LGTM, I'll leave the merge up to you when you're ready. |
- introduce ConfigPoints and ConfigPointsBuilder classes - make configurable the value that the TM write switch writes - add config point for pico board type
fall back to defaults properly
add int config point add tests for different config point failures make the TM pulses bits configurable move europi_config.py to the firmware diagnostic temp units are configurable also black format diagnostic
- removed builder - simplified EuroPiScript.config_point() - introduced ConfigPoint class - rename config_points.py -> configuration.py - move configPoint helpers out of ConfigSpec class - move europi config to its own var, this removes the need care about conflicts and namespacing - only load config points that exist in the spec - take a range object for IntegerConfigPoint instead of recreating its api - europi_script validates config when loading it - move generic file utils out of europi_script - moved config file methods out of EuroPiScript
add config point for cpu freq
add make target to copy config files
3989d15
to
f8ddba5
Compare
This PR is a rework of (closed) PR #185 and attempts to address the problems identified in issue #163 by way of the addition of a configuration system to the europi firmware. As mentioned in the comments of #185, we have pushed the actual UI portion of this idea out to later work.
This PR adds a configuration system and API, but not a UI, as described in issue #163. The intention of this configuration system is to allow for config file based (rather than in code or UI) user editing parameters that aren't expected to change very often. These are 'set and forget' type options that the user would not expect to be able to change while the script is running. This allows the script itself to forgo the UI complexities of making these options editable. Similarly, it also avoids asking users to edit and re-deploy code to make a change to a setting.
This PR consists of a few parts:
configuration
module which contains code for:ConfigPoint
)ConfigSpec
)ConfigPoint
)EuroPiScript
to make configuration available to running scriptsAdditional notable changes to support this work:
Future work: