ward-coverage


Nameward-coverage JSON
Version 0.3.1 PyPI version JSON
download
home_pagehttps://github.com/petereon/ward_coverage
SummaryA coverage plugin for Ward testing framework
upload_time2023-12-20 11:51:47
maintainer
docs_urlNone
authorPeter Vyboch
requires_python>=3.7.8,<4.0.0
licenseMIT
keywords python
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Ward Coverage

[![CI/CD](https://github.com/petereon/ward_coverage/actions/workflows/python-test.yml/badge.svg?branch=master)](https://github.com/petereon/ward_coverage/actions/workflows/python-test.yml) 
[![MyPy Lint](https://github.com/petereon/ward_coverage/actions/workflows/python-lint.yml/badge.svg?branch=master)](https://github.com/petereon/ward_coverage/actions/workflows/python-lint.yml) 
[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=petereon_ward_coverage&metric=security_rating)](https://sonarcloud.io/summary/new_code?id=petereon_ward_coverage)
![PyPI - Downloads](https://img.shields.io/pypi/dm/ward-coverage)

__Disclaimer: Albeit useful already, this is a work-in-progress and should be seen as such.__ 

A coverage plugin for Python's [Ward testing framework](https://ward.readthedocs.io/en/latest/)

![Example image](https://raw.githubusercontent.com/petereon/ward-coverage/master/resources/screen.png)

## Installation

Build the plugin:

```bash
poetry build
```
and install using

```bash
pip install dist/ward_coverage-0.1.1-py3-none-any.whl
```

## Configuration

To include coverage in your test run, add the following to your `pyproject.toml`:

```toml
[tool.ward]
hook_module = ["ward_coverage"]
```

There are several options to configure the plugin which can be included under section `[tool.ward.plugins.coverage]`, namely:
- `report_type`, defaulting to `["term"]`, which is a list of report types to generate. Possible values are one or more of _'lcov'_, _'html'_, _'xml'_, _'json'_, _'term'_
- `threshold` for minimum coverage, affecting the color the result panel has for some sort of visual cue
- All of the options described [here](https://coverage.readthedocs.io/en/6.4.4/config.html#run-source-pkgs). Please note that everything here under [`[run]` section](https://coverage.readthedocs.io/en/6.4.4/config.html#run) goes to  `[tool.ward.plugins.coverage]` and other sections need their separate block (e.g `[tool.ward.plugins.coverage.report]`) or dictionary entry within the `[tool.ward.plugins.coverage]` section in toml.

### Example configuration
```toml
[tool.ward.plugins.coverage]
omit = ["*test*", "example.py", "**/__init__.py"]
report_type = ["term", "xml"]
source = ["."]
branch = true
relative_files = true
report = {skip_empty = true}
```

__Contributors, issues and feature requests are welcome.__


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/petereon/ward_coverage",
    "name": "ward-coverage",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7.8,<4.0.0",
    "maintainer_email": "",
    "keywords": "python",
    "author": "Peter Vyboch",
    "author_email": "pvyboch1@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/b2/75/cba3e93c0a1bd685f21d3e5acd005e2614da97327e608efb663b3736a75b/ward_coverage-0.3.1.tar.gz",
    "platform": null,
    "description": "# Ward Coverage\n\n[![CI/CD](https://github.com/petereon/ward_coverage/actions/workflows/python-test.yml/badge.svg?branch=master)](https://github.com/petereon/ward_coverage/actions/workflows/python-test.yml) \n[![MyPy Lint](https://github.com/petereon/ward_coverage/actions/workflows/python-lint.yml/badge.svg?branch=master)](https://github.com/petereon/ward_coverage/actions/workflows/python-lint.yml) \n[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=petereon_ward_coverage&metric=security_rating)](https://sonarcloud.io/summary/new_code?id=petereon_ward_coverage)\n![PyPI - Downloads](https://img.shields.io/pypi/dm/ward-coverage)\n\n__Disclaimer: Albeit useful already, this is a work-in-progress and should be seen as such.__ \n\nA coverage plugin for Python's [Ward testing framework](https://ward.readthedocs.io/en/latest/)\n\n![Example image](https://raw.githubusercontent.com/petereon/ward-coverage/master/resources/screen.png)\n\n## Installation\n\nBuild the plugin:\n\n```bash\npoetry build\n```\nand install using\n\n```bash\npip install dist/ward_coverage-0.1.1-py3-none-any.whl\n```\n\n## Configuration\n\nTo include coverage in your test run, add the following to your `pyproject.toml`:\n\n```toml\n[tool.ward]\nhook_module = [\"ward_coverage\"]\n```\n\nThere are several options to configure the plugin which can be included under section `[tool.ward.plugins.coverage]`, namely:\n- `report_type`, defaulting to `[\"term\"]`, which is a list of report types to generate. Possible values are one or more of _'lcov'_, _'html'_, _'xml'_, _'json'_, _'term'_\n- `threshold` for minimum coverage, affecting the color the result panel has for some sort of visual cue\n- All of the options described [here](https://coverage.readthedocs.io/en/6.4.4/config.html#run-source-pkgs). Please note that everything here under [`[run]` section](https://coverage.readthedocs.io/en/6.4.4/config.html#run) goes to  `[tool.ward.plugins.coverage]` and other sections need their separate block (e.g `[tool.ward.plugins.coverage.report]`) or dictionary entry within the `[tool.ward.plugins.coverage]` section in toml.\n\n### Example configuration\n```toml\n[tool.ward.plugins.coverage]\nomit = [\"*test*\", \"example.py\", \"**/__init__.py\"]\nreport_type = [\"term\", \"xml\"]\nsource = [\".\"]\nbranch = true\nrelative_files = true\nreport = {skip_empty = true}\n```\n\n__Contributors, issues and feature requests are welcome.__\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A coverage plugin for Ward testing framework",
    "version": "0.3.1",
    "project_urls": {
        "Homepage": "https://github.com/petereon/ward_coverage",
        "Repository": "https://github.com/petereon/ward_coverage"
    },
    "split_keywords": [
        "python"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8f89834e0b8d27e9db0f1e8302600f78b436ade05a0cc7be1b2a9576c552582b",
                "md5": "39c8930282abcccf70debe1c59aa90cf",
                "sha256": "0fa51610a8c44b1a40b767fc85a04ddf2beb1d7a725f34e1ebcdbac31a731e18"
            },
            "downloads": -1,
            "filename": "ward_coverage-0.3.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "39c8930282abcccf70debe1c59aa90cf",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7.8,<4.0.0",
            "size": 5476,
            "upload_time": "2023-12-20T11:51:46",
            "upload_time_iso_8601": "2023-12-20T11:51:46.751784Z",
            "url": "https://files.pythonhosted.org/packages/8f/89/834e0b8d27e9db0f1e8302600f78b436ade05a0cc7be1b2a9576c552582b/ward_coverage-0.3.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b275cba3e93c0a1bd685f21d3e5acd005e2614da97327e608efb663b3736a75b",
                "md5": "7ba2f7c1b8e6723b3adb6d8bd2ab7123",
                "sha256": "89676ca687eba25d9ece2adcd0eefe18045e1567a9886a9796bf088a01f5cc4d"
            },
            "downloads": -1,
            "filename": "ward_coverage-0.3.1.tar.gz",
            "has_sig": false,
            "md5_digest": "7ba2f7c1b8e6723b3adb6d8bd2ab7123",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7.8,<4.0.0",
            "size": 5326,
            "upload_time": "2023-12-20T11:51:47",
            "upload_time_iso_8601": "2023-12-20T11:51:47.759546Z",
            "url": "https://files.pythonhosted.org/packages/b2/75/cba3e93c0a1bd685f21d3e5acd005e2614da97327e608efb663b3736a75b/ward_coverage-0.3.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-20 11:51:47",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "petereon",
    "github_project": "ward_coverage",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "ward-coverage"
}
        
Elapsed time: 0.21111s