TDAmeritrade / stumpy

STUMPY is a powerful and scalable Python library for modern time series analysis
https://stumpy.readthedocs.io/en/latest/
Other
3.66k stars 318 forks source link

Refactor core.py #1038

Open seanlaw opened 6 days ago

seanlaw commented 6 days ago

The core.py file was meant to act as a central utility module where multiple other modules could find common functions. Over time, it has become bloated and it makes sense to move some of the related functions into its own module. For example, it might make sense to have:

  1. gpu_core.py for all GPU-related utilities
  2. process.py/preprocess.py
  3. check.py for functions that "check" the state of an array
  4. rolling.py for anything related to rolling/sliding window computations
  5. distance.py
  6. mcore.py for all multi-dimensional utility functions

It is okay if core.py imports from these other modules and this would reduce the number of changes in our API modules (i.e., our user facing API modules wouldn't change at all as long as they continue importing from core.py). Of course, any refactoring will also involve moving their associated unit tests as well

seanlaw commented 6 days ago

The first thing would be to come up with a plan, then create separate issues for each new sub-module, and add each issue to a single milestone