[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pywikipediabot-users
Subject:    Re: [Pywikipedia-l] flake8 and nose tests on new patches
From:       Mpaa <mpaa.wiki () gmail ! com>
Date:       2014-08-28 22:20:43
Message-ID: CAPuciEOqLxNFKNbK1veBom3_PwPpcY=ZaRAj9SjYgxX_YuScaQ () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Is there a way to make flake8 consider only those files that are tracked in
git?
I have other untracked files in my core dir and flake8 generates warnings
related to such files which are actually out of scope.
That would be appreciated.

Thanks
Mpaa


On Tue, Aug 19, 2014 at 10:39 AM, Antoine Musso <hashar+wmf@free.fr> wrote:

> Le 18/08/2014 17:48, John Mark Vandenberg a écrit :
> > To run only the tests which are run by jenkins, even without a
> > user-config.py file, use
> >
> > PYWIKIBOT2_NO_USER_CONFIG=1 nosetests -a "!site,!net"
>
> As an alternative, one can use tox which create virtualenv on the fly
> and takes care of installing dependencies and executing the proper command.
>
>  pip install tox
>  tox
>
> tox -l  shows a list of predefined envs that are executed by default:
>
>  flake8   # linter
>  flake8-docstrings   # pep257 docstring linter
>  py26   # run test command under python 2.6
>  py27   # same but with python 2.7
>
> More can be found in the tox.ini file, such as 'nose'.
>
>
> If you only want to execute the flake8:
>
>  tox -e flake8
>
> For nose:
>
>  tox -e nose
>
>
> Jenkins uses exactly that, so your setup should match exactly what it runs.
>
>
> There is a few more details at:
>
>
> https://www.mediawiki.org/wiki/Continuous_integration/Tutorials/Test_your_python
>
>
> --
> Antoine "hashar" Musso
>
>
> _______________________________________________
> Pywikipedia-l mailing list
> Pywikipedia-l@lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
>

[Attachment #5 (text/html)]

<div dir="ltr"><div><div><div>Is there a way to make flake8 consider only those files \
that are tracked in git?<br></div>I have other untracked files in my core dir and \
flake8 generates warnings related to such files which are actually out of scope.<br> \
</div><div>That would be \
appreciated.<br></div><div><br></div>Thanks<br></div>Mpaa<br></div><div \
class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Aug 19, 2014 at 10:39 \
AM, Antoine Musso <span dir="ltr">&lt;<a href="mailto:hashar+wmf@free.fr" \
target="_blank">hashar+wmf@free.fr</a>&gt;</span> wrote:<br> <blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex">Le 18/08/2014 17:48, John Mark Vandenberg a écrit :<br> <div \
class="">&gt; To run only the tests which are run by jenkins, even without a<br> &gt; \
user-config.py file, use<br> &gt;<br>
&gt; PYWIKIBOT2_NO_USER_CONFIG=1 nosetests -a &quot;!site,!net&quot;<br>
<br>
</div>As an alternative, one can use tox which create virtualenv on the fly<br>
and takes care of installing dependencies and executing the proper command.<br>
<br>
  pip install tox<br>
  tox<br>
<br>
tox -l   shows a list of predefined envs that are executed by default:<br>
<br>
  flake8     # linter<br>
  flake8-docstrings     # pep257 docstring linter<br>
  py26     # run test command under python 2.6<br>
  py27     # same but with python 2.7<br>
<br>
More can be found in the tox.ini file, such as &#39;nose&#39;.<br>
<br>
<br>
If you only want to execute the flake8:<br>
<br>
  tox -e flake8<br>
<br>
For nose:<br>
<br>
  tox -e nose<br>
<br>
<br>
Jenkins uses exactly that, so your setup should match exactly what it runs.<br>
<br>
<br>
There is a few more details at:<br>
<br>
  <a href="https://www.mediawiki.org/wiki/Continuous_integration/Tutorials/Test_your_python" \
target="_blank">https://www.mediawiki.org/wiki/Continuous_integration/Tutorials/Test_your_python</a><br>
 <span class="HOEnZb"><font color="#888888"><br>
<br>
--<br>
Antoine &quot;hashar&quot; Musso<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
_______________________________________________<br>
Pywikipedia-l mailing list<br>
<a href="mailto:Pywikipedia-l@lists.wikimedia.org">Pywikipedia-l@lists.wikimedia.org</a><br>
 <a href="https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l" \
target="_blank">https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l</a><br> \
</div></div></blockquote></div><br></div>


[Attachment #6 (text/plain)]

_______________________________________________
Pywikipedia-l mailing list
Pywikipedia-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic