Re: kwalitee.invenio-software.org

2014-03-28 Thread Jan Åge Lavik
On Fri, Mar 28, 2014 at 10:05 AM, Tibor Simko  wrote:

> Good code editors have PEP8 check easily pluggable.
>

+1 for recommending having this, as well as linting, plugged in your editor
of choice. Makes life easier :-)

Cheers,
Jan


Re: kwalitee.invenio-software.org

2014-03-28 Thread Tibor Simko
On Fri, 28 Mar 2014, Yoan Blanc wrote:
> Regarding PEP8 and PyFlakes, you could consider using the git hook
> from Flake8: http://flake8.readthedocs.org/en/latest/vcs.html#git-hook

Note that for good development flow, it is best if people are checking
their branches *while developing* and not only at the pull request time.
Kind of like tests, always better when done while developing.  

Good code editors have PEP8 check easily pluggable.  Plus there are
traditional kwalitee tools like:

   $ invenio-check-kwalitee --check-pep8 bibfoo/bar_*.py

and:

   $ invenio-check-branch master my-new-cool-feature

that do even more (and somehow "smart") code checking.

P.S. Latter not yet ported for "pu".

Best regards
-- 
Tibor Simko


Re: kwalitee.invenio-software.org

2014-03-28 Thread Yoan Blanc
Hi,

Regarding PEP8 and PyFlakes, you could consider using the git hook from 
Flake8: http://flake8.readthedocs.org/en/latest/vcs.html#git-hook

with ignore="E501,E265"

strict=True means that it will block you from doing the commit 
operation if errors are found;
strict=False will let you commit and then display the errors. Up to you 
to correct and amend the fixes or to perform another commit for the 
formatting fixes (something the strict option doesn't allow and will 
pass the kwalitee checks).

This git hook is basically what is done by the service (modulo the 
commit message checks).

Cheers,

--
Yoan

Le jeu 27 mar 2014 18:43:44 CET, Jiri Kuncar a écrit :
> Dear (‘pu’) developers,
>
> in last weeks we have been experimenting with GitHub hook
> that checks your pull requests. In first round we focused on
> well formatted commit messages as described in:
>
> 
>
> Please note that we don’t run any spell/grammar checker ;)
>
> Now we are experimenting with PEP8/Pyflakes checker for each
> python file in pull request. It’s *optional* but personally,
> I would be happy if you try to check your files before creating
> pull request:
>
>   $ git diff --name-only pu.. | \
>   xargs pep8 --ignore=E123,E226,E24,E501,E265.
>
> In case you see too many issues and you are willing to help
> making the code “nicer” you can try to run `autopep8` (on your
> own risk).
>
>   $ git status # please make sure your code is committed!
>   $ git checkout -b pu-pep8-improvements
>   $ git diff --name-only pu.. | xargs \
>   autopep8 --ignore E123 --ignore E226 --ignore E24 --ignore E501 \
>   --ignore E265 --range 20 9 --diff
>   # see the proposed changes
>   $ git diff --name-only pu.. | xargs \
>   autopep8 --ignore E123 --ignore E226 --ignore E24 --ignore E501 \
>   --ignore E265 --range 20 9 --in-place
>   # check the result
>   $ git diff --name-only pu.. | \
>   xargs pep8 --ignore=E123,E226,E24,E501,E265.
>   # fix the rest and commit :)
>   $ git add ...
>   $ git commit -s …
>   # make a pull request
>
> In case of problems or if you have any proposal please check:
> 
>
> Best regards,




kwalitee.invenio-software.org

2014-03-27 Thread Jiri Kuncar
Dear (‘pu’) developers,

in last weeks we have been experimenting with GitHub hook
that checks your pull requests. In first round we focused on
well formatted commit messages as described in:



Please note that we don’t run any spell/grammar checker ;)

Now we are experimenting with PEP8/Pyflakes checker for each
python file in pull request. It’s *optional* but personally,
I would be happy if you try to check your files before creating 
pull request:

  $ git diff --name-only pu.. | \
  xargs pep8 --ignore=E123,E226,E24,E501,E265.

In case you see too many issues and you are willing to help
making the code “nicer” you can try to run `autopep8` (on your
own risk).

  $ git status # please make sure your code is committed!
  $ git checkout -b pu-pep8-improvements
  $ git diff --name-only pu.. | xargs \
  autopep8 --ignore E123 --ignore E226 --ignore E24 --ignore E501 \
  --ignore E265 --range 20 9 --diff
  # see the proposed changes
  $ git diff --name-only pu.. | xargs \
  autopep8 --ignore E123 --ignore E226 --ignore E24 --ignore E501 \
  --ignore E265 --range 20 9 --in-place 
  # check the result
  $ git diff --name-only pu.. | \
  xargs pep8 --ignore=E123,E226,E24,E501,E265.
  # fix the rest and commit :)
  $ git add ...
  $ git commit -s …
  # make a pull request

In case of problems or if you have any proposal please check:


Best regards,
-- 
Jiří Kunčar
Software Engineer

CERN, IT Department, Digital Library Technology Section
Office 513/1-014
Tel: +41 22 76 62526
Cel: +41 78 850 1517



smime.p7s
Description: S/MIME cryptographic signature