Skip to content

`refactor(core): reorganize operators/utils modules#105

Merged
francof2a merged 1 commit intodevelopfrom
dev-0.5.0-module-reorg
Apr 2, 2026
Merged

`refactor(core): reorganize operators/utils modules#105
francof2a merged 1 commit intodevelopfrom
dev-0.5.0-module-reorg

Conversation

@francof2a
Copy link
Copy Markdown
Owner

Summary

This PR refactors the core module layout to improve maintainability while preserving the public API.

What changed

  • Split monolithic fxpmath/functions.py into fxpmath/operators/ submodules:
    • core.py
    • arithmetic.py
    • reduction.py
    • array.py
  • Kept fxpmath/functions.py as a backward-compatible public facade.
  • Replaced monolithic fxpmath/utils.py with a package-based layout:
    • fxpmath/utils/common.py
    • fxpmath/utils/parse.py
    • fxpmath/utils/repr.py
    • fxpmath/utils/bitwise.py
    • fxpmath/utils/numeric.py
    • Backward-compatible exports are preserved via fxpmath/utils/__init__.py.
  • Extracted Config from objects.py into new fxpmath/config.py.
  • Updated imports so Config remains available from:
    • fxpmath
    • fxpmath.objects
    • fxpmath.config
  • Updated changelog.txt.

Why

  • Reduce module concentration in very large files.
  • Improve internal structure and discoverability.
  • Make future changes easier and safer without breaking existing consumers.

Compatibility

  • Intended to be non-breaking.
  • Public API behavior is preserved via facades/re-exports.

Validation

  • Full test suite passed: 118 passed, 1 warning

…g to config.py`

- split monolithic `fxpmath/functions.py` into `fxpmath/operators/` submodules:
  - `core.py`, `arithmetic.py`, `reduction.py`, `array.py`
- convert `fxpmath/functions.py` into a backward-compatible public facade
- replace monolithic `fxpmath/utils.py` with `fxpmath/utils/` package:
  - `common.py`, `parse.py`, `repr.py`, `bitwise.py`, `numeric.py`
  - keep backward-compatible exports via `utils/__init__.py`
- move `Config` out of `objects.py` into new `fxpmath/config.py`
- update imports so `Config` remains available from `fxpmath`, `fxpmath.objects`, and `fxpmath.config`
- preserve public API behavior while reducing module concentration and improving internal structure

Validation:
- full test suite passed: `118 passed, 1 warning`
@francof2a francof2a self-assigned this Apr 2, 2026
@francof2a francof2a merged commit 6fd1dec into develop Apr 2, 2026
24 checks passed
@francof2a francof2a deleted the dev-0.5.0-module-reorg branch April 2, 2026 19:11
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