Skip to content

Conversation

@dcherian
Copy link
Collaborator

No description provided.

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]>
@dcherian dcherian force-pushed the refactor-replayed branch 3 times, most recently from e860339 to 287f4ee Compare November 22, 2025 06:07
dcherian and others added 3 commits November 21, 2025 23:15
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]>
dcherian and others added 6 commits November 22, 2025 09:49
…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]>
- 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]>
dcherian and others added 7 commits November 23, 2025 21:54
- 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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants