Skip to content

revisit the structure of the package #168

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 1 commit into
base: master
Choose a base branch
from
Open

Conversation

vtavana
Copy link
Collaborator

@vtavana vtavana commented Apr 25, 2025

In this PR, the structure of the package is updated to facilitate future development.
The following changes are made:

  1. A new file named _mkl_fft.py is created, and the exposed functions from the package are placed in this file.
  2. Most of the Pythonic functions from _pydft.pyx are transferred to _fft_util.py.
  3. _numpy_fft.py, _scipy_fft.py, _scipy_fftpack.py and _float_util.py are moved to the interfaces directory.

Note that the functionality of the package is not modified in this PR.

@vtavana vtavana self-assigned this Apr 25, 2025
@vtavana vtavana force-pushed the revisit-structure branch 2 times, most recently from f162a5b to 835563c Compare April 25, 2025 17:00
@vtavana vtavana marked this pull request as ready for review April 25, 2025 17:40
@Copilot Copilot AI review requested due to automatic review settings April 25, 2025 17:40
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR reorganizes the package structure to prepare for future development without modifying the numerical functionality. Key changes include:

  • Creating a new _mkl_fft.py file to expose public FFT functions.
  • Moving functions from _pydft.pyx to _fft_util.py and shifting FFT interface code into the interfaces directory.
  • Reorganizing imports and removing the obsolete _numpy_fft.py file.

Reviewed Changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.

Show a summary per file
File Description
mkl_fft/tests/test_fftnd.py Updated tests to reference the new FFT interface at mkl_fft/interfaces/numpy_fft.py
mkl_fft/interfaces/scipy_fftpack.py Changed the import style to align with the new package structure
mkl_fft/interfaces/numpy_fft.py Moved FFT-related function definitions from _numpy_fft to the interfaces module
mkl_fft/interfaces/_float_utils.py Adjusted docstrings to reflect the new module names
mkl_fft/_numpy_fft.py Removed in favor of the new _mkl_fft.py file
mkl_fft/_mkl_fft.py New module containing the core FFT function implementations
mkl_fft/init.py Updated to expose FFT functions from the new _mkl_fft.py and re-export legacy functions
Comments suppressed due to low confidence (2)

mkl_fft/interfaces/scipy_fftpack.py:27

  • [nitpick] Consider using a relative import (e.g., 'from .. import mkl_fft') instead of an absolute import for consistency within the package structure.
import mkl_fft

mkl_fft/init.py:42

  • [nitpick] Since the majority of FFT functions are now exposed through _mkl_fft, consider consolidating irfftpack and rfftpack within that module for a more consistent public API.
from ._pydfti import irfftpack, rfftpack  # pylint: disable=no-name-in-module

@vtavana vtavana force-pushed the revisit-structure branch from 835563c to 5c0ae88 Compare April 25, 2025 18:40
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