Skip to content

Refactor core.py: Extract specialized functions into focused modules #454

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

dcherian
Copy link
Collaborator

Summary

  • Extract scan operations to scan.py
  • Extract factorization functions to factorize.py
  • Extract reindex functions to reindex.py
  • Extract dask-specific functions to dask.py
  • Extract cubed-specific functions to cubed.py
  • Move shared utilities to utils.py
  • Move numbagg postprocessing to aggregate_numbagg.py

Improves code organization while maintaining backward compatibility.

🤖 Generated with Claude Code

dcherian and others added 3 commits July 16, 2025 16:08
- Create flox/scan.py with groupby_scan and related functions
- Create flox/factorize.py with factorize_ and related functions
- Move scan-related types to types.py under TYPE_CHECKING
- Update imports across codebase (core, tests, benchmarks)
- Maintain backward compatibility through __init__.py exports

This improves code organization by separating scan operations and
factorization logic from the large core.py module while preserving
all existing functionality.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
- Move dask_groupby_agg, dask_groupby_scan, _grouped_combine, and _unify_chunks to flox/dask.py
- Update imports in core.py and scan.py to use new dask module locations
- Keep reindex_intermediates in core.py as requested
- Maintain backward compatibility and library functionality

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
- Relocates _postprocess_numbagg function from core.py to aggregate_numbagg.py
- Updates import in core.py to use the new location
- Groups numbagg-specific functionality together for better organization

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[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.

1 participant