Merged
Conversation
Signed-off-by: James Ball <jameball@qti.qualcomm.com>
Signed-off-by: James Ball <jameball@qti.qualcomm.com>
Signed-off-by: James Ball <jameball@qti.qualcomm.com>
… documentation, and less duplicate code. Signed-off-by: James Ball <jameball@qti.qualcomm.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new tool to generate AsciiDoc appendix fragments from params.json and refactors existing tools to share common loaders/validators via a new shared_utils.py helper module.
Changes:
- Introduces
tools/create_param_appendix.pyto emit one.adoctable-row fragment per parameter for CRD appendix inclusion. - Adds
tools/shared_utils.pyand refactorscreate_params.py/create_normative_rules.pyto reuse shared JSON/YAML loading, logging, and kind/category validation. - Expands test coverage and build automation (new unit tests, updated expected outputs, new Makefile targets) and removes archived Ruby tooling/docs in favor of consolidated
tools/README.md.
Reviewed changes
Copilot reviewed 52 out of 52 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tools/shared_utils.py | New shared constants + logging + JSON/YAML loaders + validators/formatters reused by tools. |
| tools/create_params.py | Refactored to use shared helpers; updates HTML “feature” column and info labeling. |
| tools/create_param_appendix.py | New generator producing per-parameter AsciiDoc fragments from params.json. |
| tools/create_normative_rules.py | Refactored to use shared helpers; minor HTML labeling text updates. |
| tools/archive/detect_tag_changes.rb | Removed archived Ruby script. |
| tools/archive/create_normative_rules.rb | Removed archived Ruby implementation. |
| tools/README_detect_tag_changes.md | Removed in favor of consolidated tools README. |
| tools/README.md | New consolidated documentation for tools directory. |
| tests/text_to_html/test_tag_text_to_html_unit.py | New unit tests for tag_text_to_html.py. |
| tests/text_to_html/test_def_text_to_html_unit.py | New unit tests for def_text_to_html.py. |
| tests/text_to_html/test_adoc_to_html_unit.py | New unit tests for adoc_to_html.py. |
| tests/shared_utils/test_shared_utils.py | New unit tests for shared_utils.py. |
| tests/params/test_param_appendix.py | New integration-style test to assemble a combined appendix from generated fragments. |
| tests/params/test-param-appendix-template.adoc | Template used by appendix assembly test. |
| tests/params/test-ch2.yaml | Adds additional parameters used by updated expected outputs. |
| tests/params/expected/test-params.json | Updated expected params JSON output. |
| tests/params/expected/test-params.html | Updated expected params HTML output. |
| tests/params/expected/test-param-appendix.adoc | New expected combined appendix output. |
| tests/params/expected/test-param-appendix-adoc-includes/* | New expected per-parameter fragment outputs. |
| tests/norm-rule/test-ch2.yaml | Adds additional normative-rule defs used by params/appendix tests. |
| tests/norm-rule/test-ch2.adoc | Updates section title and adds new tags for appended rules. |
| tests/norm-rule/test-ch1.yaml | Updates instances and adds FOOBAR rule. |
| tests/norm-rule/test-ch1.adoc | Adds FOOBAR tag text. |
| tests/norm-rule/expected/test-norm-rules.json | Updated expected normative-rules JSON output. |
| tests/norm-rule/expected/test-norm-rules.html | Updated expected normative-rules HTML output. |
| tests/norm-rule/expected/test-ch2-norm-tags.json | Updated expected extracted tags for chapter 2. |
| tests/norm-rule/expected/test-ch1-norm-tags.json | Updated expected extracted tags for chapter 1. |
| Makefile | Adds targets to build/compare appendix outputs and run new unit tests. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Creating script to convert params.json into adoc files suitable for a CRD appendix