Skip to content
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

Allow option for developmental releases defined in PEP 440. #9

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

Conversation

tylercrumpton
Copy link

Fixes #8. I'm willing to change the name of the option or make any tweaks as necessary.

@coveralls
Copy link

coveralls commented Jun 30, 2016

Coverage Status

Coverage remained the same at 100.0% when pulling 5aafade on tylercrumpton:master into 72f8f0a on habnabit:master.

@tylercrumpton
Copy link
Author

Any thoughts on pulling this request in?

@habnabit
Copy link
Owner

Really sorry. I'm trying to schedule time so I can get around to all of my currently-neglected projects.

@cgroschupp
Copy link

@habnabit I would also need this feature, can I somehow support?

suffix references a corresponding future release, so vcversioner will
assume that the future release is a single version higher than the
current commit. For example, if the current commit is one revision past
the ``2.0.1`` tag, the computed version will be ``2.0.2dev1``.
Copy link
Collaborator

Choose a reason for hiding this comment

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

This seems presumptive (and presumptively wrong I think).

The following release isn't necessarily a patch release. If one had to guess, I think guessing it'd be a minor release would be a better default, but even better IMHO would be a way to not guess somehow. I don't have any ideas there unfortunately though.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe changing this to instead take lambda current: next_version and having that by default be a callable that returns the next minor version would be a thing.

Copy link
Author

Choose a reason for hiding this comment

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

Making that configurable would be fine to me. The reason it updates the last digit of any tag is so that it sorts properly if you ever tag ANY higher version.

For example let's say you're currently on release v1.3.4, and you do some work and make a commit. With this option enabled, you'll get v1.3.5dev1. If you then decide to tag v1.3.5 or v1.4.0 or v2.0.0, they'll all properly sort after the dev version.

Now, if the option chose to give you 1.4.0dev1 instead, and you decided to tag a v1.3.5 because it really was just a patch fix, the dev version will sort as "newer".

The neat benefit of updating the last number is that it works with alpha, beta, and RC builds too. For example, let's say you are preparing for a big v2.0.0 release and want to put some alpha builds out there. You tag a v2.0.0a1 build, send it out to some people to test, and get some feedback about things to fix. You fix the first bug, commit and build, and the dev option gives you a v2.0.0a2dev1 version. Make another change, commit and build, and you get v2.0.0a2dev2. Now you can tag a new alpha v2.0.0a2 and it'll sort correctly, or go ahead and tag v2.0.0, which will also sort correctly.

Overall, I would be happy with the "postX" functionality except that pip treats those versions as "real" releases compared to alpha, beta, rc, and dev "pre-releases", which you can avoid installing by not using the --pre flag.

Copy link
Author

Choose a reason for hiding this comment

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

All of that said, I'd be more than happy to add the lambda and associated documentation if it would make it more likely to be merged in! 😃

Copy link
Author

Choose a reason for hiding this comment

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

@Julian Any thoughts on this? I can add the lambda current: next_version if that feels required to move forward.

@habnabit
Copy link
Owner

habnabit commented Feb 7, 2017 via email

@tylercrumpton
Copy link
Author

@habnabit @Julian Did either of you get a chance to take a look at this? We've been using this option for a while now and love how it has improved our CI process. 😃

@Julian
Copy link
Collaborator

Julian commented Mar 12, 2017

The idea is +1 from me I think, though I haven't read PEP 440 close enough to be sure, but it's @habnabit's opinion that matters :) (Sorry for the wait :/)

@tylercrumpton
Copy link
Author

Hey, just wanted to give a gentle ping 😄 This is still a feature that we use constantly and would love to see it in the official project!

@tylercrumpton
Copy link
Author

Hey there! Any new thoughts on pulling in something like this?

@coveralls
Copy link

coveralls commented Dec 12, 2017

Coverage Status

Coverage remained the same at 100.0% when pulling a30f32e on tylercrumpton:master into 72f8f0a on habnabit:master.

@coveralls
Copy link

coveralls commented Dec 12, 2017

Coverage Status

Coverage remained the same at 100.0% when pulling 204a28d on tylercrumpton:master into 72f8f0a on habnabit:master.

@tylercrumpton
Copy link
Author

Ack, sorry for the commit/rebuild noise here! I forgot that this PR was based off of tylercrumpton/vcversioner@master, so a change I was playing with got yanked in by accident. Should be reverted out now, and the PR can be squashed if we still want to pull the dev-version changes in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants