-
Notifications
You must be signed in to change notification settings - Fork 21
Extensive refactoring #475
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
dcherian
wants to merge
17
commits into
main
Choose a base branch
from
refactor-replayed
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Create new modules that re-export functions from core.py: - flox/factorize.py: factorize_, FactorProps, etc. - flox/reindex.py: reindex_, reindex_numpy, etc. - flox/scan.py: groupby_scan, chunk_scan, etc. This improves code organization and provides a clearer API. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
e860339 to
287f4ee
Compare
Create new modules for dask and cubed specific functionality: - flox/dask.py: re-exports dask functions from core.py - flox/cubed.py: adds cubed_groupby_agg implementation This improves code organization and provides a clearer API for backend-specific functionality. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Move the numbagg postprocessing function to lib.py for better organization. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
…ib.py Move dask-specific functions to flox/dask.py: - dask_groupby_agg, dask_groupby_scan - _grouped_combine, _simple_combine (via import) - _unify_chunks, _normalize_indexes, subset_to_blocks - _extract_unknown_groups, _collapse_blocks_along_axes Move helper functions to flox/lib.py: - identity - _is_arg_reduction, _is_minmax_reduction, _is_first_last_reduction - _is_bool_supported_reduction, _is_sparse_supported_reduction - _is_reindex_sparse_supported_reduction 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
287f4ee to
d580c03
Compare
…ules - Move FactorizeKwargs and FactorProps to types.py - Move factorize functions (offset_labels, _factorize_single, _ravel_factorized, factorize_, _lazy_factorize_wrapper, _factorize_multiple) to factorize.py - Move reindex functions (ReindexArrayType, ReindexStrategy, reindex_numpy, reindex_pydata_sparse_coo, reindex_) to reindex.py - Move scan functions (groupby_scan, chunk_scan, grouped_reduce, _zip, _finalize_scan) to scan.py - Update core.py to import from new modules 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
The public API expects these functions to be importable from flox.core. Added noqa comment to prevent linter from removing the re-exports. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
- aggregate_sparse.py: import factorize functions from factorize.py - aggregations.py: import reindex_ from reindex.py - cubed.py: import ReindexStrategy from reindex.py - dask.py: import ReindexArrayType, ReindexStrategy from reindex.py; scan functions from scan.py - xarray.py: import ReindexStrategy from reindex.py 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
…e.py 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
- Add `from __future__ import annotations` to lib.py for deferred annotation evaluation - Use TypeAlias annotation for all type aliases in core.py and lib.py - Add xarray.* to mypy ignore_missing_imports list in pyproject.toml - Remove unused type: ignore comment in xarray.py 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
…on from lib 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
e56269e to
4734a5d
Compare
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
- Update __init__.py to import directly from scan.py and reindex.py - Update test_core.py to import from factorize.py, reindex.py, and scan.py - Remove scan function re-exports from core.py 🤖 Generated with [Claude Code](https://claude.com/claude-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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.