Skip to content

Commit

Permalink
Doc: Fx script logic
Browse files Browse the repository at this point in the history
  • Loading branch information
gmuloc committed Feb 20, 2025
1 parent 682fef7 commit c9e48a4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
5 changes: 2 additions & 3 deletions docs/scripts/generate_snippet.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
from rich.markup import escape
from rich.progress import Progress

sys.path.insert(0, str(pathlib.Path(__file__).parents[2]))

from anta.cli.console import console
from anta.cli.nrfu.utils import anta_progress_bar

Expand Down Expand Up @@ -78,9 +80,6 @@ def main(args: list[str], output: Literal["svg", "txt"] = "svg") -> None:
# possibly-used-before-assignment - prog / function_name -> not understanding sys.exit here...
# pylint: disable=E0606
sys.argv = [prog, *args[1:]]
from pathlib import Path

sys.path.insert(0, str(Path(__file__).parents[2]))
module = import_module(module_path)
function = getattr(module, function_name)

Expand Down
2 changes: 1 addition & 1 deletion docs/snippets/anta_nrfu_csv_help.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ Usage: anta nrfu csv [OPTIONS]

Options:
--csv-output FILE Path to save report as a CSV file [env var:
ANTA_NRFU_CSV_CSV_OUTPUT]
ANTA_NRFU_CSV_CSV_OUTPUT; required]
--help Show this message and exit.
2 changes: 2 additions & 0 deletions docs/snippets/anta_nrfu_json_help.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ Usage: anta nrfu json [OPTIONS]

ANTA command to check network state with JSON results.

If no `--output` is specified, the output is printed to stdout.

Options:
-o, --output FILE Path to save report as a JSON file [env var:
ANTA_NRFU_JSON_OUTPUT]
Expand Down

0 comments on commit c9e48a4

Please sign in to comment.