[weboob] [PATCH] Fix core unittests and PyFlakes warnings

Phyks phyks at phyks.me
Sun Dec 4 18:00:48 CET 2016


The last patch had a mistake, it was changing whitespaces to tabs. Here 
is a fixed version.

Working on the CI and linting, I have a few other patches (currently at 
https://gitlab.com/phyks/weboob/merge_requests/1/commits), to integrate 
with weboob-ci (https://github.com/Phyks/weboob-ci) and fix the issues, 
I will send formatted patches to the ML soon.

Le 2016-11-29 21:42, Phyks a écrit :
> Hi,
> 
> Some updates on this, here are some extra patches.
> 
> Basically, I added 2 commits, the first one to fix PyFlakes errors,
> and the other one to enable Continuous Integration in Gitlab.
> 
> First of all, concerning PyFlakes, there was an error left in
> deprecated code (no longer used) in AUM module. Then, I just merged
> the two conflicting dict keys, and this should not affect Weboob users
> at all.
> 
> 
> Then, as discussed on IRC, there was the idea of using Travis or
> Gitlab-CI to run the unittests. I integrated it in Gitlab, and added
> code coverage computation, as can be seen in
> https://gitlab.com/phyks/weboob/pipelines/5188408. "lint" step does
> not pass as some modules are lacking icons and tests. Unittests pass
> except for the modules unittests which are skipped because no backends
> are configured.
> 
> Gitlab-CI, as offered by gitlab.com, has shared-runners, similar to
> what Travis offers. But it can also have private runners, and so the
> same kind of build system as Buildbot could be used. Additionnally,
> one can pass "private" parameters to the runners which means it could
> be quite easy to run unittests for modules without exposing any
> credentials.
> 
> 
> I will try to write something to aggregate CI results for modules now,
> to have a kind of "grid" view of the current status of modules. I am
> thinking about something like
> https://github.com/cozy-labs/konnectors/#bills, but updated
> automagically. Let me know if you have any ideas concerning this
> point.
> 
> 
> Le 2016-11-29 05:00, Laurent Bachelier a écrit :
>> On 2016-11-28 22:48, Phyks wrote:
>>> Hi,
>>> 
>>> I was looking at the CI and the possibility of contributing user 
>>> tests
>>> to a central platform, as testing a module generally requires an 
>>> account
>>> for the website.
>>> 
>>> I found that the core doctests were not passing, and that there was 
>>> some
>>> PyFlakes errors. This is a patch to fix it.
>>> 
>>> Note that PyFlakes still does not pass due to a duplicated dict key 
>>> in
>>> AdopteUnMec module. I could not find any documentation about the AUM
>>> error codes and am not sure about the right way to fix it.
>>> 
>>> Something I don't understand is that Buildbot gives errors which are 
>>> not
>>> on my local run of the tests, so I am not sure my patch actually 
>>> fixes
>>> everything from the failed builds (see
>>> http://buildbot.weboob.org/waterfall).
>> 
>> It's because it's running on an outdated python version (and also, 
>> very
>> out of date pyflakes).
>> 
>> It will eventually be fixed by upgrading the symlink.me machine.
>> 
>> By the way my buildbot instance (penguin) is broken (or at least my 
>> way
>> to connect to it) and I haven't got around to fix it, but it was 
>> running
>> a recent Python 2.7 and pyflakes/flake8.
>> 
>> Your patch looks good to me.
> 
> _______________________________________________
> weboob mailing list
> weboob at lists.symlink.me
> http://lists.symlink.me/mailman/listinfo/weboob

-- 
Phyks
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Gitlab-CI-continuous-integration.patch
Type: text/x-diff
Size: 6490 bytes
Desc: not available
URL: <http://lists.symlink.me/pipermail/weboob/attachments/20161204/ee3ded2e/attachment.patch>


More information about the weboob mailing list