lidatong / dataclasses-json

Easily serialize Data Classes to and from JSON
MIT License
1.34k stars 151 forks source link

[FEATURE] Implement dynamic versioning for releases #446

Closed baldurmen closed 11 months ago

baldurmen commented 11 months ago

Description

Since the move to poetry (thanks for moving to a proper PEP517 build system), it seems the way versions are handled are through this GitHub Actions script:

https://github.com/lidatong/dataclasses-json/blob/v0.5.13/.github/workflows/pythonpackage.yml#L72-L73

This might work fine for people using releases directly from GitHub, but for everyone else (including Debian, where I maintain the dataclasses-json package), this means the version has to be patched at build in hacky way.

I understand the convenience of using git tags to manage versioning, but a "proper" dynamic versioning system would make things much easier for distros packaging this library :) The "classic" example of dynamic versioning based on git tags is setuptools-scm, which has a well-supported flow in Debian.

Possible solution

It seems poetry itself declined to implement dynamic versioning as a core feature in favor of implementing a plugin system.

I haven't done much research, but a quick search online seems to yield a few project that seem maintained:

Neither are currently packaged in Debian, but if you choose one of them (or another project) that is properly maintained, I'll be happy to package it myself and maintain in Debian.

Alternatives

.

Context

No response

s-vitaliy commented 11 months ago

@baldurmen, thank you for this issue, I will take a look if we can adopt one of this plugins.