{"id":19745736,"url":"https://github.com/spoorn/poeblix","last_synced_at":"2025-08-25T00:32:00.186Z","repository":{"id":46333156,"uuid":"497277551","full_name":"spoorn/poeblix","owner":"spoorn","description":"Poetry Plugin that adds various features deemed unfit for the official release, but makes sense to me","archived":false,"fork":false,"pushed_at":"2025-05-13T02:35:21.000Z","size":363,"stargazers_count":32,"open_issues_count":5,"forks_count":10,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-18T17:51:41.598Z","etag":null,"topics":["plugin","poetry","poetry-plugin","poetry-python","python","python3"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/poeblix/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/spoorn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-05-28T09:53:07.000Z","updated_at":"2025-05-13T02:35:25.000Z","dependencies_parsed_at":"2025-05-13T03:26:47.425Z","dependency_job_id":"02bfaf0a-6efd-4f7c-a8ae-2f19bd51609c","html_url":"https://github.com/spoorn/poeblix","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/spoorn/poeblix","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spoorn%2Fpoeblix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spoorn%2Fpoeblix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spoorn%2Fpoeblix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spoorn%2Fpoeblix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spoorn","download_url":"https://codeload.github.com/spoorn/poeblix/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spoorn%2Fpoeblix/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271984371,"owners_count":24853814,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-24T02:00:11.135Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["plugin","poetry","poetry-plugin","poetry-python","python","python3"],"created_at":"2024-11-12T02:11:07.603Z","updated_at":"2025-08-25T00:31:59.770Z","avatar_url":"https://github.com/spoorn.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Notice: this project is no longer actively updated to keep up with Poetry releases. Feel free to fork the repo, or submit PRs which will still be merged\n\n# poeblix\nPoetry Plugin that adds various features that extend the `poetry` command such as building wheel files with locked dependencies, and validations of wheel/docker containers.\n\nSupports poetry versions `1.2+` (Note: if you are not using the latest version of poetry, you will need to check the Releases page to see which version of poeblix supports your version of poetry)\n\n# Overview\nThese contain custom poetry plugins that enable functionality not available in the official distribution of poetry.  These include:\n\n1. Using the Lock file to build a wheel file with pinned dependencies\n2. Support for data_files (like with setup.py) such as jupyter extensions or font files\n3. Validating a wheel file is consistent with dependencies specified in pyproject.toml/poetry.lock\n4. Validating a docker container's `pip freeze` contains dependencies as specified in pyproject.toml/poetry.lock\n\nThese are not supported in Poetry due to debate in the community: https://github.com/python-poetry/poetry/issues/890, https://github.com/python-poetry/poetry/issues/4013, https://github.com/python-poetry/poetry/issues/2778\n\n## Deterministic builds and environments\n\nPoetry guarantees deterministic installations and environments thanks\nto the `poetry.lock` file, which is where it stores the exact versions\nof all the dependencies needed to install a package. However, this doesn't\noccurs when wheel or package artifacts are build using `poetry build`\ncommand.\n\nTo build a package, poetry uses the direct dependencies set in the\n`pyproject.toml` and not all the other dependencies required to install\na package. For example, if `pyproject.toml` defines `pandas = \"1.4.2\"`\nas dependency but `poetry.lock` also says that `pandas` requires of\n`numpy-1.22.4`, poetry will build a package with `pandas` as dependency\nbut not with `numpy`.\n\nAnother problem that exists is that `pyproject.toml` can contain dependencies\nwith ranges of versions while `poetry.lock` has pinned versions. For instance,\nif `pyproject.toml` has as dependency `pandas = \"\u003e=1.3\"` but `poetry.lock`\nsets `pandas-1.4.2`, poetry will build a package with the dependency\n`Requires-Dist: pandas (\u003e=0.1.3,\u003c0.2.0)`. When the package is installed,\nthe resolver will install the newest package of `pandas` which its version\nnumber is greater than or equal to `0.1.3` and lower than `0.2.0`.\n\nSumming this up, the same python package created with `poetry build` and\ninstalled several times won't install the same dependencies, making impossible\nto have deterministic installations.\n\nThis plugin solves these problems building python packages that use the\ndependencies defined in the `poetry.lock`.\n\n\n# How to Use\n\n### Prerequisite\n\nPoetry Plugins are only supported in 1.2.0+ which, at the moment (5/29/22), can only be installed when using the [new poetry installer](https://python-poetry.org/docs/#installation)\n\n```commandline\n# You can update poetry using\npoetry self update\n```\n\n## Installation\n\nYou can add the plugin via poetry's CLI:\n\n```commandline\npoetry self add poeblix\n```\n\n_For \u003c= 1.2_:\n\n```commandline\npoetry plugin add poeblix\n```\n\nOr install directly from source/wheel, then add with the same above command using the absolute path to the built dist\n\nTo update the plugin:\n\n```commandline\n# Update to latest\npoetry self add poeblix@latest\n\n# Update to specific version\npoetry self add poeblix==\u003cversion\u003e\n```\n\nYou should now see the blix* commands if you run `poetry list`\n\n## Usage\n\n1. To build a wheel from your package (pyproject.toml dependencies have precedence over poetry.lock ones, by default)\n\n```commandline\npoetry blixbuild\n\n# Note: Options below are also available as part of the `blixvalidatewheel` and `blixvalidatedocker` commands\n\n# To disable using lock file for building wheel and only use pyproject.toml\npoetry blixbuild --no-lock\n\n# Uses lock dependencies only which are pinned to exact versions, instead of pyproject.toml\npoetry blixbuild --only-lock\n\n# Specify additional dependency groups to include as Requires-Dist in the wheel\npoetry blixbuild --with-groups=dev,integ,etc.\n```\n\n\n2. Validate a wheel file has consistent dependencies and data_files as specified in pyproject.toml/poetry.lock\n\n```commandline\npoetry blixvalidatewheel \u003cpath-to-wheel\u003e\n\n# Disable using lock file for validation\npoetry blixvalidatewheel --no-lock \u003cpath-to-wheel\u003e\n```\n\n_Note: this validates consistency in both directions_\n\n3. Validate a docker container contains dependencies in a `pip freeze` as specified in pyproject.toml/poetry.lock\n\n```commandline\npoetry blixvalidatedocker \u003cdocker-container-ID\u003e\n\n# Disable using lock file for validation\npoetry blixvalidatedocker --no-lock \u003cdocker-container-ID\u003e\n```\n\n_Note: this only validates the docker container contains dependencies in the project, but not the other direction_\n\nHere's an example series of commands to start up a temporary docker container using its tag, validate it, then stop the temporary container\n\n```\n# This will output the newly running container id\ndocker run --entrypoint=bash -it -d \u003cdocker-image-tag\u003e\n\n# Then validate the running docker container, and stop it when done\npoetry blixvalidatedocker \u003ccontainer-id\u003e\ndocker stop \u003ccontainer-id\u003e\n```\n\n4. Adding data_files to pyproject.toml to mimic data_files in setup.py:\n\n```yaml\n...\n\n[tool.blix.data]\ndata_files = [\n    { destination = \"share/data/\", from = [ \"data_files/test.txt\", \"data_files/anotherfile\" ] },\n    { destination = \"share/data/threes\", from = [ \"data_files/athirdfile\" ] }\n]\n\n...\n```\n\ndata_files should be under the `[tool.blix.data]` category and is a list of objects, each containing the `destination` data folder, and a `from` list of files to add to the destination data folder.\n\n_Note: the destination is a relative path that installs data to relative to the [installation prefix](https://docs.python.org/3/distutils/setupscript.html#installing-additional-files)_\n\nExample: https://github.com/spoorn/poeblix/blob/main/test/positive_cases/happy_case_example/pyproject.toml\n\n5. For more help on each command, use the --help argument\n\n```commandline\npoetry blixbuild --help\npoetry blixvalidatewheel --help\npoetry blixvalidatedocker --help\n```\n\n# Development\n\n```bash\n# Make a virtual environment on Python 3.9\n# If using virtualenvwrapper, run `mkvirtualenv -p python3.9 venv`\nvirtualenv -p python3.9 venv\n\n# Or activate existing virtualenv\n# If using virtualenvwrapper, run `workon venv`\nsource venv/bin/activate\n\n# installs the plugin in editable mode for easier testing via `poetry install`\n./devtool bootstrap\n\n# Lint checks\n./devtool lint\n\n# Tests\n./devtool test\n\n# Run all checks and tests\n./devtool all\n```\n\n**plugins.py** : contains our plugin that adds the `poetry blixbuild` command for building our wheel file\n\n**validatewheel.py**: adds a `poetry blixvalidatewheel` command that validates a wheel file contains the Required Dist as specified in pyproject.toml/poetry.lock\n\n**validatedocker.py** : adds a command that validates a docker file contains dependencies as specified in pyproject.toml and poetry.lock.  This does *NOT* validate that they are exactly matching, but rather that all dependencies in pyproject.toml/poetry.lock exist in the docker container on the correct versions.  The docker image may contain more extra dependencies\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspoorn%2Fpoeblix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspoorn%2Fpoeblix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspoorn%2Fpoeblix/lists"}