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

PR: Enable sorting by values in Variable Explorer #5295

Merged
merged 4 commits into from
Sep 23, 2017

Conversation

Prikers
Copy link
Contributor

@Prikers Prikers commented Sep 20, 2017

Fixes #5294
Fixes #5232

@pep8speaks
Copy link

pep8speaks commented Sep 20, 2017

Hello @Prikers! Thanks for updating the PR.

Line 28:1: E302 expected 2 blank lines, found 1

Comment last updated on September 23, 2017 at 12:51 Hours UTC

@goanpeca
Copy link
Member

Hi @Prikers thanks for working on this :-)

@Prikers
Copy link
Contributor Author

Prikers commented Sep 20, 2017

Maybe I should have done that against 3.x though 😞

@goanpeca
Copy link
Member

goanpeca commented Sep 20, 2017

You can fix it if that is the case (no need to close this PR), no worries, lets check with @ccordoba12 to see what he thinks?

@ccordoba12 ccordoba12 added this to the v3.2.4 milestone Sep 20, 2017
@ccordoba12
Copy link
Member

@Prikers, please read our Contributing guide to see how to move your branch to 3.x:

https://github.com/spyder-ide/spyder/blob/master/CONTRIBUTING.md

@Prikers
Copy link
Contributor Author

Prikers commented Sep 21, 2017

@ccordoba12 ok, will do!
However I cannot figure out why the test is failing, it seems unrelated to this PR

@ccordoba12
Copy link
Member

@Prikers, rebasing against the latest 3.x should fix the error in Circle.

@ccordoba12
Copy link
Member

@Prikers, what would happen now if, as part of a list or a dict, there's a Numpy array or a Dataframe? I mean, in that case sorting should be disabled, right?

@Prikers
Copy link
Contributor Author

Prikers commented Sep 21, 2017

@ccordoba12 nothing happens when trying to sort objects that cannot be ordered. Here are some tests:

import pandas as pd
import numpy as np

df = pd.DataFrame({'A': [1, 2, 3], 'B': [3, 2, 1]})
arr = np.random.random((10, 10))

normal_list = [1, 4, 5, 8, 9, 1, 3, 2]
obj_list = [df, arr, 4, 5, 'A']
serie = df.A

obj_dict = {'df': df, 'arr': arr, 'int': 1, 'str': 'A'}
normal_dict = {'A': 1, 'B': 2, 'C': 4, 'D': 3}
mixt_dict = {'A': '1', 'B': 2, 'C': 4, 'D': 3}

sorting
It is the same behaviour as for size for example. Is that the expected behavior? Or should we actually make the header not clickable at all? (maybe in another PR then)

@ccordoba12
Copy link
Member

Is that the expected behavior?

Yes, it is. I just wanted to know if your changes are not introducing an error in that case.

@goanpeca
Copy link
Member

@Prikers please check gitter :-)

@Prikers Prikers force-pushed the variable_explorer_sort_values branch from e15c654 to e1648dc Compare September 21, 2017 21:23
@Prikers Prikers force-pushed the variable_explorer_sort_values branch from b94f8e3 to 010986b Compare September 23, 2017 11:07
@Prikers
Copy link
Contributor Author

Prikers commented Sep 23, 2017

I am sorry guys, I will need your help once again. I had rebased this branch to 3.x and it worked. But then I pushed two more commits (fix for #5232 and testing) and now it fails. I do not understand why github thinks I am trying to merge with master... (Prikers wants to merge 4 commits into spyder-ide:master). I am obviously missing something...

image

@jitseniesen
Copy link
Member

Maybe the issue is that (perhaps in addition to git rebase), you also need to rebase on the github website. Press the "Edit" button on the top of this page, next to the title of the PR, and then change the base branch and hope that all goes well (if not, it may be easier to start afresh). See https://help.github.com/articles/changing-the-base-branch-of-a-pull-request/

@Prikers Prikers changed the base branch from master to 3.x September 23, 2017 12:24
@Prikers Prikers closed this Sep 23, 2017
@Prikers Prikers reopened this Sep 23, 2017
@Prikers
Copy link
Contributor Author

Prikers commented Sep 23, 2017

Thanks @jitseniesen! I tried to close the PR and open it again but it does not seem to force the rebuild of continuous integration tests.
EDIT: actually it did 😄

Copy link
Member

@ccordoba12 ccordoba12 left a comment

Choose a reason for hiding this comment

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

Looks good to me, thanks @Prikers!

@ccordoba12 ccordoba12 changed the title PR: Enable sorting by values in variable explorer PR: Enable sorting by values in Variable Explorer Sep 23, 2017
@ccordoba12 ccordoba12 merged commit 14ec417 into spyder-ide:3.x Sep 23, 2017
ccordoba12 added a commit that referenced this pull request Sep 23, 2017
@Prikers Prikers deleted the variable_explorer_sort_values branch September 23, 2017 19:06
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.

5 participants