Pywebuml setup

Pywebuml is a proyect that I have been working to parse the code and create UML graphs based in the information. It is still in development and the code can be found at bitbucket.org. There are some bugs, but it should work with C# code. I am working to make it able to parse Java files.

These are the steps to configure and get pywebuml running:

Install python

If you are using Linux, then python is already installed. You could check this by running:

bash$ python

The program was tested in Ubuntu 10.10. If you are in windows, then the python installer for version 2.7 must be downloaded from here. Once that python is installed it should be added to the PATH system variable. For doing this go to:

The path variable should be like this:

C:\Python27;C:\Python27\Scripts...

Add also the Scripts folder inside the python.

Install setuptools

If you are using Linux, setuptools should be packaged for the distribution that you are using. In Ubuntu, the name of the package is:

bash$ sudo apt-get install python-setuptools

In Windows, the installer must be downloaded from pypi.

In both OS, once that setuptools is installed a new command easy_install must be available.

Install virtualenv

You can skip this step but I recomend that you do it. First install virtualenv:

bash$ sudo easy_install virtualenv

The same command works on windows without the sudo option. Now create a virtualenv and activate it:

bash$ virtualenv --no-site-packages SOME_NAME_HERE
bash$ source SOME_NAME_HERE/bin/activate

where SOME_NAME_HERE must be different of pywebuml. On windows the second command will be:

cmd$ SOME_NAME_HERE\Scripts\activate.bat

Install graphviz

Graphviz should be installed. For Ubuntu:

bash$ sudo apt-get install graphviz

For windows the graphviz installer should be downloaded and added to the PATH system variable. The PATH must be something like:

C:\Python27;C:\Python27\Scripts;C:\Program Files\Graphviz2.26.3\bin

Install pywebuml

To install pywebuml use the easy_install command:

bash$ easy_install pywebuml

If you aren't using virtualenv then that command should be runned as root.

Run pywebuml parser

Go to the folder where the code is and run pywebuml initialize. For example:

C:\Users\tzulberti> dir
C# Files
C:\Users\tzulberti> cd "C# Files"
C:\Users\tzulberti\C# Files>dor
file1.cs file2.cs folder1 folder2
C:\Users\tzulberti\C# Files> pywebuml initialize

This will parse the clases and when it finish it will print something like the following line:

Found XXX files, where XXX were ignored and XX could not be parsed

Run pywebuml server

At any path, run the command::
bash$ pywebuml web C:Userstzulberti>pywebuml web

This will start a web server that can be accessed at http://localhost:5000. If you are using it from you network then replace localhost for the computer ip.

Important: pywebuml cant run as a service. This means that once the console is closed, pywebuml will be closed. This will be solved in the next release. If the console window is closed, and you are using virtualenv, then it should be activated before running pywebuml.