I believe that PyNSource is a significant tool for python users and for the python community - instant UMLclass diagrams from python source code.
Since I announced version 1.3 I have had 400 hits in 4 days, which is fantastic. I have had several congratulatory comments too.
Admittedly PyNSource is not perfect, but it brings python into the UML world at last. The trouble with similar tools is they are not usable. PyUt is flaky and locks up whilst importing most things (e.g. try reverse engineering PyUt source code using PyUt). PyUt doesn't recognise associations between classes and you cannot scroll its workspace either! PyReverse is difficult to install and use, requiring command line complexity plus you need a java tool Argo to view any output - plus it doesn't recognise associations either (last time I looked). Boa is ok (has a UML view) but again, no associations and no ability to combine multiple modules of classes onto the same diagram.
Update: Enterprise Architect can handle python code, however their parser does not recognise attributes of a class e.g. self.address. This means only methods get parsed into the resulting UML diagram. After repeated emails to Sparx System, they refuse to address this issue claiming the parser is built the way it is and cannot be changed.
PyNSource (pardon the pun - made in Australia where pies with sauce are a national food :) solves all the above problems and even comes as a standalone .exe making it instantly usable.
Whilst almost responding to the 'dream project' thread I decided that this post warranted its own thread. What about a solid UML tool with round trip functionality for the Python Community?
Some attempts at reverse engineering python are
PyReverse http://www.logilab.org/projects/pyreverse/
PyUt http://pyut.sourceforge.net/
PyNSource http://www.atug.com/andypatterns/pynsource.htm
Boa Constructor http://sourceforge.net/projects/boa-constructor/
IDLE's class browser
PythonWin 's class browser
all of which have their problems and limitations.
E.g. PyUt will hang if it cannot __import__ successfully and its GUI
has no zoom nor scroll etc. PyReverse is hard to use, misses a lot of
basic information and then what do you do with the XML files? - who
will read these? I have to edit them manually to import them into
Enterprise Architect
http://www.sparxsystems.com.au
and the last time I tried, you couldn't import into
Poseidon http://www.gentleware.com/products/index.php4
community edition, which is the better descendant of the free Argo.
Some Java-centric UML tools I believe do export python, though this is
usually very simple and usually broken. For example
Object Domain http://www.objectdomain.com/products/od/overview.do
claims to import python code, but the last I looked, this particular
functionality was fragile.
Potential powerful technology that could be used is
Bicycle Repair Man http://bicyclerepair.sourceforge.net/
a refactoring tool for Python which could be combined with some sort
of Java GUI (with zoom and all those niceties) - since the hard bit of
the problem is parsing python reliably and knowing how to change it /
regenerate it nicely. Bicycle Repair Man already treads deeply in
this territory. Also
PyChecker http://pychecker.sf.net/
walks similar territory.
Ideal tools would look and behave something like
ModelMaker (for Delphi) http://www.modelmakertools.com/
TogetherJ http://www.togethersoft.com/products/index.jsp
where you can work in code or in diagrams and the two are seamlessly
kept in synch. Its truly cool, and I wish I could do these sorts of
things in Python.
Does anybody know of any other work being done in this area?
I then added
> Anyway - ideally I was hoping for a robust discussion by senior Python
> people on what they may be using with regards to UML and what their
> feelings are about the situation. UML is very important yet there is
> no GUI driven two-way tool for python programmers. Surely serious,
> larger scale, software development in Python would want to be using
> UML as part of the process?
Read the entire thread.
See http://www.atug.com/andypatterns/pyidea_project.htm Join the mailing list and be notified when there are new releases of PyNSource.A next generation python UML Project
Keep in touch
