Skip to content

Dev versioning is broken. #4046

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

Closed
ghost opened this issue Jun 26, 2013 · 14 comments · Fixed by #4218
Closed

Dev versioning is broken. #4046

ghost opened this issue Jun 26, 2013 · 14 comments · Fixed by #4218
Labels
Build Library building on various platforms
Milestone

Comments

@ghost
Copy link

ghost commented Jun 26, 2013

currently:

0.12.0.dev-73de5de

PEP386 details 3 version format conventions extent in the python world and this format is invalid in all of them.

In practice it's caused no problems( I know of), probably because the tooling is lenient, but one real drawback is that lexi. sorting of the version string does not properly order the revisions, which some tools rely on. Something which

0.12.0pre234(-73de5de)

would provide, where 234 is the commit count since the last release. We could add a pd.version.commit field to compensate for omitting the commit in the version string.

As always it'll break something for sombody, but being a dev-only thing we're probably entitled.

@jtratner
Copy link
Contributor

Turns out you can do git describe to get something pretty similar. E.g., git describe on current master: v0.12.0rc1-15-g015e926, so you get <last tag name> + <marker for # of commits from tag> + <hash>. That said, I'm confused about how it handles numbering...appears to increase by 2 each time instead of by 1 as you would expect (maybe b/c of merge commit??).

@cpcloud
Copy link
Member

cpcloud commented Jul 10, 2013

i count 22 commits with

git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit

@cpcloud
Copy link
Member

cpcloud commented Jul 10, 2013

merge commits are counted. they are commits after all 😄

@cpcloud
Copy link
Member

cpcloud commented Jul 10, 2013

d5094df Merge pull request #4068 from simomo/read_sql_enhencement
ad3a64f DOC: more cookbook recipies
89b2f83 Merge pull request #4106 from hayd/cartesian_crosstab
11742fb Merge pull request #4154 from davidshinn/improve_excel_docs
015e926 Merge pull request #4184 from cpcloud/fix-network-tests
a511dcb TST: raise when no data are found when trying to dld multiple symbols
b3e5338 Merge pull request #4178 from jreback/hdf_3k
519476e CLN: write the attributes in a HDFStore as strings
4b18372 Merge pull request #4176 from cpcloud/remove-yahoo-test
b50bff9 Merge pull request #4175 from hayd/datetime_dayfirst_warning
1f7e519 TST: remove double call to yahoo finance
178a091 DOC to_datetime warning about dayfirst strictness
b56db29 Merge pull request #4167 from jreback/dt_format
9be629e Merge pull request #4168 from cpcloud/sktimeseries-dl-fix
f73e38d TST: to_datetime format fixes
1e4f8c1 DOC: minor io/whatsnew doc edits
1a6b967 Merge pull request #4166 from jorisvandenbossche/bug-microsecond-parsing
1cea6bb BUG/TST: wrong parsing of microseconds with format arg (#4152)
e5b3dfc BLD: use the wheel url for scikits timeseries
1c6440e DOC: Update docstrings to reflect benefit from resolving #4131
5146329 DOC: Update excel read dependency on ``xlrd``
fefa2bf CLN make cartesian product faster
2d63a71 ENH add drop_na argument to pivot_table
635b895 fixed conflict in sql.py
27cc657 adjusted the indentation of doc of io.sql.read_frame
1fc1ba8  * added doc for parameter 'coerce_float' in io.sql.read_frame
git log --oneline v0.12.0rc1.. | wc -l

gives 26 and

$ git describe
v0.12.0rc1-26-gd5094df

@ghost
Copy link
Author

ghost commented Jul 11, 2013

we're all used to a pre0.13 rather then a post0.12 style, but I'd go for that
git describe style and deal with it.

Unless there are objections from other commiters.
Or our fearless leader. @wesm?

@cpcloud
Copy link
Member

cpcloud commented Jul 11, 2013

personally, i like the git describe style

@wesm
Copy link
Member

wesm commented Jul 11, 2013

👍. no objections from me

@ghost
Copy link
Author

ghost commented Jul 11, 2013

@cpcloud , care to do the honors?
I will if you'd rather pass.

@cpcloud
Copy link
Member

cpcloud commented Jul 11, 2013

would this work?

import subprocess
version = subprocess.check_output(['git describe'], shell=True).rstrip()
short_version_re = re.compile(r'^v(\d+)\.(\d+)\.(\d+)')
short_version = '.'.join(short_version_re.search(version).groups())

@cpcloud
Copy link
Member

cpcloud commented Jul 11, 2013

@y-p if you've already got an idea of how to do it then u can...now that i'm thinking about it seems like u would need to rewrite the version.py on every update so that pandas doesn't depend on git

@cpcloud
Copy link
Member

cpcloud commented Jul 11, 2013

o i c that's what you're doing in setup.py...ne way i'll pass

@ghost
Copy link
Author

ghost commented Jul 11, 2013

since the current version string contains the commit, setup.py must already be calling out
to git, just need to use a different command using the same mechanism. hey presto.

np, I'll do it.

@cpcloud
Copy link
Member

cpcloud commented Jul 11, 2013

@y-p i know i said i'd pass but i've got a pr ready should i put it up?

@cpcloud
Copy link
Member

cpcloud commented Jul 11, 2013

although it sounds like you hvae something different in mind than just git describe's output, which is what i did. eh i think u should take it, that's my final call

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Build Library building on various platforms
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants