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

MAINT Decrease code diff and fix Cython-lint #4

Open
wants to merge 1 commit into
base: scarliles/defuse-partitioner
Choose a base branch
from

Conversation

adam2392
Copy link

@adam2392 adam2392 commented Jul 6, 2024

Reference Issues/PRs

When possible, I would prefer having a lower code diff on the scikit-learn fork since Github merge conflicts increase with each change. These are simply cosmetic changes that keep the original code where it was unless there is a change that seems necessary.

  • split functions are just kept in splitter.pyx
  • split functions are importable by adding to the splitter.pxd

What does this implement/fix? Explain your changes.

Any other comments?

Signed-off-by: Adam Li <[email protected]>
Copy link

github-actions bot commented Jul 6, 2024

❌ Linting issues

There was an issue running the linter job. Please update with upstream/main (link) and push the changes. If you already have done that, please send an empty commit with git commit --allow-empty and push the changes to trigger the CI.

Generated for commit: b039520. Link to the linter CI: here

Copy link
Collaborator

Choose a reason for hiding this comment

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

I broke out the sort functions into their own module because

  • they're used both by Splitter and by Partitioner
  • Splitter depends on Partitioner
  • as a practice, circular dependencies are best avoided, so that Partitioner should then not depend on Splitter
  • more generally, dependency graphs are best modeled as DAGs

Copy link
Author

Choose a reason for hiding this comment

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

Hmm fair point. Let me try to circle this up with scikit learn devs to try to make the code more maintainable.

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.

2 participants