Skip to content

Commit

Permalink
Merge pull request #2 from Mab879/fix_docs
Browse files Browse the repository at this point in the history
Fix Docs
  • Loading branch information
jan-cerny authored Jun 6, 2024
2 parents 2adb54c + 9ac469b commit 27fad6b
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ root = true
end_of_line = lf
insert_final_newline = true

[**.py]
[{**.py,**.yml,**.yaml}]
indent_style = space
indent_size = 4

Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -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
4 changes: 1 addition & 3 deletions compliance_tool/cli.py
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
3 changes: 2 additions & 1 deletion docs/compliance-tool.1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

compliance-tool
===============
.. currentmodule:: compliance_tool

.. argparse::
:module: compliance_tool.cli
:func: prepare_parser
:func: prepare_parsers
:prog: compliance-tool

0 comments on commit 27fad6b

Please sign in to comment.