Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mauro.chehab@linux.intel.com>
To: Kamil Konieczny <kamil.konieczny@linux.intel.com>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t 6/6] scripts/doc_to_xls.py: add an script to generate a doc spreadsheet
Date: Fri, 26 May 2023 15:37:44 +0200	[thread overview]
Message-ID: <20230526153744.114d8456@maurocar-mobl2> (raw)
In-Reply-To: <20230526122047.5nxvhb2xptxv6fyg@kamilkon-desk1>

On Fri, 26 May 2023 14:20:47 +0200
Kamil Konieczny <kamil.konieczny@linux.intel.com> wrote:

> Hi Mauro,
> 
> On 2023-05-22 at 16:22:01 +0200, Mauro Carvalho Chehab wrote:
> > From: Mauro Carvalho Chehab <mchehab@kernel.org>
> > 
> > Add a script to convert documentation to a spreadsheet.
> > 
> > The logic here can read multiple config files. It will retrieve
> > documentation from the files that are configured inside each input
> > JSON file.
> > 
> > Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>  
> 
> imho it is worth to add examples of useage here or as comments
> in source code.
> 
> Acked-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
> 
> Regards,
> Kamil

Good point. I'll add it to the script's help:

$ scripts/doc_to_xls.py --help
usage: doc_to_xls.py [-h] --config CONFIG [CONFIG ...] [--include-plan] --xls XLS

Write the contents of the testplan documentation to a XLS file.

options:
  -h, --help            show this help message and exit
  --config CONFIG [CONFIG ...]
                        JSON file describing the test plan template
  --include-plan        Include test plans, if any.
  --xls XLS             Output XLS file.

Examples:

1. Create a XLS file with a single worksheet with Xe driver documentation:

   scripts/doc_to_xls.py --config tests/kms_*json tests/*/*.json --xls igt_test_documentation.xls

2. Create a XLS file with one sheet per driver, for all drivers with testplan config files and KMS:

   scripts/doc_to_xls.py --config tests/kms_*json tests/*/*.json --xls igt_test_documentation.xls


I'll fold the enclosed diff at the patch and add your A-B.

Regards,
Mauro

---

diff --git a/scripts/doc_to_xls.py b/scripts/doc_to_xls.py
index 1f33c1828ceb..8531eeb81779 100755
--- a/scripts/doc_to_xls.py
+++ b/scripts/doc_to_xls.py
@@ -8,7 +8,19 @@
 ## Allow keeping inlined test documentation and validate   ##
 ## if the documentation is kept updated.                   ##
 
-"""Maintain test plan and test implementation documentation on IGT."""
+"""Write the contents of the testplan documentation to a XLS file."""
+
+EPILOG="""
+Examples:
+
+1. Create a XLS file with a single worksheet with Xe driver documentation:
+
+   scripts/doc_to_xls.py --config tests/kms_*json tests/*/*.json --xls igt_test_documentation.xls
+
+2. Create a XLS file with one sheet per driver, for all drivers with testplan config files and KMS:
+
+   scripts/doc_to_xls.py --config tests/kms_*json tests/*/*.json --xls igt_test_documentation.xls
+"""
 
 import argparse
 
@@ -16,9 +28,9 @@ from openpyxl import Workbook
 
 from test_list import TestList
 
-parser = argparse.ArgumentParser(description = "Print formatted kernel documentation to stdout.",
-                                 formatter_class = argparse.ArgumentDefaultsHelpFormatter,
-                                 epilog = 'If no action specified, assume --rest.')
+parser = argparse.ArgumentParser(description=__doc__,
+                                 formatter_class = argparse.RawDescriptionHelpFormatter,
+                                 epilog = EPILOG)
 parser.add_argument("--config", required = True,  nargs='+',
                     help="JSON file describing the test plan template")
 parser.add_argument("--include-plan", action="store_true",

  reply	other threads:[~2023-05-26 13:38 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-22 14:21 [igt-dev] [PATCH i-g-t 0/6] Add a method to create spreadsheets Mauro Carvalho Chehab
2023-05-22 14:21 ` [igt-dev] [PATCH i-g-t 1/6] scripts/test_list.py: add support to define a name at the config file Mauro Carvalho Chehab
2023-05-26 11:56   ` Kamil Konieczny
2023-05-22 14:21 ` [igt-dev] [PATCH i-g-t 2/6] kms_test_config.json: add a name for the KMS Intel testset Mauro Carvalho Chehab
2023-05-26 11:57   ` Kamil Konieczny
2023-05-22 14:21 ` [igt-dev] [PATCH i-g-t 3/6] i915_test_config.json: add a driver name Mauro Carvalho Chehab
2023-05-26 11:57   ` Kamil Konieczny
2023-05-22 14:21 ` [igt-dev] [PATCH i-g-t 4/6] xe_test_config.json: " Mauro Carvalho Chehab
2023-05-26 11:59   ` Kamil Konieczny
2023-05-22 14:22 ` [igt-dev] [PATCH i-g-t 5/6] scripts/test_list.py: add a method to return an spreadsheet-like array Mauro Carvalho Chehab
2023-05-26 12:18   ` Kamil Konieczny
2023-05-22 14:22 ` [igt-dev] [PATCH i-g-t 6/6] scripts/doc_to_xls.py: add an script to generate a doc spreadsheet Mauro Carvalho Chehab
2023-05-26 12:20   ` Kamil Konieczny
2023-05-26 13:37     ` Mauro Carvalho Chehab [this message]
2023-05-22 17:03 ` [igt-dev] ✓ Fi.CI.BAT: success for Add a method to create spreadsheets Patchwork
2023-05-23  0:23 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2023-05-26 14:33 ` [igt-dev] ✗ Fi.CI.BAT: failure for Add a method to create spreadsheets (rev2) Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230526153744.114d8456@maurocar-mobl2 \
    --to=mauro.chehab@linux.intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=kamil.konieczny@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox