Skip to content

Dynamic versioning for postrelease versions #465

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

evagroenendijk
Copy link
Contributor

@evagroenendijk evagroenendijk commented May 20, 2025

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 !

@felixhekhorn felixhekhorn added the bug Something isn't working label May 20, 2025
@felixhekhorn felixhekhorn linked an issue May 20, 2025 that may be closed by this pull request
Copy link
Contributor

@felixhekhorn felixhekhorn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@evagroenendijk
Copy link
Contributor Author

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

@evagroenendijk evagroenendijk changed the title Solve issue #464 Dynamic versioning for postrelease versions May 20, 2025
Co-authored-by: Felix Hekhorn <[email protected]>
@felixhekhorn
Copy link
Contributor

felixhekhorn commented May 22, 2025

I think the remaining problem is that poetry-dynamic-versioning is not working correctly.
From here you see it wants to do the right thing, but this is then not correctly written to the source code. Please check how to tell it where to write the information to (=src/eko/version.py). Now that I have written that sentence and have been thinking about it: what about the other modules, meaning ekobox + ekomark? they should have the same version and we need to tell them

PS: from here you see still the hardcoded version is present (instead of the dynamic one)

@evagroenendijk
Copy link
Contributor Author

evagroenendijk commented May 29, 2025

I think the remaining problem is that poetry-dynamic-versioning is not working correctly. From here you see it wants to do the right thing, but this is then not correctly written to the source code. Please check how to tell it where to write the information to (=src/eko/version.py). Now that I have written that sentence and have been thinking about it: what about the other modules, meaning ekobox + ekomark? they should have the same version and we need to tell them

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Version format key is not correct
2 participants