From c74355918fd3bc0cb866a62ec6bf227e5682f6a9 Mon Sep 17 00:00:00 2001 From: Artem Rys Date: Tue, 12 Nov 2024 15:24:12 +0100 Subject: [PATCH] docs(generated_files): update generation script (#1449) **Issue number:** N/A ## Summary ### Changes Update generated files Python script to reflect documentation changes done in #1393. ### User experience N/A ## Checklist If your change doesn't seem to apply, please leave them unchecked. * [x] I have performed a self-review of this change * [ ] Changes have been tested * [ ] Changes are documented * [x] PR title follows [conventional commit semantics](https://www.conventionalcommits.org/en/v1.0.0/) --------- Co-authored-by: srv-rr-github-token <94607705+srv-rr-github-token@users.noreply.github.com> --- .github/workflows/automatic_doc_generation.yml | 2 +- docs/generated_files.md | 2 +- .../generators/doc_generator.py | 6 +----- tests/unit/generators/test_doc_generator.py | 12 ++---------- 4 files changed, 5 insertions(+), 17 deletions(-) diff --git a/.github/workflows/automatic_doc_generation.yml b/.github/workflows/automatic_doc_generation.yml index c65561ce5..45444cd5e 100644 --- a/.github/workflows/automatic_doc_generation.yml +++ b/.github/workflows/automatic_doc_generation.yml @@ -44,4 +44,4 @@ jobs: if: ${{ env.isPR }} run: | git add \*.md - git diff --staged --exit-code || (git commit -S -m "doc: updated docs regarding generated conf, xml and html files" && git push) + git diff --staged --exit-code || (git commit -S -m "docs: updated docs regarding generated conf, xml and html files" && git push) diff --git a/docs/generated_files.md b/docs/generated_files.md index 8295ee269..582f41de5 100644 --- a/docs/generated_files.md +++ b/docs/generated_files.md @@ -4,7 +4,7 @@ title: UCC framework generated files The following table describes the files generated by UCC framework. -| File name | File location | File description | +| File Name | File Location | File Description | | ------------ | ------------ | ----------------- | | app.conf | output/<YOUR_ADDON_NAME>/default | Generates `app.conf` with the details mentioned in globalConfig[meta] | | inputs.conf | output/<YOUR_ADDON_NAME>/default | Generates `inputs.conf` and `inputs.conf.spec` file for the services mentioned in globalConfig | diff --git a/splunk_add_on_ucc_framework/generators/doc_generator.py b/splunk_add_on_ucc_framework/generators/doc_generator.py index 09ed99c56..e322554f2 100644 --- a/splunk_add_on_ucc_framework/generators/doc_generator.py +++ b/splunk_add_on_ucc_framework/generators/doc_generator.py @@ -25,11 +25,7 @@ def generate_docs() -> None: title: UCC framework generated files --- -# Generated files - -Below table describes the files generated by UCC framework - -## File Description +The following table describes the files generated by UCC framework. """ ) doc_content.append("| File Name | File Location | File Description |") diff --git a/tests/unit/generators/test_doc_generator.py b/tests/unit/generators/test_doc_generator.py index 0f7c0b1d0..820b76b29 100644 --- a/tests/unit/generators/test_doc_generator.py +++ b/tests/unit/generators/test_doc_generator.py @@ -34,11 +34,7 @@ def test_generate_docs(mock_open, mock_dirname, mock_realpath): "title: UCC framework generated files", "---", "", - "# Generated files", - "", - "Below table describes the files generated by UCC framework", - "", - "## File Description", + "The following table describes the files generated by UCC framework.", "", "| File Name | File Location | File Description |", "| ------------ | ------------ | ----------------- |", @@ -75,11 +71,7 @@ def test_generate_docs_empty_list(mock_open_file, mock_dirname, mock_realpath): "title: UCC framework generated files", "---", "", - "# Generated files", - "", - "Below table describes the files generated by UCC framework", - "", - "## File Description", + "The following table describes the files generated by UCC framework.", "", "| File Name | File Location | File Description |", "| ------------ | ------------ | ----------------- |",