Commit 1a2b719
authored
Use Pydantic schemas to validate Mbed's JSON files (part 1) (#516)
* Start on using pydantic schemas. mbed_lib.json schema working!
* Start on schema for targets.json5
* Schema almost done, start removing old stuff from targets.json5
* Add memory bank schema
* Still crunching away on targets.json5
* Finish targets.json5 logic, appears to generate config correctly!
* Implement schema for mbed_app.json5
* Fix tests
* Use `Self`
* Use legacy Union
* Install eval_type_backport
* Fix another union to be legacy
* Import future annotations
* Another one
* Another
* OK let's do this for every remaining python file
* Fix compatibility with pydantic<2.12
* Fix test building in baremetal (due to previously ignored JSON configs now being used)
* One more
* options -> accepted_values
* Resolve lint errors
* Fix wdt-reset-workaround option
* Baremetal for everything!
* Fix trying to build emac test on baremetal
* Also fix wifi test building
* Disable building BlueNRG tests with baremetal
* Fix infinite recursion, disable kvstore test on baremetal
* Respond to comments1 parent 85dbbac commit 1a2b719
File tree
61 files changed
+1291
-2047
lines changed- .github/workflows
- TESTS/configs
- cmsis/device/rtos
- connectivity
- FEATURE_BLE
- source/cordio
- TESTS/cordio_hci
- driver
- transport
- source
- drivers
- ble/FEATURE_BLE
- COMPONENT_BlueNRG_2
- COMPONENT_BlueNRG_MS
- TARGET_STM32WB
- emac
- lora
- COMPONENT_SX126X
- COMPONENT_SX1272
- COMPONENT_SX1276
- TARGET_STM32WL
- wifi/COMPONENT_ESPRESSIF_ESP8266
- lorawan
- lwipstack
- nanostack
- mbed-mesh-api
- nanostack-hal-mbed-cmsis-rtos
- sal-stack-nanostack-eventloop
- sal-stack-nanostack
- netsocket
- tests/TESTS/network
- emac
- wifi
- events
- features/frameworks/cy_rtos_rtx_adapter
- platform
- FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV
- bare_metal
- mbed-trace
- tests/TESTS/mbed_platform
- stats_cpu
- stats_thread
- rtos
- storage
- blockdevice/COMPONENT_SPIF
- filesystem
- kvstore
- kv_config/filesystem_no_rbp
- kvstore_global_api
- tests/TESTS/kvstore/static_tests
- targets
- tools
- cmake
- python_tests/mbed_tools
- lib
- regression
- targets/_internal
- targets_json_parsers
- python/mbed_tools
- build
- _internal
- config
- templates
- lib
- targets
- _internal
- targets_json_parsers
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
61 files changed
+1291
-2047
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
| 136 | + | |
136 | 137 | | |
137 | | - | |
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
9 | 7 | | |
10 | 8 | | |
11 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
9 | 8 | | |
10 | 9 | | |
11 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
| |||
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
4 | 11 | | |
5 | 12 | | |
6 | 13 | | |
| 14 | + | |
| 15 | + | |
7 | 16 | | |
8 | 17 | | |
9 | 18 | | |
| |||
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
8 | 14 | | |
9 | 15 | | |
10 | 16 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
317 | 317 | | |
318 | 318 | | |
319 | 319 | | |
320 | | - | |
| 320 | + | |
321 | 321 | | |
322 | 322 | | |
323 | 323 | | |
| |||
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
4 | 9 | | |
5 | 10 | | |
6 | 11 | | |
| |||
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
4 | 9 | | |
5 | 10 | | |
6 | 11 | | |
| |||
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
| 2 | + | |
4 | 3 | | |
0 commit comments