From f3d77e4ad0d7d8c0f7255292f4a9a412a12da913 Mon Sep 17 00:00:00 2001 From: Grzegorz Ferenc <41291385+greg-fer@users.noreply.github.com> Date: Thu, 30 Mar 2023 14:50:12 +0200 Subject: [PATCH] Fix doc build issue in ERROR_CODES.md (#25894) * 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 * 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 * Restyled by autopep8 * 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 --------- Signed-off-by: Grzegorz Ferenc Signed-off-by: Gaute Svanes Lunde Co-authored-by: Restyled.io Co-authored-by: Gaute Svanes Lunde --- docs/ERROR_CODES.md | 8 ++------ docs/requirements.txt | 1 + scripts/error_table.py | 7 +------ 3 files changed, 4 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/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 diff --git a/scripts/error_table.py b/scripts/error_table.py index c8e5c1040affe9..4f5dc13a22939d 100644 --- a/scripts/error_table.py +++ b/scripts/error_table.py @@ -134,14 +134,11 @@ 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+)[)]"), } - 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,6 @@ def main(): for filename, descriptor in descriptors.items(): dump_table(Path(filename), descriptor) - print("[//]: # (end_ignore_spellcheck)") - if __name__ == "__main__": main()