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

[MNT] add tests for ListMethods? #15858

Closed
raybellwaves opened this issue May 24, 2024 · 2 comments
Closed

[MNT] add tests for ListMethods? #15858

raybellwaves opened this issue May 24, 2024 · 2 comments
Labels
feature request New feature or request

Comments

@raybellwaves
Copy link
Contributor

Is your feature request related to a problem? Please describe.

I was working on #15846 and I noticed there is no equivalent pandas method for s.list.sort_values (https://github.com/rapidsai/cudf/blob/branch-24.06/python/cudf/cudf/core/column/lists.py#L622). In the pandas compat box I would like to make a note of how to do this in pandas similar to the note that exists for df.interleave_columns() (https://github.com/rapidsai/cudf/blob/branch-24.06/python/cudf/cudf/core/dataframe.py#L7593)

Describe the solution you'd like

When I added the pandas code for interleave_columns I grabbed it from a test file (https://github.com/rapidsai/cudf/blob/branch-24.06/python/cudf/cudf/tests/test_reshape.py#L316). I was hoping to do the same for list.sort_values but I couldn't find a test for it. Are there tests for the ListMethods? https://github.com/rapidsai/cudf/blob/branch-24.06/python/cudf/cudf/core/column/lists.py#L316 I apologize if I am looking in the wrong place. In pandas there is https://github.com/pandas-dev/pandas/blob/main/pandas/tests/series/accessors/test_list_accessor.py and I see https://github.com/rapidsai/cudf/blob/branch-24.06/python/cudf/cudf/tests/series/test_accessors.py is a place holder.

Describe alternatives you've considered

I see list.sort_values calls sort_lists and that is well tested e.g. https://github.com/rapidsai/cudf/blob/branch-24.06/cpp/tests/lists/sort_lists_tests.cpp. There might be a reason if the tests for ListMethods is missing such as duplication of tests.

Additional context

Apologies again if I am looking in the wrong place in the repo.

@raybellwaves raybellwaves added the feature request New feature or request label May 24, 2024
@mroeschke
Copy link
Contributor

Yeah the Python test organization is generally pretty monolithic right now. There are a few placeholder files that aspirationally these monolithic tests will be split into.

For list accessor tests I see some in python/cudf/cudf/tests/test_list.py and python/cudf/cudf/tests/test_contains.py

@raybellwaves
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants