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

DOC: Corrected Out-of-date list of sort algorithms #38503

Merged
merged 2 commits into from
Dec 30, 2020

Conversation

FullBeardDev
Copy link
Contributor

Reference Issues/PRs
Fixes: #38287

Implemented changes:
Changed the docstring of all the methods using np.sort as it now includes one additional stable algorithm

@jreback
Copy link
Contributor

jreback commented Dec 16, 2020

can you also update the tests in pandas/tests/series/methods/test_sort_index.py to use stable (where we use mergesort), just parameterize a test is prob good enough.

@jreback jreback added Docs Testing pandas testing functions or related to the test suite Algos Non-arithmetic algos: value_counts, factorize, sorting, isin, clip, shift, diff and removed Testing pandas testing functions or related to the test suite labels Dec 16, 2020
FullBeardDev pushed a commit to FullBeardDev/pandas that referenced this pull request Dec 16, 2020
Addition to doc Fix PR: pandas-dev#38503

Implemented changes:
Parameterized tests with addition of the newly supported sorting method stable from numpy 1.15.0
FullBeardDev pushed a commit to FullBeardDev/pandas that referenced this pull request Dec 16, 2020
Addition to doc Fix PR: pandas-dev#38503

Implemented changes:
Parameterized tests with addition of the newly supported sorting method stable from numpy 1.15.0
FullBeardDev pushed a commit to FullBeardDev/pandas that referenced this pull request Dec 17, 2020
Addition to doc Fix PR: pandas-dev#38503

Implemented changes:
Parameterized tests with addition of the newly supported sorting method stable from numpy 1.15.0
@FullBeardDev
Copy link
Contributor Author

can you also update the tests in pandas/tests/series/methods/test_sort_index.py to use stable (where we use mergesort), just parameterize a test is prob good enough.

Done :)

@mroeschke
Copy link
Member

LGTM, mind fixing up the merge conflict @DonPablo99?

@jreback jreback added this to the 1.3 milestone Dec 23, 2020
@@ -104,18 +104,13 @@ def test_sort_index_multiindex(self, level):
res = s.sort_index(level=level, sort_remaining=False)
tm.assert_series_equal(s, res)

def test_sort_index_kind(self):
@pytest.mark.parametrize("kind", ["quicksort", "mergesort", "heapsort", "stable"])
Copy link
Contributor

Choose a reason for hiding this comment

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

can you make this a fixture (put in the top of this test file is fine) as well.

Copy link
Contributor

Choose a reason for hiding this comment

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

can you do this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should I just add a fixture or add it and replace the parametrize statements ?

Copy link
Contributor

Choose a reason for hiding this comment

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

add a fixture in this file and use it

@jreback
Copy link
Contributor

jreback commented Dec 29, 2020

can you merge master and update

FullBeardDev pushed a commit to FullBeardDev/pandas that referenced this pull request Dec 29, 2020
Addition to doc Fix PR: pandas-dev#38503

Implemented changes:
Parameterized tests with addition of the newly supported sorting method stable from numpy 1.15.0
Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

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

comment on testing. ping on green.

@@ -104,18 +104,13 @@ def test_sort_index_multiindex(self, level):
res = s.sort_index(level=level, sort_remaining=False)
tm.assert_series_equal(s, res)

def test_sort_index_kind(self):
@pytest.mark.parametrize("kind", ["quicksort", "mergesort", "heapsort", "stable"])
Copy link
Contributor

Choose a reason for hiding this comment

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

can you do this

Reference Issues/PRs
Fixes: pandas-dev#38287

Implemented changes:
Changed the docstring of all the methods using np.sort as it now includes one additional stable algorithm
FullBeardDev pushed a commit to FullBeardDev/pandas that referenced this pull request Dec 30, 2020
Addition to doc Fix PR: pandas-dev#38503

Implemented changes:
Parameterized tests with addition of the newly supported sorting method stable from numpy 1.15.0
FullBeardDev pushed a commit to FullBeardDev/pandas that referenced this pull request Dec 30, 2020
Addition to doc Fix PR: pandas-dev#38503

Implemented changes:
Parameterized tests with addition of the newly supported sorting method stable from numpy 1.15.0
FullBeardDev pushed a commit to FullBeardDev/pandas that referenced this pull request Dec 30, 2020
Addition to doc Fix PR: pandas-dev#38503

Implemented changes:
Parameterized tests with addition of the newly supported sorting method stable from numpy 1.15.0
Addition to doc Fix PR: pandas-dev#38503

Implemented changes:
Parameterized tests with addition of the newly supported sorting method stable from numpy 1.15.0
@jreback jreback merged commit 52112d1 into pandas-dev:master Dec 30, 2020
@jreback
Copy link
Contributor

jreback commented Dec 30, 2020

thanks @DonPablo99

luckyvs1 pushed a commit to luckyvs1/pandas that referenced this pull request Jan 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Algos Non-arithmetic algos: value_counts, factorize, sorting, isin, clip, shift, diff Docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DOC: Out-of-date list of sort algorithms
3 participants