Skip to content

CLN/TST remove compat.scipy #7296

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

Merged
merged 1 commit into from
Jun 1, 2014
Merged

CLN/TST remove compat.scipy #7296

merged 1 commit into from
Jun 1, 2014

Conversation

clham
Copy link
Contributor

@clham clham commented May 31, 2014

re-branch of #7253 (comment)

-Move percentileofscore to stats.misc; Update percentileRank to reflect the move.
-Change testing references to compat.scipy.rankdata() , to use scipy.stats.rankdata directly
-Delete compat.scipy

@@ -4063,7 +4063,7 @@ def test_nsmallest_nlargest(self):
assert_series_equal(s.nsmallest(), s.iloc[[2, 3, 0, 4]])

def test_rank(self):
from pandas.compat.scipy import rankdata
Copy link
Contributor

Choose a reason for hiding this comment

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

should these last two also be _skip_if_no_scipy() ?

@hayd
Copy link
Contributor

hayd commented May 31, 2014

Does this mean you can no longer use .rank without scipy? (The whole point of that compat file was so that scipy wasn't a dependancy, right?)

@hayd
Copy link
Contributor

hayd commented May 31, 2014

Ah ok, this is just in tests. Cool.

@jreback
Copy link
Contributor

jreback commented May 31, 2014

yeh I think was just to check vs scipy (and maybe it wasn't included in testing suite at that point)

@clham
Copy link
Contributor Author

clham commented May 31, 2014

@hayd, _skip_if_no_scipy should probably be in there. I'll push up the change.

@clham
Copy link
Contributor Author

clham commented May 31, 2014

Sorry guys... I'm having some git-problems...

@hayd
Copy link
Contributor

hayd commented Jun 1, 2014

It looks like you should remove the last commit (the merge one): http://stackoverflow.com/a/6866485/1240268

(I would first check that's the case with git log before you nuke it...)

Then force push back to this PR: git push origin CompatScipy -f.

I think you forgot to import nose, see the allowed failure.

ERROR: pandas.tests.test_tseries.test_rank
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/virtualenv/python2.7.6/lib/python2.7/site-packages/nose-1.3.3-py2.7.egg/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/travis/virtualenv/python2.7.6/lib/python2.7/site-packages/pandas/tests/test_tseries.py", line 344, in test_rank
    _skip_if_no_scipy()
  File "/home/travis/virtualenv/python2.7.6/lib/python2.7/site-packages/pandas/tests/test_tseries.py", line 16, in _skip_if_no_scipy
    raise nose.SkipTest("scipy not installed")
NameError: global name 'nose' is not defined`

@hayd
Copy link
Contributor

hayd commented Jun 1, 2014

Ah, take that back with the "just remove last commit", I see one commit is there twice. I would either:

  • create a new branch (from this one) and squish the commits (git rebase -i HEAD~4).
  • create a new branch (from master) and cherry-pick the commits you want (git cherry-pick commit_sha).

Then push back here: git push origin branch_name: CompatScipy -f.

@clham
Copy link
Contributor Author

clham commented Jun 1, 2014

@hayd Thank you for the bail-out. My local git is pretty well munged at this point... What is the best way to nuke it? I've saved the "correct" copies of all affected files elsewhere so I can just drop them in. Should I just nuke the branches and do a fresh PR, or is there better way?

@hayd
Copy link
Contributor

hayd commented Jun 1, 2014

I wouldn't nuke it just yet... create a new branch off master (assuming this branch was from there) and then drop them in or cherry-pick. You can then force push to this PR (using the code above), no need to nuke locally til it's successfully up here.

That is:

git checkout master
git checkout -b CompatScipy2
# do the stuff (either cherry-pick or drop in the files and commit)
# push your local branch to this PR with
git push origin CompatScipy2:CompatScipy -f

If it's up here ok, then you can go crazy deleting branches.

@clham
Copy link
Contributor Author

clham commented Jun 1, 2014

@hayd Thanks for the bailout!!

hayd added a commit that referenced this pull request Jun 1, 2014
CLN/TST remove compat.scipy
@hayd hayd merged commit 3c3602c into pandas-dev:master Jun 1, 2014
@hayd
Copy link
Contributor

hayd commented Jun 1, 2014

np! This looks great.

@clham clham deleted the CompatScipy branch June 1, 2014 02:52
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.

3 participants