A poetry plugin to store the current git branch into environment variable when poetry runs any command.
Project description
Poetry Git Branch Plugin
| 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.
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:
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"
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 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
License
poetry-git-branch-plugin is distributed under the terms of the
MIT license.
Check the LICENSE file for further details.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file poetry_git_branch_plugin-0.0.17.tar.gz.
File metadata
- Download URL: poetry_git_branch_plugin-0.0.17.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.11.0 Linux/6.5.0-1025-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2145d7636b5fc91c54484dd7bf15d7a16944856593cfa55a21201037f0e7f892
|
|
| MD5 |
f755dbf509b16d50006f72b6c60d3621
|
|
| BLAKE2b-256 |
18ceacd15cdcff9efd76b083699a9a476a43066c36e6456ea335a5327b34c9bf
|
File details
Details for the file poetry_git_branch_plugin-0.0.17-py3-none-any.whl.
File metadata
- Download URL: poetry_git_branch_plugin-0.0.17-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.11.0 Linux/6.5.0-1025-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0748a745bb9b996b77cbdd3502f2d1ec5cd16e5239340fcc0b704e7f533ca49b
|
|
| MD5 |
59c0e2f74a92749cdfbb42dcc16e3e72
|
|
| BLAKE2b-256 |
e80e6d323968d728160006a5c19fbd0f1b769b325b3fa8f9657cbaf98051165f
|