poetry-git-branch-plugin


Namepoetry-git-branch-plugin JSON
Version 0.0.17 PyPI version JSON
download
home_pagehttps://github.com/dribia/poeetry-git-branch-plugin
SummaryA poetry plugin to store the current git branch into environment variable when poetry runs any command.
upload_time2024-11-07 19:00:21
maintainerDribia Code
docs_urlNone
authorDribia Code
requires_python<4.0,>=3.10
licenseMIT
keywords poetry plugin branch environment
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Poetry Git Branch Plugin
==========================

<p align="center">
    <a href="https://dribia.github.io/driconfig">
        <picture style="display: block; margin-left: auto; margin-right: auto; width: 40%;">
            <source
                media="(prefers-color-scheme: dark)"
                srcset="https://dribia.github.io/driconfig/img/logo_dribia_blanc_cropped.png"
            >
            <source
                media="(prefers-color-scheme: light)"
                srcset="https://dribia.github.io/driconfig/img/logo_dribia_blau_cropped.png"
            >
            <img
                alt="driconfig"
                src="https://dribia.github.io/driconfig/img/logo_dribia_blau_cropped.png"
            >
        </picture>
    </a>
</p>

|         |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
|---------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| CI/CD   | [![Tests](https://github.com/dribia/poetry-git-branch-plugin/actions/workflows/test.yml/badge.svg)](https://github.com/dribia/poetry-git-branch-plugin/actions/workflows/test.yml) [![Coverage Status](https://img.shields.io/codecov/c/github/dribia/poetry-git-branch-plugin)](https://codecov.io/gh/dribia/poetry-git-branch-plugin) [![Tests](https://github.com/dribia/poetry-git-branch-plugin/actions/workflows/lint.yml/badge.svg)](https://github.com/dribia/poetry-git-branch-plugin/actions/workflows/lint.yml) [![types - Mypy](https://img.shields.io/badge/types-Mypy-blue.svg)](https://github.com/python/mypy) [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff) |
| Package | [![PyPI](https://img.shields.io/pypi/v/poetry-git-branch-plugin)](https://pypi.org/project/poetry-git-branch-plugin/) ![PyPI - Downloads](https://img.shields.io/pypi/dm/poetry-git-branch-plugin?color=blue&logo=pypi&logoColor=gold) ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/poetry-git-branch-plugin?logo=python&logoColor=gold) [![GitHub](https://img.shields.io/github/license/dribia/poetry-git-branch-plugin?color=blue)](LICENSE)                                                                                                                                                                                                                                                                                                         |
---

**Documentation**: <a href="https://dribia.github.io/poetry-git-branch-plugin" target="_blank">https://dribia.github.io/poetry-git-branch-plugin</a>

**Source Code**: <a href="https://github.com/dribia/poetry-git-branch-plugin" target="_blank">https://github.com/dribia/poetry-git-branch-plugin</a>

---

A simple poetry plugin that sets an environment variable containing the name of the current checked-out branch before executing any poetry command.

## Installation

Depending on how you installed poetry, there are different ways to install this plugin.

The easiest way to install this plugin is to use the `poetry self add` command:
```console
poetry self add poetry-git-branch-plugin
```

If you installed poetry using `pip`:
```console
pip install poetry-git-branch-plugin
```

If you installed poetry using `pipx`:
```console
pipx inject poetry poetry-git-branch-plugin
```

You can also specify that a plugin is required for your project in the
`tool.poetry.requires-plugins` section of the `pyproject.toml` file:
```yaml
[tool.poetry.requires-plugins]
poetry-git-branch-plugin = ">=0.0.1"
```

## Usage
Our main use case is in situations where DBT needs access to the current git branch name to set the name of the target schema.

## Contributing

[Poetry](https://python-poetry.org) is the best way to interact with this project, to install it,
follow the official [Poetry installation guide](https://python-poetry.org/docs/#installation).

With `poetry` installed, one can install the project dependencies with:

```shell
poetry install
```

Then, to run the project unit tests:

```shell
make test-unit
```

To run the linters (`ruff` and `mypy`):

```shell
make lint
```

To apply all code formatting:

```shell
make format
```

## License

`poetry-git-branch-plugin` is distributed under the terms of the
[MIT](https://opensource.org/license/mit) license.
Check the [LICENSE](./LICENSE) file for further details.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/dribia/poeetry-git-branch-plugin",
    "name": "poetry-git-branch-plugin",
    "maintainer": "Dribia Code",
    "docs_url": null,
    "requires_python": "<4.0,>=3.10",
    "maintainer_email": "code@dribia.com",
    "keywords": "poetry, plugin, branch, environment",
    "author": "Dribia Code",
    "author_email": "code@dribia.com",
    "download_url": "https://files.pythonhosted.org/packages/18/ce/acd15cdcff9efd76b083699a9a476a43066c36e6456ea335a5327b34c9bf/poetry_git_branch_plugin-0.0.17.tar.gz",
    "platform": null,
    "description": "Poetry Git Branch Plugin\n==========================\n\n<p align=\"center\">\n    <a href=\"https://dribia.github.io/driconfig\">\n        <picture style=\"display: block; margin-left: auto; margin-right: auto; width: 40%;\">\n            <source\n                media=\"(prefers-color-scheme: dark)\"\n                srcset=\"https://dribia.github.io/driconfig/img/logo_dribia_blanc_cropped.png\"\n            >\n            <source\n                media=\"(prefers-color-scheme: light)\"\n                srcset=\"https://dribia.github.io/driconfig/img/logo_dribia_blau_cropped.png\"\n            >\n            <img\n                alt=\"driconfig\"\n                src=\"https://dribia.github.io/driconfig/img/logo_dribia_blau_cropped.png\"\n            >\n        </picture>\n    </a>\n</p>\n\n|         |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |\n|---------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| CI/CD   | [![Tests](https://github.com/dribia/poetry-git-branch-plugin/actions/workflows/test.yml/badge.svg)](https://github.com/dribia/poetry-git-branch-plugin/actions/workflows/test.yml) [![Coverage Status](https://img.shields.io/codecov/c/github/dribia/poetry-git-branch-plugin)](https://codecov.io/gh/dribia/poetry-git-branch-plugin) [![Tests](https://github.com/dribia/poetry-git-branch-plugin/actions/workflows/lint.yml/badge.svg)](https://github.com/dribia/poetry-git-branch-plugin/actions/workflows/lint.yml) [![types - Mypy](https://img.shields.io/badge/types-Mypy-blue.svg)](https://github.com/python/mypy) [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff) |\n| Package | [![PyPI](https://img.shields.io/pypi/v/poetry-git-branch-plugin)](https://pypi.org/project/poetry-git-branch-plugin/) ![PyPI - Downloads](https://img.shields.io/pypi/dm/poetry-git-branch-plugin?color=blue&logo=pypi&logoColor=gold) ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/poetry-git-branch-plugin?logo=python&logoColor=gold) [![GitHub](https://img.shields.io/github/license/dribia/poetry-git-branch-plugin?color=blue)](LICENSE)                                                                                                                                                                                                                                                                                                         |\n---\n\n**Documentation**: <a href=\"https://dribia.github.io/poetry-git-branch-plugin\" target=\"_blank\">https://dribia.github.io/poetry-git-branch-plugin</a>\n\n**Source Code**: <a href=\"https://github.com/dribia/poetry-git-branch-plugin\" target=\"_blank\">https://github.com/dribia/poetry-git-branch-plugin</a>\n\n---\n\nA simple poetry plugin that sets an environment variable containing the name of the current checked-out branch before executing any poetry command.\n\n## Installation\n\nDepending on how you installed poetry, there are different ways to install this plugin.\n\nThe easiest way to install this plugin is to use the `poetry self add` command:\n```console\npoetry self add poetry-git-branch-plugin\n```\n\nIf you installed poetry using `pip`:\n```console\npip install poetry-git-branch-plugin\n```\n\nIf you installed poetry using `pipx`:\n```console\npipx inject poetry poetry-git-branch-plugin\n```\n\nYou can also specify that a plugin is required for your project in the\n`tool.poetry.requires-plugins` section of the `pyproject.toml` file:\n```yaml\n[tool.poetry.requires-plugins]\npoetry-git-branch-plugin = \">=0.0.1\"\n```\n\n## Usage\nOur main use case is in situations where DBT needs access to the current git branch name to set the name of the target schema.\n\n## Contributing\n\n[Poetry](https://python-poetry.org) is the best way to interact with this project, to install it,\nfollow the official [Poetry installation guide](https://python-poetry.org/docs/#installation).\n\nWith `poetry` installed, one can install the project dependencies with:\n\n```shell\npoetry install\n```\n\nThen, to run the project unit tests:\n\n```shell\nmake test-unit\n```\n\nTo run the linters (`ruff` and `mypy`):\n\n```shell\nmake lint\n```\n\nTo apply all code formatting:\n\n```shell\nmake format\n```\n\n## License\n\n`poetry-git-branch-plugin` is distributed under the terms of the\n[MIT](https://opensource.org/license/mit) license.\nCheck the [LICENSE](./LICENSE) file for further details.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A poetry plugin to store the current git branch into environment variable when poetry runs any command.",
    "version": "0.0.17",
    "project_urls": {
        "Homepage": "https://github.com/dribia/poeetry-git-branch-plugin",
        "Repository": "https://github.com/dribia/poetry-git-branch-plugin"
    },
    "split_keywords": [
        "poetry",
        " plugin",
        " branch",
        " environment"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e80e6d323968d728160006a5c19fbd0f1b769b325b3fa8f9657cbaf98051165f",
                "md5": "59c0e2f74a92749cdfbb42dcc16e3e72",
                "sha256": "0748a745bb9b996b77cbdd3502f2d1ec5cd16e5239340fcc0b704e7f533ca49b"
            },
            "downloads": -1,
            "filename": "poetry_git_branch_plugin-0.0.17-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "59c0e2f74a92749cdfbb42dcc16e3e72",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.10",
            "size": 4716,
            "upload_time": "2024-11-07T19:00:20",
            "upload_time_iso_8601": "2024-11-07T19:00:20.389788Z",
            "url": "https://files.pythonhosted.org/packages/e8/0e/6d323968d728160006a5c19fbd0f1b769b325b3fa8f9657cbaf98051165f/poetry_git_branch_plugin-0.0.17-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "18ceacd15cdcff9efd76b083699a9a476a43066c36e6456ea335a5327b34c9bf",
                "md5": "f755dbf509b16d50006f72b6c60d3621",
                "sha256": "2145d7636b5fc91c54484dd7bf15d7a16944856593cfa55a21201037f0e7f892"
            },
            "downloads": -1,
            "filename": "poetry_git_branch_plugin-0.0.17.tar.gz",
            "has_sig": false,
            "md5_digest": "f755dbf509b16d50006f72b6c60d3621",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.10",
            "size": 4317,
            "upload_time": "2024-11-07T19:00:21",
            "upload_time_iso_8601": "2024-11-07T19:00:21.785975Z",
            "url": "https://files.pythonhosted.org/packages/18/ce/acd15cdcff9efd76b083699a9a476a43066c36e6456ea335a5327b34c9bf/poetry_git_branch_plugin-0.0.17.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-07 19:00:21",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "dribia",
    "github_project": "poeetry-git-branch-plugin",
    "github_not_found": true,
    "lcname": "poetry-git-branch-plugin"
}
        
Elapsed time: 0.41155s