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:

<http://invenio-software.org/wiki/Tools/Git/Workflow#R2.Remarksoncommitlogmessages>

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 99999 --diff
  # see the proposed changes
  $ git diff --name-only pu.. | xargs \
  autopep8 --ignore E123 --ignore E226 --ignore E24 --ignore E501 \
  --ignore E265 --range 20 99999 --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:
<https://github.com/jirikuncar/invenio-kwalitee/issues>

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

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to