shields icon indicating copy to clipboard operation
shields copied to clipboard

add support for poetry for dependency badges like existing Pipenv badges

Open machineonamission opened this issue 4 years ago • 2 comments

Shields already has 2 badges that parse Pipfile.lock to get the dependency/python version for the project. Considering the increasing popularity of poetry (i can personally advocate for its far greater speed and features), I think it'd be cool if shields implemented similar badges for poetry's poetry.lock. It has the same type of data as pipenv but its in a TOML instead of JSON.

Poetry doesn't seem to have much documentation on the lock file itself, but just looking at one and knowing how TOML works I think it shouldn't be hard to figure it out. Here's one of mine for an example

machineonamission avatar Feb 06 '22 05:02 machineonamission

As you note, unlike the poetry extensions to pyproject.toml, which are well documented https://python-poetry.org/docs/pyproject/

The lockfile format is not so well documented. In fact, it has changed over time at least once so any given poetry lockfile out there in the wild might be one of a number of different formats depending on the poetry version used by the project: https://github.com/python-poetry/poetry/blob/31657e7e5c47da758c14645035e59eb7813ac2f8/src/poetry/packages/locker.py#L477-L497

chris48s avatar Feb 08 '22 18:02 chris48s

I think it's safe to just assume latest poetry

machineonamission avatar Feb 18 '22 20:02 machineonamission

Any update on this?

chrisjameschamp avatar Feb 04 '23 08:02 chrisjameschamp

Any update on this?

The absence of posted updates should always be interpreted as meaning that there are no updates. The unresolved challenge noted above still stands

calebcartwright avatar Feb 04 '23 15:02 calebcartwright

I guess I do not fully follow the issue, the pyproject.toml expresses each dependency and version numbers, and is well documented, you most likely would not even need to dig into the lock file itself

chrisjameschamp avatar Feb 05 '23 00:02 chrisjameschamp

Support for toml format would be really cool. As it's widely used for Gradle dependencies also.

I would like to create a custom badge from repo libs.versions.toml file.

art-shen avatar Apr 28 '23 18:04 art-shen