Dynamic versioning for postrelease versions#465
Conversation
felixhekhorn
left a comment
There was a problem hiding this comment.
First, some stupid remarks:
- For our own records it's better to have a more descriptive title of a PR. "Solve issue 464" is not very clear afterwards, since you need to know what 464 was in the first place. GitHub allows to link PR and issues in a native way, so we can make that connection elsewhere (I did it here already) (see also here)
- similar considerations apply to commit messages: let's try to keep them more descriptive and to the point - I know it is not easy. If you haven't done so yet, please read this blogpost 🙃
Second, more serious comments:
- can you please add an explicit unit test against this? Instead of me checking it once, let's automatise. So, it either has to be a definite version XOR 0.0.0-postNUMBER-COMMIT ; i.e. in
tests/eko/io/test_struct.py - can you please update the CHANGELOG? modify the existing entry with the correct format and just append this PR
Thanks a lot for your comments, will do! Then I wanted to ask one other thing, if you have time: in the metadata.py I have now added this extra condition wrt the version, but was wondering if there is a more elegant way to define the eko version that you are using? I remember that defining stuff with strings was not so nice, but I also did not really find a direct command for it |
Co-authored-by: Felix Hekhorn <felixhekhorn@users.noreply.github.com>
Co-authored-by: Felix Hekhorn <felixhekhorn@users.noreply.github.com>
|
I think the remaining problem is that poetry-dynamic-versioning is not working correctly. PS: from here you see still the hardcoded version is present (instead of the dynamic one) |
Sorry for my late reply, I was a bit busy with other things! What I don't completely understand is that when I run the unit tests on my computer (with installed eko version 0.0.0.post57+374c7f9b) everything does go correctly. Also if I make an eko with the lha benchmark, in the metadata it shows the correct version of(0.0.0-post.57+374c7f9b). So I don't really get why here it is not working correctly NB regarding ekobox and ekomark, do you want to also define some version.py file in the src there? |
Let me quickly try to ping @alecandido and ask for his opinion: We have one package (eko), but several modules (eko, ekomark, ekobox) - each of the modules should define it's own version (via |
|
Ok, the situation is slightly more complicated. But in essence you're right @felixhekhorn. Just to get the correct terminology, let me recap Python's conceptual units:
So, the only one that has to be a version is the distribution package Thus, having a single distribution package, the multiple Lines 98 to 107 in 67140bc Notice that the motivation to have multiple packages is just because of a least-worst attempt at dependency management, and a poor-man solution for a monorepo. |
the answer is: yes, please (they don't need there own |
I adjusted the typo you mentioned & adjusted the metadata.py s.t. it can read an eko made by its own version. I tested it and it now creates eko's with the postrelease addition. It would be great if you could check it @felixhekhorn !