Skip to main content

squad data

Project description

squad-report

Create human-friendly reports from software quality data.

squad is a software quality dashboard. The service provides storage and a public API.

squad-client is a client library. The library fetches data from a squad service API.

squad-report is a command-line program that uses squad-client to create human-friendly reports using software quality data from a squad service.

Install

Use pip to install from pypi.

pip install squad-report

Config

The user-specific config file is located at ~/.config/squad_report/config.yaml.

NOTE: All config values will override command-line options.

Example config

config: &config
    sig_name: "Anders Roxell"
    sig_url: "https://lkft.linaro.org"
    email_from: "LKFT <lkft@linaro.org>"
    email_to: "LKFT <lkft@linaro.org>"
    email_subject: "LKFT Test Report"
    reported_tested_by: "Anders Roxell <anders.roxell@linaro.org>"

report:
  - name: report
    << : *config
    email_subject: "testing Stable RC reports"
    template: report
    output: report.txt

Example config usage

$ squad-report \
        --config-report-type=report \
        --group=lkft --project=linux-next-master --build=next-20210223
Report created in report.txt

$ cat report.txt
From: LKFT <lkft@linaro.org>
To: LKFT <lkft@linaro.org>
Cc:
Subject: [REGRESSION] testing Stable RC reports

## Build
* kernel: 5.11.0
* git: ['https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git', 'https://gitlab.com/Linaro/lkft/mirrors/next/linux-next']
* git branch: master
* git commit: 8431fb50e1a7ffe7fcc4da2f798d3100315cee7b
* git describe: next-20210223
* test details: https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20210223

...

Reported-by: Anders Roxell <anders.roxell@linaro.org>

...

--
Anders Roxell
https://lkft.linaro.org

Templates

The user-specific template directory is located at ~/.config/squad_report/templates.

If you want to add your own templates, you need to copy them to the above directory with a name of <template>.txt.jinja.

Email

You can specify email headers to be included in the report so you can send it out later.

NOTE: Email headers will only be present if you specify the email subject.

Example email usage

$ squad-report \
        --email-from="lkft@linaro.org" \
        --email-to="lkft@linaro.org"   \
        --email-subject="report for linux-next" \
        --group=lkft --project=linux-next-master --build=next-20210223 \
        --template=report --output=report.txt
Report created in report.txt

$ head -n 15 report.txt
From: lkft@linaro.org
To: lkft@linaro.org
Cc: None
Subject: [REGRESSION] report for linux-next

## Build
* kernel: 5.11.0
* git: ['https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git', 'https://gitlab.com/Linaro/lkft/mirrors/next/linux-next']
* git branch: master
* git commit: 8431fb50e1a7ffe7fcc4da2f798d3100315cee7b
* git describe: next-20210223
* test details: https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20210223

...

Examples

Create a report from a squad project

squad-report --group=lkft --project=linux-next-master --build=next-20210223 --template=report-full

Create a report that shows build results for all environments

squad-report --group=lkft --project=linux-next-master --build=next-20210223 --suites=build --template=report-full

Create a report that shows build results for the arm64 environment

squad-report --group=lkft --project=linux-next-master --build=next-20210223 --suites=build --environments=arm64 --template=report-full

Create a report that shows kselftest results

squad-report --group=lkft --project=linux-next-master --build=next-20210223 --suite-prefixes=kselftest --template=report-full

Usage

usage: squad-report [-h] [--token TOKEN] [--url URL]
       [--group GROUP] [--project PROJECT] [--build BUILD] [--base-build BASE_BUILD]
       [--environments ENVIRONMENTS | --environment-prefixes ENVIRONMENT_PREFIXES]
       [--suites SUITES | --suite-prefixes SUITE_PREFIXES]
       [--email-from FROM] [--email-to TO] [--email-cc CC] [--email-subject SUBJECT]
       [--config-report-type NAME] [--output OUTPUT] [--template TEMPLATE] [--unfinished]

Create a report using data from SQUAD

optional arguments:
  -h, --help            show this help message and exit
  --token TOKEN         Authenticate to SQUAD using this token
  --url URL             URL of the SQUAD service
  --group GROUP         SQUAD group
  --project PROJECT     SQUAD project
  --build BUILD         SQUAD build
  --base-build BASE_BUILD
                        SQUAD build to compare to
  --environments ENVIRONMENTS
                        List of SQUAD environments to include
  --environment-prefixes ENVIRONMENT_PREFIXES
                        List of prefixes of SQUAD environments to include
  --suites SUITES       List of SQUAD suites to include
  --suite-prefixes SUITE_PREFIXES
                        List of prefixes of SQUAD suites to include
  --email-from FROM     Create the report with this email from
  --email-to TO         Create the report with this email to
  --email-cc CC         Create the report with this email cc
  --email-subject SUBJECT
                        Create the report with this email subject
  --config-report-type TYPE
                        Type of report to write, will be picked from
                        the config.yaml file.
  --output OUTPUT       Write the report to this file
  --template TEMPLATE   Create the report with this template
  --unfinished          Create a report even if a build is not finished
  --version             Print out the package version.

Logging

To enable logging output, set LOG_LEVEL in your environment.

The most common levels to use are INFO and DEBUG.

See Logging Levels for more options.

Contributing

CONTRIBUTING.md

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

squad-report-1.0.0.tar.gz (12.0 kB view details)

Uploaded Source

Built Distribution

squad_report-1.0.0-py3-none-any.whl (12.1 kB view details)

Uploaded Python 3

File details

Details for the file squad-report-1.0.0.tar.gz.

File metadata

  • Download URL: squad-report-1.0.0.tar.gz
  • Upload date:
  • Size: 12.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for squad-report-1.0.0.tar.gz
Algorithm Hash digest
SHA256 2725e4eefb305435c551110e59842d3f572034a2ca2674d582c42ced5cc4b671
MD5 ac1a4eec7f23ff13b41a95368774d8d4
BLAKE2b-256 a15727fc4d9a6311583ddfa0b8aa29993fd398d72862f494985ab9094f78377f

See more details on using hashes here.

File details

Details for the file squad_report-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: squad_report-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 12.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for squad_report-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 87766d7d02a656b0c25bd7094d59cb6d51171435ee5e2cbe759eed27a942bdb2
MD5 60e467423afed74de0f593d8a15dae15
BLAKE2b-256 8fe3598d3f6147decbc37dea27f8e9002e951d48223318a95cf4b0b934e3609d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page