[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

Coverage.py reporting and UML tools - what exists already?

J Peyret

2/14/2008 4:16:00 AM

I got coverage.py to work after somewhat of a difficult start...

Hint: if moving your code from Windows to Linux and if running
'coverage.py -r mymodule.py' causes SyntaxError/SyntaxException, the
'flip' utility is your friend to deal with removing those nasty \r\n
newlines that are preventing coverage.py from working.

.... and I can generate annotated files. Great, but it would be really
nice to have an quick overview of untested code.

One Java tool I've used in the past is Cobertura, which can output its
coverage reports in html format.

http://cobertura.sourceforge.n...

I was wondering if there is anything similar to dress up coverage.py
annotation files? Wouldn't seem to be very difficult to html-ize the
files a bit. I can probably take a, feeble, stab at it, but I'd
rather not reinvent any wheels.


Second question:

I'd like a basic UML tool to draw up some interaction diagrams
(Collaboration/Sequence) on some of my hairier pieces of code. I
think of it more as documentation/brainstorming diagrams than anything
else. I.e. something that helps me remember how things work and can
help me spot refactoring opportunities.

Things I don't care about:

- document most of my code - this is for the truly complex 5-10% of
interactions
- generating diagrams from code or code from diagrams
- static class diagrams
- descriptions doing the whole UML hog - type declarations,
stereotypes, etc...

What I do care about:

- sketching basic diagrams manually as quickly as possible

Most of the software I've seen takes great pride in reverse
engineering or generating code, often of the Java variety. In fact,
everything looks dauntingly complex/powerful. Anybody seen the
equivalent of an UML/CRC-card aware blackboard? Something as
trivially dumb/easy as the early Visio/ABC Flowcharter?

I've looked at ArgoUML, BoaConstructor and UMLet in the past and
didn't really like them. What about Dia? Looking at UML from a
Python / post-coding documentation angle, what seems to fit the bill
best?

I am on Linux or Windows, using PyDev on Eclipse.

Cheers
3 Answers

Ricardo Aráoz

2/14/2008 6:48:00 AM

0

J Peyret wrote:
> I got coverage.py to work after somewhat of a difficult start...
>
> Hint: if moving your code from Windows to Linux and if running
> 'coverage.py -r mymodule.py' causes SyntaxError/SyntaxException, the
> 'flip' utility is your friend to deal with removing those nasty \r\n
> newlines that are preventing coverage.py from working.
>
> ... and I can generate annotated files. Great, but it would be really
> nice to have an quick overview of untested code.
>
> One Java tool I've used in the past is Cobertura, which can output its
> coverage reports in html format.
>
> http://cobertura.sourceforge.n...
>
> I was wondering if there is anything similar to dress up coverage.py
> annotation files? Wouldn't seem to be very difficult to html-ize the
> files a bit. I can probably take a, feeble, stab at it, but I'd
> rather not reinvent any wheels.
>
>
> Second question:
>
> I'd like a basic UML tool to draw up some interaction diagrams
> (Collaboration/Sequence) on some of my hairier pieces of code. I
> think of it more as documentation/brainstorming diagrams than anything
> else. I.e. something that helps me remember how things work and can
> help me spot refactoring opportunities.
>
> Things I don't care about:
>
> - document most of my code - this is for the truly complex 5-10% of
> interactions
> - generating diagrams from code or code from diagrams
> - static class diagrams
> - descriptions doing the whole UML hog - type declarations,
> stereotypes, etc...
>
> What I do care about:
>
> - sketching basic diagrams manually as quickly as possible
>
> Most of the software I've seen takes great pride in reverse
> engineering or generating code, often of the Java variety. In fact,
> everything looks dauntingly complex/powerful. Anybody seen the
> equivalent of an UML/CRC-card aware blackboard? Something as
> trivially dumb/easy as the early Visio/ABC Flowcharter?
>
> I've looked at ArgoUML, BoaConstructor and UMLet in the past and
> didn't really like them. What about Dia? Looking at UML from a
> Python / post-coding documentation angle, what seems to fit the bill
> best?
>
> I am on Linux or Windows, using PyDev on Eclipse.
>
> Cheers

Have you tried StarUML? Worth a look (open source).

Juha S.

2/14/2008 7:18:00 AM

0

Ricardo Aráoz wrote:
> J Peyret wrote:
>
>> I got coverage.py to work after somewhat of a difficult start...
>>
>> Hint: if moving your code from Windows to Linux and if running
>> 'coverage.py -r mymodule.py' causes SyntaxError/SyntaxException, the
>> 'flip' utility is your friend to deal with removing those nasty \r\n
>> newlines that are preventing coverage.py from working.
>>
>> ... and I can generate annotated files. Great, but it would be really
>> nice to have an quick overview of untested code.
>>
>> One Java tool I've used in the past is Cobertura, which can output its
>> coverage reports in html format.
>>
>> http://cobertura.sourceforge.n...
>>
>> I was wondering if there is anything similar to dress up coverage.py
>> annotation files? Wouldn't seem to be very difficult to html-ize the
>> files a bit. I can probably take a, feeble, stab at it, but I'd
>> rather not reinvent any wheels.
>>
>>
>> Second question:
>>
>> I'd like a basic UML tool to draw up some interaction diagrams
>> (Collaboration/Sequence) on some of my hairier pieces of code. I
>> think of it more as documentation/brainstorming diagrams than anything
>> else. I.e. something that helps me remember how things work and can
>> help me spot refactoring opportunities.
>>
>> Things I don't care about:
>>
>> - document most of my code - this is for the truly complex 5-10% of
>> interactions
>> - generating diagrams from code or code from diagrams
>> - static class diagrams
>> - descriptions doing the whole UML hog - type declarations,
>> stereotypes, etc...
>>
>> What I do care about:
>>
>> - sketching basic diagrams manually as quickly as possible
>>
>> Most of the software I've seen takes great pride in reverse
>> engineering or generating code, often of the Java variety. In fact,
>> everything looks dauntingly complex/powerful. Anybody seen the
>> equivalent of an UML/CRC-card aware blackboard? Something as
>> trivially dumb/easy as the early Visio/ABC Flowcharter?
>>
>> I've looked at ArgoUML, BoaConstructor and UMLet in the past and
>> didn't really like them. What about Dia? Looking at UML from a
>> Python / post-coding documentation angle, what seems to fit the bill
>> best?
>>
>> I am on Linux or Windows, using PyDev on Eclipse.
>>
>> Cheers
>>
>
> Have you tried StarUML? Worth a look (open source).
>
>

I've tried quite a many UML tools (mostly the free ones), and I like Dia
and UMLet the best for their simplicity. ArgoUML and its kin seemed
rather heavy and difficult to learn, while Dia and UMLet basically just
let you draw what you want without you having to browse through endless
help documents.

Of the two, I currently prefer Dia which I think has slightly better
usability. It draws many different diagrams, too, not just UML. Dia also
runs on Windows and Linux, and its quick to use. It's not as basic as
UMLet in that it has clean dialogs for entering class members etc. while
not being as obscure as the heavier UML tools.

Bruno Desthuilliers

2/14/2008 1:32:00 PM

0

J Peyret a écrit :
(snip first question)
>
> Second question:
>
> I'd like a basic UML tool to draw up some interaction diagrams
> (Collaboration/Sequence) on some of my hairier pieces of code. I
> think of it more as documentation/brainstorming diagrams than anything
> else. I.e. something that helps me remember how things work and can
> help me spot refactoring opportunities.
>
> Things I don't care about:
(snip - most 'advanced' (hum) uml case tools features)
>
> What I do care about:
>
> - sketching basic diagrams manually as quickly as possible
>

Since you mention it: the only tool I use for any design diagram
(whether UML, E/R or whatever) is Dia. Not that it's perfect, but it has
the right level of usability for me (YMMV of course).