[Twisted-Python] Adding code to twisted
glyph at divmod.com
glyph at divmod.com
Tue Jan 29 06:06:15 MST 2008
On 03:53 am, jml at mumak.net wrote:
>You should be warned that your code needs to be reviewed before it
>hits the tree, and you'll need to have good unit tests.
I want to repeat and emphasize this warning, because if you haven't
submitted any patches before, you may be in for a nasty surprise ;).
It is, however, both good news and bad news. The bad news is that it is
probably going to be a lot of work. You will need to live up to the
current Twisted quality standards, which means:
* Your tests will need to achieve at least 100% line-coverage
* You will need to write docstrings for every public module, method,
and class (including tests).
* Docstrings will have to be formatted according to Twisted standard,
including @param and @type markers where appropriate
* The code will need to be cleaned up to meet the coding standard
(trailing whitespace, unused imports, naming conventions, etc)
This means, in practice, that it will have to be better than some of the
code already in twisted that was "grandfathered in" before we adopted
these standards :).
The *really* bad news is that I can see that libsnmp is under the LGPL.
Twisted is under the MIT license, and we are not going to add anything
to it under a more restrictive license. Do you have the authority to
relicense all of that code? i.e. have you received any contributions
under the LGPL, and can you get in touch with everyone that you've
received those contributions from and verify that they're OK with a
license change?
The good news is that the code will probably get vastly better in the
process. I've written a few things which have been overhauled and
radically improved as part of the process of getting them in to Twisted.
However, the reason that the documentation is geared toward patching
rather than addition of large features is that adding large features all
at once can be daunting both for reviewers and authors of code. For
example, you can see what a "large" review looks like here:
http://twistedmatrix.com/trac/ticket/1608#comment:27
You might want to break up libsnmp into a series of smaller chunks so
that you can deal with the feedback in smaller chunks and get your
contributions reviewed and integrated faster.
More information about the Twisted-Python
mailing list