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

REFACTOR-#5425: Unify internal usage of axis parameter and named kwargs #5427

Closed
wants to merge 4 commits into from

Conversation

noloerino
Copy link
Collaborator

@noloerino noloerino commented Dec 13, 2022

Signed-off-by: Jonathan Shi [email protected]

What do these changes do?

This makes the internal usage of the "axis" keyword argument more consistent, and forces callers of most dataframe/partition manager apply and broadcast methods to name keyword arguments in most situation, to avoid possible confusion and subtle bugs from when argument orders are mistakenly swapped.

The new orders are as follows:

Dataframe: apply_*(func, axis, ... [other kwargs])
Partition manager: apply_*(partitions, func, axis, ... [other kwargs])

The rationale for placing func in front of axis is to more closely align with the way non-axis apply methods (like modin_dataframe.map are called.

  • first commit message and PR title follow format outlined here

    NOTE: If you edit the PR title to match this format, you need to add another commit (even if it's empty) or amend your last commit for the CI job that checks the PR title to pick up the new PR title.

  • passes flake8 modin/ asv_bench/benchmarks scripts/doc_checker.py
  • passes black --check modin/ asv_bench/benchmarks scripts/doc_checker.py
  • signed commit with git commit -s
  • Resolves REFACTOR: Unify internal usage of axis parameter and named kwargs #5425
  • tests added and passing
  • module layout described at docs/development/architecture.rst is up-to-date

@noloerino noloerino requested a review from a team as a code owner December 13, 2022 00:46
Signed-off-by: Jonathan Shi <[email protected]>
Signed-off-by: Jonathan Shi <[email protected]>
Signed-off-by: Jonathan Shi <[email protected]>
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.

REFACTOR: Unify internal usage of axis parameter and named kwargs
1 participant