[Twisted-Python] Help non-commiter to fully test their changes locally or remote
![](https://secure.gravatar.com/avatar/c194a4d2f2f8269aa052942e87985198.jpg?s=120&d=mm&r=g)
From information gathered from #twisted-dev it seems that twistedchecker is not maintained and that some of its errors are invalid... so one should not
Hi, I am trying to gather documentation to help non-commiters test their changes before sending them to review. When run locally some tests fail with a lot of errors and is hard for a developer to filter the errors generated by his/her changes. Ex: * twistedchecker * pyflakes * api-reference I have created patches to clean pyflakes and I also plan to start cleaning the api-reference build errors try to fix all its errors. ... I wander why twistedchecker is still used ? I would like to investigate how we can fix api-reference build errors. ------ I have created a travis-ci configuration file which can be used as a reference for running tests. It somehow copies the builders observed on buildbot.twistedmatrix.com A sample build result can be found here: https://travis-ci.org/chevah/twisted/builds/19803969 Code changes are here. If you find them useful I can refine them into a public patch. https://github.com/chevah/twisted/pull/1/files Only python 2.7 and 3.3 builders are enabled... but 2.6 builders can also be enabled. py-select-gc tests are not enabled since they are very, very slow. Running all tests on a single process could take about 1 hour. I guess that running only tests with default reactor and then pyflakes/pydoctor on changed files should cover most errors. A developer should run at least the following tests before sending a patch for review: * trial with default reactor * pyflakes for changed files * pydoctor for changed files If documentation was changed he/she should also run documentation tests. ---- Running pydoctor on my computer takes about 3 minutes... a bit long for my taste. I hope that pydoctor can be run on a independent python files so that I can create a separate linter test which will run pyflakes and pydoctor only on changes files. This should provide a big improvements in speed. I used travis-ci as it provides an isolated / reference test environment. Once the configuration is ok, it can be translated into tox [1], private buildbot [2] or custom script to allow developers to run test on their computers. If a Twisted developer has time, I need some help to check the current travis-ci errors and suggest how to fix them. Thanks! [1] https://github.com/msabramo/python-panci [2] https://github.com/isotoma/buildbot_travis -- Adi Roiban
![](https://secure.gravatar.com/avatar/3d37232726396a1d3c7412dd915095ea.jpg?s=120&d=mm&r=g)
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, TwistedChecker is kind of maintained by me - I've just not had the drive to work on it as much as other things :) Some of the invalid TwistedChecker errors are hard to solve - some are because they're hard to detect statically (for example, `some_var % 20` - is this string formatting, or modulo? Who knows, without runtime inspection). TwistedChecker has some form of diff functionality. When I get the time I might have to think of how to do it locally, rather than relying on the buildbots. Regards, HawkOwl On 28/02/14 22:56, Adi Roiban wrote:
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJTEKyPAAoJECMItHnTkkoRZVoH/jziYa2TnfpzfXKa+Ivqy2fw yWnH5xtsjeo4zrZwd1JWjchnrUTTgLJg/HtJzu5rrql8umzpKTfDU98K8EwzLvOF AAjxmv6oTKNvIQw6QLu4ZEQ2sqG6815WSWqoEuZ2qxmtODg4v2TAjhhKv79lHZO5 XbzkRj2XhEKtaDKXsc7TrYrzwkgV+7uK0I4IG+tfFMKLBeEw3X4mV8t1ZhfE/9U1 7I98I1W5BySYdD5eEy7PbkQ5mqVdk1m1EY01QamtH90Sl4TyrBz5A8VwXfmtRP+D T9fF0xRmh/yifbSQ48vsGiFfJIUGwsShNkvalMWtVnF40RLEejBNU2mzN+lhkc4= =XhJV -----END PGP SIGNATURE-----
![](https://secure.gravatar.com/avatar/c194a4d2f2f8269aa052942e87985198.jpg?s=120&d=mm&r=g)
On 28 February 2014 17:34, HawkOwl <hawkowl@atleastfornow.net> wrote:
Right now I want to fix all errors produced during apidocs generation and next in list is twistedchecker. I like pedantic linters so maybe I can help with making twistedcheker easier to use.
Maybe those kind of errors could be documented in a list so that a developer could run twistedcheker in a mode where any reported error is a real error and should be fixed. We can also have a 'crazy' run for twistedcheker where ambiguous errors are reported and that require a human to review them. TwistedChecker has some form of diff functionality. When I get the
time I might have to think of how to do it locally, rather than relying on the buildbots.
I will look at how --diff works and will try to document how devs can run in locally. Regards,
HawkOwl
Thanks for the feedback! -- Adi Roiban
![](https://secure.gravatar.com/avatar/3d37232726396a1d3c7412dd915095ea.jpg?s=120&d=mm&r=g)
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, TwistedChecker is kind of maintained by me - I've just not had the drive to work on it as much as other things :) Some of the invalid TwistedChecker errors are hard to solve - some are because they're hard to detect statically (for example, `some_var % 20` - is this string formatting, or modulo? Who knows, without runtime inspection). TwistedChecker has some form of diff functionality. When I get the time I might have to think of how to do it locally, rather than relying on the buildbots. Regards, HawkOwl On 28/02/14 22:56, Adi Roiban wrote:
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJTEKyPAAoJECMItHnTkkoRZVoH/jziYa2TnfpzfXKa+Ivqy2fw yWnH5xtsjeo4zrZwd1JWjchnrUTTgLJg/HtJzu5rrql8umzpKTfDU98K8EwzLvOF AAjxmv6oTKNvIQw6QLu4ZEQ2sqG6815WSWqoEuZ2qxmtODg4v2TAjhhKv79lHZO5 XbzkRj2XhEKtaDKXsc7TrYrzwkgV+7uK0I4IG+tfFMKLBeEw3X4mV8t1ZhfE/9U1 7I98I1W5BySYdD5eEy7PbkQ5mqVdk1m1EY01QamtH90Sl4TyrBz5A8VwXfmtRP+D T9fF0xRmh/yifbSQ48vsGiFfJIUGwsShNkvalMWtVnF40RLEejBNU2mzN+lhkc4= =XhJV -----END PGP SIGNATURE-----
![](https://secure.gravatar.com/avatar/c194a4d2f2f8269aa052942e87985198.jpg?s=120&d=mm&r=g)
On 28 February 2014 17:34, HawkOwl <hawkowl@atleastfornow.net> wrote:
Right now I want to fix all errors produced during apidocs generation and next in list is twistedchecker. I like pedantic linters so maybe I can help with making twistedcheker easier to use.
Maybe those kind of errors could be documented in a list so that a developer could run twistedcheker in a mode where any reported error is a real error and should be fixed. We can also have a 'crazy' run for twistedcheker where ambiguous errors are reported and that require a human to review them. TwistedChecker has some form of diff functionality. When I get the
time I might have to think of how to do it locally, rather than relying on the buildbots.
I will look at how --diff works and will try to document how devs can run in locally. Regards,
HawkOwl
Thanks for the feedback! -- Adi Roiban
participants (2)
-
Adi Roiban
-
HawkOwl