You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat: add $schema to properties to allow using the schema file for JSON config validation - #4
Adding $schema as a property allows using this file as a validator in VS Code or other IDEs that support this.
When setting $schema at the top of any configuration file, the IDE will show a tooltip with the documentation from the defined schema as in the pic below:
If $schema is not added into the properties, this is not possible 😃
Two repo checks will fail as the pull request stands:
Vendored copy is stale. configs/config.schema.json and oriented_det/configs/config.schema.json are the same file today. This pull request edits only the first. CI runs make check-configs, which requires them to match.
--> run make sync-configs and run check-configs test locally
The alignment test will fail. test_config_schema_fieldnames_align_with_dataclasses in tests/test_training_config_strict.py requires schema property names to match dataclass field names, with base as the only exception. The schema key is $schema and the field is schema, so both sides of that assertion fail. The test allowlist has to treat that pair the way it treats base.
--> please add a small load/save test: a config with $schema loads, to_dict() round-trips the key, and a config without it does not gain one.
This branch has not been deployed
No deployments
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
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.
Adding
$schemaas a property allows using this file as a validator in VS Code or other IDEs that support this.When setting

$schemaat the top of any configuration file, the IDE will show a tooltip with the documentation from the defined schema as in the pic below:If
$schemais not added into the properties, this is not possible 😃