Validation of non-required elements by qcodesrc_schema.json causes silent failiure of schema loading
- Dominant language
- Python
- Stars
- 459
- Forks
- 359
- Avg merge
- 3d 6h
- Merged PRs (30d)
- 73
Description
The current schema vaildation file `qcodes_schma.json` includes the validation of the station configurator object, but does not include it into the required list:
```
...
"user": {
"type": "object",
"properties": {
"scriptfolder": {
"type": "string",
"default": "/",
"description": "Location of scripts for general experiments"
},
"mainfolder": {
"type": "string",
"default": "",
"description": "Location of experiments"
}
},
"description": "controls user settings of qcodes"
},
"station_configurator": {
"type": "object",
"properties": {
"enable_forced_reconnect": {
"type": "boolean",
"default": false,
"description": "if set to true, on instantiation of an existing instrument, the existing will be disconnected."
},
"default_folder": {
"type": ["string", "null"],
"default": null,
"description": "default folder where to look for a station configurator config file"
},
"default_file": {
"type": ["string", "null"],
"default": null,
"description": "default file name, specifying the file to load, when none is specified. Can be a relative or absolute path"
}
},
"description": "Setting for the StationConfigurator module in qdev-wrappers"
}
},
"description": "schema for a qcodes config file",
"required": [
"gui",
"core",
"user"
]
}
```
This somehow prevents the config for the StationConfigurator to be loaded.
```
from qdev_wrappers.station_configurator import StationConfigurator
sc = StationConfigurator()
```
here the default file as configured is not loaded.
When adding the SC to the required list the default file is being loaded successfully.
Contributor guide
Research direction
Start with qcodes_schma.json and inspect how its required list affects loading during StationConfigurator() initialization. Reproduce the example with the configured default file, then verify that schema validation no longer silently prevents the StationConfigurator configuration from loading.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- json, python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100