From 0532e71c2b09ad0a56040d8dfce6c5ed4fe0a769 Mon Sep 17 00:00:00 2001 From: Grzegorz Ferenc Date: Thu, 30 Mar 2023 13:10:46 +0200 Subject: [PATCH 1/4] edit_table.py: fix issue breaking SDK doc build Removed period from the ASN.1 entry as it is breaking markdown formatting and the whole SDK doc build. Checked against headers in src\lib\asn1, which allow ASN1 without the period. Signed-off-by: Grzegorz Ferenc --- scripts/error_table.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/error_table.py b/scripts/error_table.py index c8e5c1040affe9..b71d518117df87 100644 --- a/scripts/error_table.py +++ b/scripts/error_table.py @@ -134,7 +134,7 @@ def main(): "src/lib/core/CHIPError.h": ErrorDescriptor(section="SDK Core", code_range=0x000, macro_regex=r"^#define\s+(?P[_A-Z0-9]+)\s+CHIP(_CORE)?_ERROR[(](?P(0x[a-fA-F0-9]+)|\d+)[)]"), "src/inet/InetError.h": ErrorDescriptor(section="SDK Inet Layer", code_range=0x100, macro_regex=r"^#define\s+(?P[_A-Z0-9]+)\s+CHIP_INET_ERROR[(](?P(0x[a-fA-F0-9]+)|\d+)[)]"), "src/include/platform/CHIPDeviceError.h": ErrorDescriptor(section="SDK Device Layer", code_range=0x200, macro_regex=r"^#define\s+(?P[_A-Z0-9]+)\s+CHIP_DEVICE_ERROR[(](?P(0x[a-fA-F0-9]+)|\d+)[)]"), - "src/lib/asn1/ASN1Error.h": ErrorDescriptor(section="ASN.1 Layer", code_range=0x300, macro_regex=r"^#define\s+(?P[_A-Z0-9]+)\s+CHIP_ASN1_ERROR[(](?P(0x[a-fA-F0-9]+)|\d+)[)]"), + "src/lib/asn1/ASN1Error.h": ErrorDescriptor(section="ASN1 Layer", code_range=0x300, macro_regex=r"^#define\s+(?P[_A-Z0-9]+)\s+CHIP_ASN1_ERROR[(](?P(0x[a-fA-F0-9]+)|\d+)[)]"), "src/ble/BleError.h": ErrorDescriptor(section="BLE Layer", code_range=0x400, macro_regex=r"^#define\s+(?P[_A-Z0-9]+)\s+CHIP_BLE_ERROR[(](?P(0x[a-fA-F0-9]+)|\d+)[)]"), "src/protocols/interaction_model/StatusCodeList.h": ErrorDescriptor(section="IM Global errors", code_range=0x500, macro_regex=r"^CHIP_IM_STATUS_CODE[(][A-Za-z0-9_]+\s*,\s*(?P[A-Z0-9_]+)\s*,\s*(?P(0x[a-fA-F0-9]+)|\d+)[)]"), } From 75692d906a3a84c7546e4815bef3229f2c01c4ee Mon Sep 17 00:00:00 2001 From: Grzegorz Ferenc Date: Thu, 30 Mar 2023 13:24:46 +0200 Subject: [PATCH 2/4] error_table.py: remove lines creating Myst issue Removed lines that caused the docbuild to fail with "src/ERROR_CODES.md:259: WARNING: Duplicate reference definition: // [myst.duplicate_def]" issue. These lines excluded ERROR_CODES.md from spellchecking, but this exclusion is already ensured by line 68 in .spellcheck.yml. Signed-off-by: Grzegorz Ferenc --- docs/ERROR_CODES.md | 8 ++------ scripts/error_table.py | 6 ------ 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/docs/ERROR_CODES.md b/docs/ERROR_CODES.md index 17f4ff6ba83a5a..694208e93b82ce 100644 --- a/docs/ERROR_CODES.md +++ b/docs/ERROR_CODES.md @@ -1,5 +1,3 @@ -[//]: # "start_ignore_spellcheck" - # Matter SDK `CHIP_ERROR` enums values This file was **AUTOMATICALLY** generated by @@ -10,7 +8,7 @@ This file was **AUTOMATICALLY** generated by - [SDK Core errors: range `0x000..0x0FF`](#sdk-core-errors) - [SDK Inet Layer errors: range `0x100..0x1FF`](#sdk-inet-layer-errors) - [SDK Device Layer errors: range `0x200..0x2FF`](#sdk-device-layer-errors) -- [ASN.1 Layer errors: range `0x300..0x3FF`](#asn-1-layer-errors) +- [ASN1 Layer errors: range `0x300..0x3FF`](#asn1-layer-errors) - [BLE Layer errors: range `0x400..0x4FF`](#ble-layer-errors) - [IM Global errors errors: range `0x500..0x5FF`](#im-global-errors-errors) @@ -179,7 +177,7 @@ This file was **AUTOMATICALLY** generated by | 515 | 0x203 | `CHIP_DEVICE_ERROR_SOFTWARE_UPDATE_ABORTED` | | 516 | 0x204 | `CHIP_DEVICE_ERROR_SOFTWARE_UPDATE_IGNORED` | -## ASN.1 Layer errors +## ASN1 Layer errors | Decimal | Hex | Name | | ------- | ----- | --------------------------------- | @@ -255,5 +253,3 @@ This file was **AUTOMATICALLY** generated by | 1481 | 0x5C9 | `TIMED_REQUEST_MISMATCH` | | 1482 | 0x5CA | `FAILSAFE_REQUIRED` | | 1520 | 0x5F0 | `WRITE_IGNORED` | - -[//]: # "end_ignore_spellcheck" diff --git a/scripts/error_table.py b/scripts/error_table.py index b71d518117df87..4cdd4cf39a676c 100644 --- a/scripts/error_table.py +++ b/scripts/error_table.py @@ -139,9 +139,6 @@ def main(): "src/protocols/interaction_model/StatusCodeList.h": ErrorDescriptor(section="IM Global errors", code_range=0x500, macro_regex=r"^CHIP_IM_STATUS_CODE[(][A-Za-z0-9_]+\s*,\s*(?P[A-Z0-9_]+)\s*,\s*(?P(0x[a-fA-F0-9]+)|\d+)[)]"), } - print() - print("[//]: # (start_ignore_spellcheck)") - print() print("# Matter SDK `CHIP_ERROR` enums values") print() print("This file was **AUTOMATICALLY** generated by `python scripts/error_table.py > docs/ERROR_CODES.md`.") @@ -157,8 +154,5 @@ def main(): for filename, descriptor in descriptors.items(): dump_table(Path(filename), descriptor) - print("[//]: # (end_ignore_spellcheck)") - - if __name__ == "__main__": main() From 28a060c6b284da428a427974d944a84e82ed42db Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Thu, 30 Mar 2023 11:37:21 +0000 Subject: [PATCH 3/4] Restyled by autopep8 --- scripts/error_table.py | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/error_table.py b/scripts/error_table.py index 4cdd4cf39a676c..4f5dc13a22939d 100644 --- a/scripts/error_table.py +++ b/scripts/error_table.py @@ -154,5 +154,6 @@ def main(): for filename, descriptor in descriptors.items(): dump_table(Path(filename), descriptor) + if __name__ == "__main__": main() From b40c439534c8a9fe555559b2262741a74df82ade Mon Sep 17 00:00:00 2001 From: Gaute Svanes Lunde Date: Thu, 30 Mar 2023 09:12:16 +0200 Subject: [PATCH 4/4] doc: Fix dependancy version Fix version of dependancy pydata-sphinx-theme to 0.13.1 since v0.13.2 introduced breaking changes. Signed-off-by: Gaute Svanes Lunde --- docs/requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/requirements.txt b/docs/requirements.txt index 988f0b3f668058..8ec13856113df5 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -3,3 +3,4 @@ Sphinx>=4.5 sphinx-book-theme myst-parser breathe>=4.34 +pydata-sphinx-theme==0.13.1