From bc021916403a408b9d0878b38e133086ea63946c Mon Sep 17 00:00:00 2001 From: Matthew Burket Date: Wed, 5 Jun 2024 17:54:18 -0500 Subject: [PATCH 1/4] Add YAML to Editorconfig editconfig --- .editorconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.editorconfig b/.editorconfig index 888f4ad..572710d 100644 --- a/.editorconfig +++ b/.editorconfig @@ -4,7 +4,7 @@ root = true end_of_line = lf insert_final_newline = true -[**.py] +[{**.py,**.yml,**.yaml}] indent_style = space indent_size = 4 From 21fb329c01a4d64fb128dd955ec1b6bd374ae130 Mon Sep 17 00:00:00 2001 From: Matthew Burket Date: Wed, 5 Jun 2024 17:31:06 -0500 Subject: [PATCH 2/4] Use package imports Easier to the docs build --- compliance_tool/cli.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/compliance_tool/cli.py b/compliance_tool/cli.py index 1d2520d..9916cc1 100644 --- a/compliance_tool/cli.py +++ b/compliance_tool/cli.py @@ -1,7 +1,5 @@ import argparse -import list -import scan -import remediate +from compliance_tool import list, scan, remediate def prepare_parser_list(subparsers) -> None: From f679d3fe40bb614061ee4ea7326fefe951e15d9e Mon Sep 17 00:00:00 2001 From: Matthew Burket Date: Wed, 5 Jun 2024 17:31:29 -0500 Subject: [PATCH 3/4] Update docs New method for creating the argparse parser --- docs/compliance-tool.1.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/compliance-tool.1.rst b/docs/compliance-tool.1.rst index cd3ba6d..401edd3 100644 --- a/docs/compliance-tool.1.rst +++ b/docs/compliance-tool.1.rst @@ -2,9 +2,10 @@ compliance-tool =============== +.. currentmodule:: compliance_tool .. argparse:: :module: compliance_tool.cli - :func: prepare_parser + :func: prepare_parsers :prog: compliance-tool From 9ac469bc8c3aafe9bf7191f916a6711e0666b051 Mon Sep 17 00:00:00 2001 From: Matthew Burket Date: Wed, 5 Jun 2024 18:07:51 -0500 Subject: [PATCH 4/4] Add docs CI job To ensure the docs build fix docs fix docs fix docs fix docs --- .github/workflows/docs.yaml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/docs.yaml diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml new file mode 100644 index 0000000..edcb9e9 --- /dev/null +++ b/.github/workflows/docs.yaml @@ -0,0 +1,27 @@ +name: Docs +on: + push: + branches: [ 'main', '*' ] + pull_request: + branches: [ 'main', ] +concurrency: + group: ${{ github.workflow }}-${{ github.event.number || github.run_id }} + cancel-in-progress: true +jobs: + validate-docs: + name: Validate Docs + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Install Dependencies + run: pip install -r docs/requirements.txt build + - name: Build the project + run: python -m build + - name: Install the project + run: pip install dist/compliance_tool-*-py3-none-any.whl + - name: Build the Docs + working-directory: docs + run: make html + - name: Ensure the docs built + run: grep 'Sub-commands' docs/_build/html/compliance-tool.1.html