GAA-UAM / scikit-fda

Functional Data Analysis Python package
https://fda.readthedocs.io
BSD 3-Clause "New" or "Revised" License
287 stars 51 forks source link

Rename basis to add `Basis` suffix #488

Closed vnmabus closed 1 year ago

vnmabus commented 1 year ago

The problem Currently the basis object class names don't mention that they are basis. For Fourier, maybe that would be clear enough but BSpline could be confused with Scipy's splines, and Tensor is very confusing as a basis name.

Desired solution Basis should include the Basis suffix, to eliminate ambiguities. The old names should be deprecated, and removed in a future version.

Path to the desired solution For each class to rename:

  1. Rename the class with the new name and export it appropriately from the basis module.
  2. Create a subclass of the class with the old name.
    • The docstring should be a copy of the old docstring, with a deprecation notice added to it that references the new name.
    • The __init__ method should emit a deprecation warning and call the super __init__ method.
  3. Check that the tests still pass, but now emit the warning.
  4. Replace each occurrence in code and tests (except the newly created subclass) with the renamed class.
  5. Check that the test pass without that warning.
  6. In the documentation, change the link to the new name, and move the old one to a section called "Deprecated classes" or equivalent.
  7. Check that the documentation is generated appropriately.