Skip to content

Add Verification Script for widgets.xml - #101

Draft
Lightning11wins wants to merge 62 commits into
masterfrom
widgets-xml-script3
Draft

Add Verification Script for widgets.xml#101
Lightning11wins wants to merge 62 commits into
masterfrom
widgets-xml-script3

Conversation

@Lightning11wins

@Lightning11wins Lightning11wins commented May 11, 2026

Copy link
Copy Markdown
Contributor

This python3 script detects discrepancies between the widgets.xml docs and the widget implementations in wgtr_*.c, htr_*.c, and htr_*.js files to generate a report. The report summarizes the issues detected and provides links to make it easy for developers to quickly correct them. This branch also includes a documentation file explaining how to read the reports, how to use the script, and a high-level overview of how the script works.

Note: Many of the issues detected by running this script are fixed in #100.

Example 1
ReportExample1

Example 2
ReportExample2

Note 1: As usual, these changes were made on a completely different dev branch, then the commits were cherry-picked to this branch. This prevents the PR being blocked behind 8+ other PRs, however, it was a difficult and technical process. If you notice any bizarre changes on this branch, please let me know.

Add a defined config section.
Move regexes to their own section below the config section.
Add a section for types.
Move "drift types" to above compute_drift() in preparation removing them.
Rename OBSOLETE_WIDGETS to IGNORED_WIDGETS.
Add to ignored widgets.
Add to widget aliases.
Add config options.

Add a universal rule for __pycache__ to the .gitignore file.
Rename many symbols to improve clarity.
Remove unused types.
Improve code comments.
Clean up slop.
Improve symbol regex.
Rename get_documented_widgets() to parse_docs().
Rename parse_c_impl() to parse_c().
Rename parse_js_impl() to parse_js().
Fix typos.
Update widget aliases.
Remove skipped widgets from ignored widgets list.
Add remotectl and remotemgr to ignored widgets list.
Add IGNORE_MISSING_PROPERTY_DOCS.
Reorder configs and improve clarity.
Refactor to remove some unnecessary report types.
Improve code style and layout.
Rename slug_origin() to get_origin().
Clean up code.
Update report generation to derive origins from ref paths.
Remove now unused origin data storage.
Display origins above more sources.
Move sections from Other Notes to Using Doc Reports.
Add a list of future improvements.
Refactor to improve readability maintainability.
Rename _normalize_child_type() to normalize_child_name().
Clean up unused code.
Fix detection ignoring all but the first widget in htdrv_*.c files.
Add a section to the docs documenting assumptions about child widgets.
Replace case-sensitive string check with more-flexible case-insensitive regex.
Improve regex.
Improve types.
Comment thread centrallix-doc/Widgets/doc-report/generate.py Outdated
@Lightning11wins

Copy link
Copy Markdown
Contributor Author

@greptileai I think I've resolved all of your feedback. Please conduct a thorough re-review of the entire PR and tell me if there are any other issues.

@Lightning11wins

Copy link
Copy Markdown
Contributor Author

This PR is cleared for human review.

@Lightning11wins
Lightning11wins requested review from gbeeley and nboard May 12, 2026 21:49
@Lightning11wins Lightning11wins changed the title Widgets XML Verification Script Add Verification Script for widgets.xml Jun 10, 2026
Comment thread centrallix-doc/Widgets/doc-report/generate.py Outdated
@Lightning11wins

Copy link
Copy Markdown
Contributor Author

I'd like to do some more review on this before we merge it.

@Lightning11wins
Lightning11wins marked this pull request as draft August 28, 2026 23:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-review Request AI review for PRs. documentation Changes, improvements, or fixes to documentation files. size: medium Might be hard to review, usually less than ~5000 lines. testing Includes testing, either new tests or updates to existing tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant