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
This project resides in the Python Package Index (PyPI), so it can easily be installed with pip
:
pip install poetry-git-branch-plugin
And then using poetry
:
poetry self add poetry-git-branch-plugin
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
File details
Details for the file poetry_git_branch_plugin-0.0.1.tar.gz
.
File metadata
- Download URL: poetry_git_branch_plugin-0.0.1.tar.gz
- Upload date:
- Size: 4.1 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 | 1fafa02c0186fd2f2455fd97e5001b199bc5cc42d12c15b5c54c1e6e33195797 |
|
MD5 | f7e34d693954329dd084cc9bebecdaad |
|
BLAKE2b-256 | 86a6647b54422410b72e9b47e6148d872ad40b7114d87a2602a8151f9a970e13 |
File details
Details for the file poetry_git_branch_plugin-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: poetry_git_branch_plugin-0.0.1-py3-none-any.whl
- Upload date:
- Size: 4.6 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 | 67c1aa3c7cc7a5b34f7286a935f52ce5046fba2ca30c14d668825c5555f89f9e |
|
MD5 | 7758414e4fad8c8a0dc08b7862b06156 |
|
BLAKE2b-256 | 7a300445df382c0cd8e2d0110c3a7d0dee026598720d200646c7f7d55c8786f3 |