CI/CD | |
Package |
Documentation: https://dribia.github.io/poetry-git-branch-plugin
Source Code: https://github.com/dribia/poetry-git-branch-plugin
A simple poetry plugin that sets an environment variable containing the name of the current checked-out branch before executing any poetry command.
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:
poetry self add poetry-git-branch-plugin
If you installed poetry using pip
:
pip install poetry-git-branch-plugin
If you installed poetry using pipx
:
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:
[tool.poetry.requires-plugins]
poetry-git-branch-plugin = ">=0.0.1"
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.
Poetry is the best way to interact with this project, to install it, follow the official Poetry installation guide.
With poetry
installed, one can install the project dependencies with:
poetry install
Then, to run the project unit tests:
make test-unit
To run the linters (ruff
and mypy
):
make lint
To apply all code formatting:
make format
poetry-git-branch-plugin
is distributed under the terms of the
MIT license.
Check the LICENSE file for further details.