SoftwareUnderstanding / inspect4py

Static code analysis package for Python repositories
https://inspect4py.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
28 stars 10 forks source link

Convert call list to be in pycg format #360

Closed lazyhope closed 2 years ago

lazyhope commented 2 years ago

In this pull request a script pycg_convert.py is created inside inspect4py_pycg, this script takes an input path, generates call list using utils.py/call_list_file or utils.py/call_list_dir and converts it into pycg format. I have also added a TODO comment indicating a potential join path issue in cli.py.

Please feel free to edit as you see fit.

dgarijo commented 2 years ago

@zl81, thanks. I have reviewed this PR. However, I don't think this is nicely integrated into the inspect4py framework. If you want to have a converter, that's fine, but it should be integrated with a command, in this case as an auxiliary file. For example something like : inspect4py -cl --format pycg

@rosafilgueira what do you think?

lazyhope commented 2 years ago

@zl81, thanks. I have reviewed this PR. However, I don't think this is nicely integrated into the inspect4py framework. If you want to have a converter, that's fine, but it should be integrated with a command, in this case as an auxiliary file. For example something like : inspect4py -cl --format pycg

@rosafilgueira what do you think?

Thanks for your feedback, my current thought is that converting to pycg format is just a side product for inspect4py to compare its performance with pycg. As it is not a core functionality of inspect4py, instead of integrating it, I added it as a script.

dgarijo commented 2 years ago

Ok, then I misinterpreted the functionality. It's ok having a separate script. Please do open an issue with the pending to do :)

rosafilgueira commented 2 years ago

Hi @dgarijo, yes. This functionality is outside inspect4py. Basically it takes the call_list generated by inspect4py and "transformed" it into the call_list format used by pycg. This will enable us to compare both call_lists or call_graphs by both tools in the future.