even more import analysis

So I've beaten at my importfun tool even more and now it can produce an html report about the import (lack of) structure of PyPy; for an example start here:
http://starship.python.net/crew/mwh/importfunhtml/pypy.interpreter.argument....
You might not want to look at the directory itself -- there's about 10000 files in it :)
I also think there are some bugs & omissions so I'll try to work on this a little more tomorrow, but I've run out of time tonight. Enjoy!
Cheers, mwh PS: generation took about 5 minutes, so keeping it up to date shouldn't be that hard.

torsdagen den 27 oktober 2005 23.17 skrev Michael Hudson:
So I've beaten at my importfun tool even more and now it can produce an html report about the import (lack of) structure of PyPy; for an example start here:
http://starship.python.net/crew/mwh/importfunhtml/pypy.interpreter.argument .html
You might not want to look at the directory itself -- there's about 10000 files in it :)
I also think there are some bugs & omissions so I'll try to work on this a little more tomorrow, but I've run out of time tonight. Enjoy!
To what extent is your tool usable in any Python project?
Jacob

Jacob Hallén jacob@strakt.com writes:
torsdagen den 27 oktober 2005 23.17 skrev Michael Hudson:
So I've beaten at my importfun tool even more and now it can produce an html report about the import (lack of) structure of PyPy; for an example start here:
http://starship.python.net/crew/mwh/importfunhtml/pypy.interpreter.argument .html
You might not want to look at the directory itself -- there's about 10000 files in it :)
I also think there are some bugs & omissions so I'll try to work on this a little more tomorrow, but I've run out of time tonight. Enjoy!
To what extent is your tool usable in any Python project?
Currently, 'not very' -- in principle, it should work with any python project that doesn't play too sneaky import games. It had occurred to me that I should probably try to clean things up and make the tool more generally useful, yes :)
Cheers, mwh

On Fri, Oct 28, 2005 at 10:01:55AM +0100, Michael Hudson wrote:
Currently, 'not very' -- in principle, it should work with any python project that doesn't play too sneaky import games. It had occurred to me that I should probably try to clean things up and make the tool more generally useful, yes :)
I just added to our tracker the following issue for pylint:
coordinate with mwh to see if his import-analysis tool can be plugged as an extension/feature to pylint.
it's number #10043 and Sylvain will probably get in touch with you next week :)

Nicolas Chauvat nicolas.chauvat@logilab.fr writes:
On Fri, Oct 28, 2005 at 10:01:55AM +0100, Michael Hudson wrote:
Currently, 'not very' -- in principle, it should work with any python project that doesn't play too sneaky import games. It had occurred to me that I should probably try to clean things up and make the tool more generally useful, yes :)
I just added to our tracker the following issue for pylint:
coordinate with mwh to see if his import-analysis tool can be plugged as an extension/feature to pylint.
it's number #10043 and Sylvain will probably get in touch with you next week :)
Nicolas Chauvat nicolas.chauvat@logilab.fr writes:
On Thu, Oct 27, 2005 at 07:39:32PM +0100, Michael Hudson wrote:
If you've been reading pypy-svn you'll know I've written an import analysis tool (pypy/tool/importfun.py). While its implementation is currently completely inscrutable, here's some of its results.
Michael, if you are jumping into code-base analysis of PyPy, I suggest you give a try to pylint and maybe define a config file for pylint that would be in accordance with pypy's coding standard.
Yeah, if I'd realized what I was getting myself into I'd probably have looked at pylint or pyflakes a little earlier :) My focus has been reporting/documenting and maybe, maybe automated refactoring rather than warning though -- in which light, have you used Bicycle Repair Man much?
Cheers, mwh

On Fri, Oct 28, 2005 at 03:12:54PM +0100, Michael Hudson wrote:
reporting/documenting and maybe, maybe automated refactoring rather than warning though -- in which light, have you used Bicycle Repair Man much?
It does work but for simple things only. Pylint has been trying to detect code smells for a couple releases btw :)
Refactoring/optimising at AST level is something I would spend time playing with based on pypy... if only I could find time.
participants (3)
-
Jacob Hallén
-
Michael Hudson
-
Nicolas Chauvat