Re: [Twisted-Python] Coverage summary with trial

2012-04-14 Thread Johan Rydberg
coverage.py is great

but we also use this: https://github.com/jrydberg/txcovreport

Sent from my iPhone

On 14 apr 2012, at 06:22, Duncan McGreggor duncan.mcgreg...@gmail.com wrote:

 On Fri, Apr 13, 2012 at 3:19 PM, Itamar Turner-Trauring
 ita...@itamarst.org wrote:
 Hi all,
 
 I would like to collect coverage statistic for my twisted code with trial
 and
 was wondering how to achieve this.
 
 I run something like:
   $ trial --coverage testdir/*_test.py
 
 coverage.py is  a much nicer tool: http://nedbatchelder.com/code/coverage/
 
 You'd do coverage.py [some arguments here] /path/to/trial mypackage,
 more or less.
 
 For example:
 
 $ sudo pip-2.7 install coverage
 $ cd ~/lab/txaws/trunk
 $ coverage run `which trial` ./txaws
 $ coverage report
 
 d
 
 ___
 Twisted-Python mailing list
 Twisted-Python@twistedmatrix.com
 http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] Which mocker tool for trial ?

2012-02-21 Thread Johan Rydberg
We're using python-mockito and it works pretty good.  I've also hacked it a bit
so that it works with zope interfaces.  See this post, which also contains a 
link
to the bitbucket project:

http://jrydberg.me/post/10519590583/strict-mocking-with-zope-interfaces

On Feb 20, 2012, at 6:04 PM, Nicolas AGIUS wrote:

 Which tool are you using for mocking ?

___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] Client/Server to stream text logfiles?

2011-09-28 Thread Johan Rydberg
On 9/28/11 1:19 AM, Glyph Lefkowitz wrote:
 Hi Victor,

 This /should/ be pretty easy to accomplish; this kind of thing is 
 generally very straightforward using Twisted.  Obviously you'd have to 
 implement a protocol for talking to Gamin, but I think the protocol 
 involved is well-documented and very straightforward.
I would say that streaming logs in a _reliable_ fashion is a non-trivial 
problem.

If you want to make sure that you do not miss any log lines, you cannot 
simply just
push them over the connection.  You will never know what messages was 
received on the
other side after a loss of the connection.

That's why people have developed things like 
http://www.librelp.com/relp.html and
Scribe.

I guess it all depends on your requirements.

I would also like to point out that Twisted would be a perfect match for 
writing
such a thing.

-- 
Johan Rydberg
Product Designer

Edgeware AB
Mäster Samuelsgatan 56
SE-111 21 Stockholm, Sweden


___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] SURVEY: Have you submitted a patch to Twisted and it never got in?

2011-07-06 Thread Johan Rydberg
On 7/5/11 10:36 PM, Glyph Lefkowitz wrote:

 Can you point to a specific ticket where you think this was the case?  I have 
 this same general feeling, but pretty much all of the reviews I found when I 
 went looking for specific examples included at least some significant 
 coding-standard, documentation, and test coverage problems.  If we can find 
 more specific examples, perhaps we can prevent this from recurring.
I was mostly thinking about the persistent connection functionality for
twisted.web.client.Agent.

Maybe Twisted would benefit more from having that functionality in place,
than having the super-perfect API between Agent and HTTP parser.

 I do agree that we don't want to block every ticket on the absolute best 
 possible implementation; but, allowing changes that don't have test and 
 documentation coverage is a recipe for creating an unmaintainable mess.
I agree.

-- 
Johan Rydberg
Product Designer

Edgeware AB
Mäster Samuelsgatan 56
SE-111 21 Stockholm, Sweden


___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] SURVEY: Have you submitted a patch to Twisted and it never got in?

2011-07-04 Thread Johan Rydberg
On 7/1/11 6:08 PM, Itamar Turner-Trauring wrote:
 In order to have at least some anecdotal evidence --
I've had some patched rejected, probably on sound basis.  But the
experience always leave you with a feeling that you got stabbed.

Sometimes it _is_ be better to get some basic functionality in
place, instead of arguing about how things should be done the
right way.

 From time to time you find a ticket that you want fixed, and start
working on it, but end up never submitting it since you already
know that even if it fixes the problem it will be shot down, since
it doesn't do it this or that way.


-- 
Johan Rydberg
Product Designer

Edgeware AB
Mäster Samuelsgatan 56
SE-111 21 Stockholm, Sweden


___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] Moving Twisted off Trac and SVN to somewhere nicer

2011-07-01 Thread Johan Rydberg
+1 for github.  The user experience of bitbucket and LP is
secondary compared to github.


___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] Asynchronous context in Twisted

2011-04-07 Thread Johan Rydberg
Something like this would be awesome to have in Twisted.


___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] Twisted Plugins - Implementation Discussion

2011-04-07 Thread Johan Rydberg
On 4/7/11 8:24 AM, David wrote:
 Having had experience with JSON for configuration: it is a terrible
 format for configuration, if only because it does not support comments.

 The syntax is also a bit too strict: enough to be annoying in something
 you want to edit all the time and easily in my experience.

I agree.  We use json as config-file format from time to time, but it 
always end up hurting
you.

I therefor hacked up this little library: 
https://github.com/edgeware/structprop


___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] Multiple Sources for Logging

2010-08-17 Thread Johan Rydberg
On 8/17/10 6:24 AM, disappearedng wrote:
 Dear Everyone,

 I am running WSGI inside my twisted server. I am currently using 
 startLogging, but I am interested in separating the two sources of 
 logs into different destinations, i.e. different log files. Take a 
 look at my log:
To the best of my knowledge the twisted.web.server.Site constructor 
takes a logPath argument,
that should point to a log-file where access loglines are put.



___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] untwisting twistd

2009-06-24 Thread Johan Rydberg


On Jun 22, 2009, at 10:30 PM, Jared Gisin wrote:


[...]


I must say I agree with everything you're saying.

Another thing I'm missing is that there's no way to specify
_when_ to daemonize the application.  Plus I would love if
startService could return a deferred, just like stopService
does.


___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python