Open
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #764 +/- ##
==========================================
+ Coverage 95.63% 95.89% +0.25%
==========================================
Files 20 21 +1
Lines 1353 1487 +134
Branches 120 129 +9
==========================================
+ Hits 1294 1426 +132
- Misses 45 46 +1
- Partials 14 15 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
72fb401 to
11e4164
Compare
The new schema subcommand prints out a custom JSON format with all options / checks that are built-in and can be configured in the autosuspend configuration file. This is intended to be used graphical configuration UIs for autosuspend. These can use the printed schema to dynamically configure the UI without having to hard-code known checks. I was unable to use established formats such as JSON schema due to the way checks can be configured in the configuration. By default the section header is the class name. As a special case, users can give a custom name and provide the class manually. This doesn't map well to JSON schema.
This completes the new schema subcommand so that all checks have declared options.
This avoids having to redefine parameters.
This only makes the document longer with no benefit.
This avoids duplicate definitions of checks and parameters
Instead of including the internal class names in the schema and the generated documentation, use the well-known names that used to exist before and that are mandatory for the config mechanism to work.
Otherwise, the dynamic check documentation cannot be built.
11e4164 to
4e2d015
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds a new
schemasubcommand that prints something like a schema of the configuration file including all built-in (and functional due to optional dependencies) checks. This is intended to build configuration UIs based on the output.