ciqar


Nameciqar JSON
Version 0.2.0 PyPI version JSON
download
home_pageNone
SummaryCiqar is a tool for creating reports from different code quality analyzers output.
upload_time2023-06-03 16:46:56
maintainerNone
docs_urlNone
authorThomas Wesenigk <thw-oss@fomori.de>
requires_python>=3.7
licenseNone
keywords linter report code analysis code quality
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Ciqar

Ciqar is a tool for creating useful and (at least somewhat) pretty HTML reports from different code
quality analyzers output in case the analyzers do not provide sufficient report or you want a uniform
style. The report is generated from a Jinja template so that it can be customized. At the moment, MyPy
and Pyright are supported as analyzers.

The name is made up from how we pronounced the earliest project name `cqr` (which is the abbreviation
for *code quality reports*) as a word. Do not confuse it with `Cigar` 😉

Have a look at two HTML reports for Ciqar version 0.1.0 (some violations were added purposely 😉):
 - MyPy: https://aardjon.codeberg.page/ciqar/reports/mypy/
 - Pyright: https://aardjon.codeberg.page/ciqar/reports/pyright/

[![Build status](https://ci.appveyor.com/api/projects/status/11bkqbw0exo6y76s?svg=true)](https://ci.appveyor.com/project/Aardjon/ciqar)


## Installation

Ciqar releases are available on PyPI, so you can easily install it via `pip`:
```
pip install ciqar
```

Alternatively you can install from source code:
```
cd /path/to/ciqar/source
pip install -e .
```


## Usage

Tell Ciqar the location of the analyzer output and the paths to search for source files. The search path
configuration is usually the same as for your static code analyzer.

```
ciqar --analyzer-result mypy:/path/to/mypy.log --source /path/to/src/dir --output /path/to/destination/dir
```

The "Analyzer result URL" (`--analyzer-result`) is a URL string with the *scheme* part defining which code
analyzer has been used and the *path* containing the path to result data. The kind of the path object (e.g.
directory or file, file type) depends on the chosen analyzer. Currently supported analyzers:

| Analyzer | URL Scheme | URL path                                              |
|----------|------------|-------------------------------------------------------|
| MyPy     | "mypy"     | Single file with the stdout output of the MyPy run.   |
| Pyright  | "pyright   | Single JSON file generated by `pyright --outputjson`. |


`--source` may be provided several times to search more than one directory. In addition (or alternatively)
it is also possible to exclude files or directories from the configured search paths with the `--exclude`
option, which may also be provided several times:

```
ciqar --source /path/to/src/dir --exclude /path/to/src/dir/examples --exclude /path/to/src/dir/snippet.py --analyzer-result [...] --output [...]
```

The `--output` option simply defines the directory to write the report into. Any existing files will be overwritten.

The optional `--template` parameter defines the report template to use, allowing to generate different
kinds of reports. The template name must be specified by its name:
```
ciqar -r mypy:mypy.log -s src -o output -t html_detailed
```

At the moment the following report templates are available:

| Template name   | Description                                                                    |
|-----------------|--------------------------------------------------------------------------------|
| html_detailed   | Detailed HTML report including file lists, rule list and source code listings. |
| html_singlepage | More compact, single-page HTML report listing all violations.                  |


### Examples (run from the repository root)

Create MyPy report for Ciqar:
```
mypy --config-file mypy.ini src test | tee mypy.log
ciqar -r mypy:mypy.log -s src -s test -o report-mypy
```

Create Pyright report for Ciqar:
```
pyright --outputjson src test > pyright.json
ciqar -r pyright:pyright.json -s src -s test -o report-pyright
```


## Some hints

For MyPy reports, it is necessary to set `hide_error_codes = False` in the config (which is default).

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "ciqar",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "linter,report,code analysis,code quality",
    "author": "Thomas Wesenigk <thw-oss@fomori.de>",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/5d/18/e464d56fafbcbdefce11dcb046dcd3cf5c70a29c92de80da4ec5125d267a/ciqar-0.2.0.tar.gz",
    "platform": null,
    "description": "# Ciqar\n\nCiqar is a tool for creating useful and (at least somewhat) pretty HTML reports from different code\nquality analyzers output in case the analyzers do not provide sufficient report or you want a uniform\nstyle. The report is generated from a Jinja template so that it can be customized. At the moment, MyPy\nand Pyright are supported as analyzers.\n\nThe name is made up from how we pronounced the earliest project name `cqr` (which is the abbreviation\nfor *code quality reports*) as a word. Do not confuse it with `Cigar` \ud83d\ude09\n\nHave a look at two HTML reports for Ciqar version 0.1.0 (some violations were added purposely \ud83d\ude09):\n - MyPy: https://aardjon.codeberg.page/ciqar/reports/mypy/\n - Pyright: https://aardjon.codeberg.page/ciqar/reports/pyright/\n\n[![Build status](https://ci.appveyor.com/api/projects/status/11bkqbw0exo6y76s?svg=true)](https://ci.appveyor.com/project/Aardjon/ciqar)\n\n\n## Installation\n\nCiqar releases are available on PyPI, so you can easily install it via `pip`:\n```\npip install ciqar\n```\n\nAlternatively you can install from source code:\n```\ncd /path/to/ciqar/source\npip install -e .\n```\n\n\n## Usage\n\nTell Ciqar the location of the analyzer output and the paths to search for source files. The search path\nconfiguration is usually the same as for your static code analyzer.\n\n```\nciqar --analyzer-result mypy:/path/to/mypy.log --source /path/to/src/dir --output /path/to/destination/dir\n```\n\nThe \"Analyzer result URL\" (`--analyzer-result`) is a URL string with the *scheme* part defining which code\nanalyzer has been used and the *path* containing the path to result data. The kind of the path object (e.g.\ndirectory or file, file type) depends on the chosen analyzer. Currently supported analyzers:\n\n| Analyzer | URL Scheme | URL path                                              |\n|----------|------------|-------------------------------------------------------|\n| MyPy     | \"mypy\"     | Single file with the stdout output of the MyPy run.   |\n| Pyright  | \"pyright   | Single JSON file generated by `pyright --outputjson`. |\n\n\n`--source` may be provided several times to search more than one directory. In addition (or alternatively)\nit is also possible to exclude files or directories from the configured search paths with the `--exclude`\noption, which may also be provided several times:\n\n```\nciqar --source /path/to/src/dir --exclude /path/to/src/dir/examples --exclude /path/to/src/dir/snippet.py --analyzer-result [...] --output [...]\n```\n\nThe `--output` option simply defines the directory to write the report into. Any existing files will be overwritten.\n\nThe optional `--template` parameter defines the report template to use, allowing to generate different\nkinds of reports. The template name must be specified by its name:\n```\nciqar -r mypy:mypy.log -s src -o output -t html_detailed\n```\n\nAt the moment the following report templates are available:\n\n| Template name   | Description                                                                    |\n|-----------------|--------------------------------------------------------------------------------|\n| html_detailed   | Detailed HTML report including file lists, rule list and source code listings. |\n| html_singlepage | More compact, single-page HTML report listing all violations.                  |\n\n\n### Examples (run from the repository root)\n\nCreate MyPy report for Ciqar:\n```\nmypy --config-file mypy.ini src test | tee mypy.log\nciqar -r mypy:mypy.log -s src -s test -o report-mypy\n```\n\nCreate Pyright report for Ciqar:\n```\npyright --outputjson src test > pyright.json\nciqar -r pyright:pyright.json -s src -s test -o report-pyright\n```\n\n\n## Some hints\n\nFor MyPy reports, it is necessary to set `hide_error_codes = False` in the config (which is default).\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Ciqar is a tool for creating reports from different code quality analyzers output.",
    "version": "0.2.0",
    "project_urls": {
        "Home": "https://codeberg.org/Aardjon/ciqar/",
        "Source": "https://codeberg.org/Aardjon/ciqar.git"
    },
    "split_keywords": [
        "linter",
        "report",
        "code analysis",
        "code quality"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "7a4cb94824b04d250504f8e1caceab102e32d9bf1da2af639a9c96292a4be803",
                "md5": "2ad40bbe6e4e55d5d1a285e7eb68aaf4",
                "sha256": "03c0a762c178abaa62f569ea1c9cdc704150febd3e3fbd90dc0ab1ae23e9ac6e"
            },
            "downloads": -1,
            "filename": "ciqar-0.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2ad40bbe6e4e55d5d1a285e7eb68aaf4",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 43839,
            "upload_time": "2023-06-03T16:46:50",
            "upload_time_iso_8601": "2023-06-03T16:46:50.273419Z",
            "url": "https://files.pythonhosted.org/packages/7a/4c/b94824b04d250504f8e1caceab102e32d9bf1da2af639a9c96292a4be803/ciqar-0.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "5d18e464d56fafbcbdefce11dcb046dcd3cf5c70a29c92de80da4ec5125d267a",
                "md5": "f184979006062b1d809aae50e2532a54",
                "sha256": "8cfd248739997e1241c973767b55bee2515948c6a2cde72a7d1ddc9b0a271a87"
            },
            "downloads": -1,
            "filename": "ciqar-0.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "f184979006062b1d809aae50e2532a54",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 55844,
            "upload_time": "2023-06-03T16:46:56",
            "upload_time_iso_8601": "2023-06-03T16:46:56.068651Z",
            "url": "https://files.pythonhosted.org/packages/5d/18/e464d56fafbcbdefce11dcb046dcd3cf5c70a29c92de80da4ec5125d267a/ciqar-0.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-06-03 16:46:56",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": true,
    "codeberg_user": "Aardjon",
    "codeberg_project": "ciqar",
    "lcname": "ciqar"
}
        
Elapsed time: 0.09706s