CsatiZoltan / CristalX

Identification and analysis of polycrystalline microstructures
https://cristalx.readthedocs.io
GNU Lesser General Public License v3.0
6 stars 7 forks source link

Collect deprecated functions #39

Open CsatiZoltan opened 3 years ago

CsatiZoltan commented 3 years ago

Commit dc50d41 introduced a deprecation life-cycle to CristalX. Managing deprecated functionalities, and the fact in which release it was marked as deprecated and in which future release it is planned to be removed, becomes cumbersome as CristalX grows. Therefore, create a function in the grain package (in __init__.py) to fetch these data. I found 3 main possibilities:

  1. Analyze the source code with the inspect built-in Python module "Method 2" in https://stackoverflow.com/a/5910893/4892892
  2. Create an additional decorator to decorate the decorator you want to track "Method 3" in https://stackoverflow.com/a/5910893/4892892. In my case, I would need to decorate the deprecated decorator from the deprecation package.
  3. Analyze the AST Provided by https://stackoverflow.com/a/9580006/4892892, this is also a source parsing method, as the first item.
CsatiZoltan commented 3 years ago

A deprecation table would look like this:

object deprecated in will be removed in
function1 1.1.0 1.3.0
class2.method1 1.2.0 1.3.0