-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
ENH: Adding pd.__git_version__ to point to git sha commit (#21295) #21680
Changes from all commits
bad820e
94e9e41
8a4563c
162985b
4808f52
249d843
0406aa7
756084a
a78165d
9421725
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -83,6 +83,7 @@ | |
from ._version import get_versions | ||
v = get_versions() | ||
__version__ = v.get('closest-tag', v['version']) | ||
__git_version__ = v.get('full-revisionid') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is this what dask does? this will be None in the built version I think There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there a way I can create a built version locally and test it out? @jreback There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. python setup.py bdist_wheel, and then install that wheel in a new env. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Created wheel from above command (https://www.dropbox.com/s/3ieyl07ctcsja9u/pandas-0.24.0.dev0%2B373.g942172546-cp36-cp36m-macosx_10_7_x86_64.whl?dl=0) and it showed git_version correctly
|
||
del get_versions, v | ||
|
||
# module level doc-string | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
import pytest | ||
import os | ||
import collections | ||
import string | ||
from functools import partial | ||
|
||
import numpy as np | ||
|
@@ -12,6 +13,7 @@ | |
from pandas.core import ops | ||
from pandas.io.common import _get_handle | ||
import pandas.util.testing as tm | ||
import pandas as pd | ||
|
||
|
||
def test_get_callable_name(): | ||
|
@@ -165,3 +167,10 @@ def test_compression_warning(compression_only): | |
check_stacklevel=False): | ||
with f: | ||
df.to_csv(f, compression=compression_only) | ||
|
||
|
||
def test_git_version(): | ||
# GH 21295 | ||
git_version = pd.__git_version__ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This will fail when built (which we test on pandas-ci), as the git_version will be None. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. does this actually run when pandas is installed after tagging? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks like it will, I ran: |
||
assert len(git_version) == 40 | ||
assert all(c in string.hexdigits for c in git_version) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add the issue ref here