Skip to main content

A poetry plugin to store the current git branch into environment variable when poetry runs any command.

Project description

Poetry Git Branch Plugin

driconfig

CI/CD Tests Coverage Status Tests types - Mypy Ruff
Package PyPI PyPI - Downloads PyPI - Python Version GitHub

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

poetry_git_branch_plugin-0.0.1.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

poetry_git_branch_plugin-0.0.1-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

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

Hashes for poetry_git_branch_plugin-0.0.1.tar.gz
Algorithm Hash digest
SHA256 1fafa02c0186fd2f2455fd97e5001b199bc5cc42d12c15b5c54c1e6e33195797
MD5 f7e34d693954329dd084cc9bebecdaad
BLAKE2b-256 86a6647b54422410b72e9b47e6148d872ad40b7114d87a2602a8151f9a970e13

See more details on using hashes here.

File details

Details for the file poetry_git_branch_plugin-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for poetry_git_branch_plugin-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 67c1aa3c7cc7a5b34f7286a935f52ce5046fba2ca30c14d668825c5555f89f9e
MD5 7758414e4fad8c8a0dc08b7862b06156
BLAKE2b-256 7a300445df382c0cd8e2d0110c3a7d0dee026598720d200646c7f7d55c8786f3

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page