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 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 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: 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