Skip to main content

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.

The email subject can be templated. For example:

build: {{ build.metadata.kernel_version }}/{{ build.version }}

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

Create a performance report for sysbenchcpu data using mmtests

squad-report --group=~anders.roxell --project=linux-stable-linux-5.10.y --build=v5.10.93
      --base-build=v5.10.90 --environments=x86 --suites=mmtests-sysbenchcpu-tests
      --template=perf-report --perf-report-hook=mmtests --perf-report-hook-args=/path/to/mmtests

Usage

usage: squad-report [-h] [--cache CACHE] [--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-cc EMAIL_CC] [--email-from EMAIL_FROM] [--email-subject EMAIL_SUBJECT] [--email-to EMAIL_TO]
       [--output OUTPUT] [--send-on SEND_ON] [--template TEMPLATE]
       [--config CONFIG] [--config-report-type CONFIG_REPORT_TYPE]
       [--perf-report-hook SCRIPT] [--perf-report-hook-args ARGS] [--unfinished] [--version]

Create a report using data from SQUAD

optional arguments:
  -h, --help            show this help message and exit
  --cache CACHE         Cache squad-client requests with a timeout
  --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-cc EMAIL_CC   Create the report with email cc
  --email-from EMAIL_FROM
                        Create the report with email from
  --email-subject EMAIL_SUBJECT
                        Create the report with this email subject
  --email-to EMAIL_TO   Create the report with email to
  --output OUTPUT       Write the report to this file
  --send-on SEND_ON     Send on failures, regressions or always.
                        example: FAIL:REG, REG default: ALL
  --template TEMPLATE   Create the report with this template
  --config CONFIG       Create the report using this configuration
  --config-report-type CONFIG_REPORT_TYPE
                        Set the report type to use in the local config file
  --perf-report-hook SCRIPT
                        Set the performance script
  --perf-report-hook-args ARGS
                        Set arguments for the performance script
  --unfinished          Create a report even if a build is not finished
  --version             Print out the 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

Metadata

Release files for squad-report 1.9.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for squad-report 1.9.0
File Size Uploaded
squad-report-1.9.0.tar.gz 16.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for squad-report 1.9.0
File Interpreter ABI Platform
squad_report-1.9.0-py3-none-any.whl Python 3 none any Details

Total release size: 34.4 kB

Release files / squad-report-1.9.0.tar.gz

Download URL squad-report-1.9.0.tar.gz
Size 16.0 kB
Tags Source
SHA-256 checksum
How to use checksums
90517277e4c39a3631ec3f3e52b785a35a5c83d19456273a9648187eeddfbc94
BLAKE2b-256 checksum
How to use checksums
2e09ff88fb3b8500085ec1a61ede2f389be95c8936c719be624c12046c06d397
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.13

Release files / squad_report-1.9.0-py3-none-any.whl

Download URL squad_report-1.9.0-py3-none-any.whl
Size 18.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4a1bcc445d227d75779676be6a2422ed3efaf729470d889ef00ec91e8fd1fdaa
BLAKE2b-256 checksum
How to use checksums
073c889988c9f24ddc2ddb53f3cc9598cb845817484c1ff5040c800d6b0a0be6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.13

Release history Release notifications | RSS feed

This release

1.9.0 This release

2 release files

1.8.3

2 release files

1.8.2

2 release files

1.8.1

2 release files

1.8.0

2 release files

1.7.0

2 release files

1.6.1

2 release files

1.6.0

2 release files

1.5.0

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page