vedro-advanced-tags


Namevedro-advanced-tags JSON
Version 0.2.1 PyPI version JSON
download
home_pagehttps://github.com/vedro-universe/vedro-advanced-tags
SummaryVedro tags with boolean logic
upload_time2024-10-18 17:57:10
maintainerNone
docs_urlNone
authorNikita Tsvetkov
requires_python>=3.8
licenseApache-2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Vedro Advanced Tags

[![Codecov](https://img.shields.io/codecov/c/github/vedro-universe/vedro-advanced-tags/master.svg?style=flat-square)](https://codecov.io/gh/vedro-universe/vedro-advanced-tags)
[![PyPI](https://img.shields.io/pypi/v/vedro-advanced-tags.svg?style=flat-square)](https://pypi.python.org/pypi/vedro-advanced-tags/)
[![PyPI - Downloads](https://img.shields.io/pypi/dm/vedro-advanced-tags?style=flat-square)](https://pypi.python.org/pypi/vedro-advanced-tags/)
[![Python Version](https://img.shields.io/pypi/pyversions/vedro-advanced-tags.svg?style=flat-square)](https://pypi.python.org/pypi/vedro-advanced-tags/)

(!) Starting from [Vedro v1.10](https://vedro.io/blog/whats-new-vedro-v1.10), the default Tagger plugin supports boolean logic in tags. Therefore, you don't need to install `vedro-advanced-tags` if you're using Vedro version 1.10 or later. You can use the boolean logic in tags in the same way as in `vedro-advanced-tags`.

## Installation

<details open>
<summary>Quick</summary>
<p>

For a quick installation, you can use a plugin manager as follows:

```shell
$ vedro plugin install vedro-advanced-tags
$ vedro plugin disable vedro.plugins.tagger
```

</p>
</details>

<details>
<summary>Manual</summary>
<p>

To install manually, follow these steps:

1. Install the package using pip:

```shell
$ pip3 install vedro-advanced-tags
```

2. Next, activate the plugin in your `vedro.cfg.py` configuration file:

```python
# ./vedro.cfg.py
import vedro
import vedro.plugins.tagger as tagger
import vedro_advanced_tags as adv_tagger

class Config(vedro.Config):

    class Plugins(vedro.Config.Plugins):

        class Tagger(tagger.Tagger):
            enabled = False  # disable default tagger

        class VedroAdvancedTags(adv_tagger.VedroAdvancedTags):
            enabled = True
```

</p>
</details>

## Usage

First, add tags to your scenarios:

```python
import vedro

class Scenario(vedro.Scenario):
    subject = "register user"
    tags = ["P0", "API"]
```

Then, you can run scenarios with specific tags.

#### AND

To run scenarios that include both specified tags, use the **and** operator:

```shell
$ vedro run --tags "P0 and API"
```

#### OR

To run scenarios that contain either of the specified tags, use the **or** operator:

```shell
$ vedro run --tags "API or CLI"
```

#### NOT

To run scenarios that do not include a specific tag, use the **not** operator:

```shell
$ vedro run --tags "not P0"
```

#### EXPR

To run scenarios that meet multiple conditions, use expressions.

For instance, to execute scenarios that either include the `API` or `CLI` tag, and do not include the `P0` tag, you can use:

```shell
$ vedro run --tags "(API or CLI) and (not P0)"
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/vedro-universe/vedro-advanced-tags",
    "name": "vedro-advanced-tags",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": null,
    "author": "Nikita Tsvetkov",
    "author_email": "tsv1@fastmail.com",
    "download_url": "https://files.pythonhosted.org/packages/33/04/f85d10ad15cda23548a811f8caa75fc4dcc3aee1ebf9974681553aec4b38/vedro_advanced_tags-0.2.1.tar.gz",
    "platform": null,
    "description": "# Vedro Advanced Tags\n\n[![Codecov](https://img.shields.io/codecov/c/github/vedro-universe/vedro-advanced-tags/master.svg?style=flat-square)](https://codecov.io/gh/vedro-universe/vedro-advanced-tags)\n[![PyPI](https://img.shields.io/pypi/v/vedro-advanced-tags.svg?style=flat-square)](https://pypi.python.org/pypi/vedro-advanced-tags/)\n[![PyPI - Downloads](https://img.shields.io/pypi/dm/vedro-advanced-tags?style=flat-square)](https://pypi.python.org/pypi/vedro-advanced-tags/)\n[![Python Version](https://img.shields.io/pypi/pyversions/vedro-advanced-tags.svg?style=flat-square)](https://pypi.python.org/pypi/vedro-advanced-tags/)\n\n(!) Starting from [Vedro v1.10](https://vedro.io/blog/whats-new-vedro-v1.10), the default Tagger plugin supports boolean logic in tags. Therefore, you don't need to install `vedro-advanced-tags` if you're using Vedro version 1.10 or later. You can use the boolean logic in tags in the same way as in `vedro-advanced-tags`.\n\n## Installation\n\n<details open>\n<summary>Quick</summary>\n<p>\n\nFor a quick installation, you can use a plugin manager as follows:\n\n```shell\n$ vedro plugin install vedro-advanced-tags\n$ vedro plugin disable vedro.plugins.tagger\n```\n\n</p>\n</details>\n\n<details>\n<summary>Manual</summary>\n<p>\n\nTo install manually, follow these steps:\n\n1. Install the package using pip:\n\n```shell\n$ pip3 install vedro-advanced-tags\n```\n\n2. Next, activate the plugin in your `vedro.cfg.py` configuration file:\n\n```python\n# ./vedro.cfg.py\nimport vedro\nimport vedro.plugins.tagger as tagger\nimport vedro_advanced_tags as adv_tagger\n\nclass Config(vedro.Config):\n\n    class Plugins(vedro.Config.Plugins):\n\n        class Tagger(tagger.Tagger):\n            enabled = False  # disable default tagger\n\n        class VedroAdvancedTags(adv_tagger.VedroAdvancedTags):\n            enabled = True\n```\n\n</p>\n</details>\n\n## Usage\n\nFirst, add tags to your scenarios:\n\n```python\nimport vedro\n\nclass Scenario(vedro.Scenario):\n    subject = \"register user\"\n    tags = [\"P0\", \"API\"]\n```\n\nThen, you can run scenarios with specific tags.\n\n#### AND\n\nTo run scenarios that include both specified tags, use the **and** operator:\n\n```shell\n$ vedro run --tags \"P0 and API\"\n```\n\n#### OR\n\nTo run scenarios that contain either of the specified tags, use the **or** operator:\n\n```shell\n$ vedro run --tags \"API or CLI\"\n```\n\n#### NOT\n\nTo run scenarios that do not include a specific tag, use the **not** operator:\n\n```shell\n$ vedro run --tags \"not P0\"\n```\n\n#### EXPR\n\nTo run scenarios that meet multiple conditions, use expressions.\n\nFor instance, to execute scenarios that either include the `API` or `CLI` tag, and do not include the `P0` tag, you can use:\n\n```shell\n$ vedro run --tags \"(API or CLI) and (not P0)\"\n```\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "Vedro tags with boolean logic",
    "version": "0.2.1",
    "project_urls": {
        "Homepage": "https://github.com/vedro-universe/vedro-advanced-tags"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "62128a4c35e3d892a52b0496f50010b3b7e22d748f099aefb2aa18850f6d9f87",
                "md5": "771b75a962c0b4488901622eb7676624",
                "sha256": "ec461729ee1e1a0e1ed6805720ec0b1f76532c6c4548eec2fca552576b66dbbb"
            },
            "downloads": -1,
            "filename": "vedro_advanced_tags-0.2.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "771b75a962c0b4488901622eb7676624",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 9220,
            "upload_time": "2024-10-18T17:57:09",
            "upload_time_iso_8601": "2024-10-18T17:57:09.207527Z",
            "url": "https://files.pythonhosted.org/packages/62/12/8a4c35e3d892a52b0496f50010b3b7e22d748f099aefb2aa18850f6d9f87/vedro_advanced_tags-0.2.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3304f85d10ad15cda23548a811f8caa75fc4dcc3aee1ebf9974681553aec4b38",
                "md5": "64ff2581698ac4eda2171fa96b67f505",
                "sha256": "021e1c354158bed01171c75bab53a07adad4a445625be2342d53e06e3bdaed27"
            },
            "downloads": -1,
            "filename": "vedro_advanced_tags-0.2.1.tar.gz",
            "has_sig": false,
            "md5_digest": "64ff2581698ac4eda2171fa96b67f505",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 10606,
            "upload_time": "2024-10-18T17:57:10",
            "upload_time_iso_8601": "2024-10-18T17:57:10.637331Z",
            "url": "https://files.pythonhosted.org/packages/33/04/f85d10ad15cda23548a811f8caa75fc4dcc3aee1ebf9974681553aec4b38/vedro_advanced_tags-0.2.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-18 17:57:10",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "vedro-universe",
    "github_project": "vedro-advanced-tags",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "vedro-advanced-tags"
}
        
Elapsed time: 0.32462s