Re: [Openerp-community] Coding Guidlines - long lines

2013-11-26 Thread Guewen Baconnier

On 11/25/2013 10:30 PM, Markus Schneider wrote:

hello,

[background]i start this discussion, because i want to submit my code,
but fulfil even 79 rule, our merge request are still open, but this is a
other problem[/backgound]

in my opinion the i prefer discussion has not outcome. I guess we need
a good example where 79 char rule is implemented and the module is
complex. I look in the new magento-connector and there 7500 times
breaking this rule over all modules you need to use.

So if the big contributors like Camp2Camp will use this rule strict, the
rest of the community will follow, i think.

If the big one ignoring it and you say to the small one (like us) use
it, you will loss us.

[ironic]i name my variable absrl instad of
account_bank_statement_reconcile_line, this saves me a lot of chars, but
the code will be worst[/ironic]



Hello,

I didn't want to comment on that thread, but now that I have been 
summoned, so... well, 7500 too long lines on the Magento Connector is 
stupid.


I do respect and promote the 79 chars limit and as far as I know all my 
colleagues at Camptocamp too.


'pep8' counts 43 too long lines in the Connector module (~3000 lines) 
and 109 in the Magento Connector module (~4200 lines).  A lot of them 
are at 80 chars or barely more.  You can't consider the other 
dependencies whose code has grown up since at least 6.1.  Of course, if 
you add the test data which is recorded from the Magento API, the number 
increases up to 7500 errors... data which would be a joke to pep8ify.


So if you search an example using the 79 chars rule, just look, with 
your eyes, and not with pyflakes/pep8 tools, in the connector modules 
(and avoid the test data files).


I also have found that respecting the coding style leads people to do 
the same, and I think that, just like Sébastien Beau said on this 
thread, they end up to prefer it.


On a point I think you are right: there is no place for a I prefer 
debate.  If we, as a team, can't agree on the 99 chars limit, pep8 rule 
is: 79 chars.


Is there a magic word to close this never-ending debate?

--
Guewen Baconnier
Business Solutions Software Developer

Camptocamp SA
PSE A, CH-1015 Lausanne
Phone: +41 21 619 10 39
Office: +41 21 619 10 10
http://www.camptocamp.com/

___
Mailing list: https://launchpad.net/~openerp-community
Post to : openerp-community@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openerp-community
More help   : https://help.launchpad.net/ListHelp


Re: [Openerp-community] Coding Guidlines - long lines

2013-11-26 Thread Joël Grand-Guillaume
Thanks for the explanation Guewen. I think the debate is over with that ;)

http://www.python.org/dev/peps/pep-0008/#maximum-line-length

PEP8 is the reference, it's not about people's preference I fear..


On Tue, Nov 26, 2013 at 9:00 AM, Guewen Baconnier 
guewen.baconn...@camptocamp.com wrote:

 On 11/25/2013 10:30 PM, Markus Schneider wrote:

 hello,

 [background]i start this discussion, because i want to submit my code,
 but fulfil even 79 rule, our merge request are still open, but this is a
 other problem[/backgound]

 in my opinion the i prefer discussion has not outcome. I guess we need
 a good example where 79 char rule is implemented and the module is
 complex. I look in the new magento-connector and there 7500 times
 breaking this rule over all modules you need to use.

 So if the big contributors like Camp2Camp will use this rule strict, the
 rest of the community will follow, i think.

 If the big one ignoring it and you say to the small one (like us) use
 it, you will loss us.

 [ironic]i name my variable absrl instad of
 account_bank_statement_reconcile_line, this saves me a lot of chars, but
 the code will be worst[/ironic]



 Hello,

 I didn't want to comment on that thread, but now that I have been
 summoned, so... well, 7500 too long lines on the Magento Connector is
 stupid.

 I do respect and promote the 79 chars limit and as far as I know all my
 colleagues at Camptocamp too.

 'pep8' counts 43 too long lines in the Connector module (~3000 lines) and
 109 in the Magento Connector module (~4200 lines).  A lot of them are at 80
 chars or barely more.  You can't consider the other dependencies whose code
 has grown up since at least 6.1.  Of course, if you add the test data which
 is recorded from the Magento API, the number increases up to 7500 errors...
 data which would be a joke to pep8ify.

 So if you search an example using the 79 chars rule, just look, with your
 eyes, and not with pyflakes/pep8 tools, in the connector modules (and avoid
 the test data files).

 I also have found that respecting the coding style leads people to do the
 same, and I think that, just like Sébastien Beau said on this thread, they
 end up to prefer it.

 On a point I think you are right: there is no place for a I prefer
 debate.  If we, as a team, can't agree on the 99 chars limit, pep8 rule is:
 79 chars.

 Is there a magic word to close this never-ending debate?

 --
 Guewen Baconnier
 Business Solutions Software Developer

 Camptocamp SA
 PSE A, CH-1015 Lausanne
 Phone: +41 21 619 10 39
 Office: +41 21 619 10 10
 http://www.camptocamp.com/


 ___
 Mailing list: https://launchpad.net/~openerp-community
 Post to : openerp-community@lists.launchpad.net
 Unsubscribe : https://launchpad.net/~openerp-community
 More help   : https://help.launchpad.net/ListHelp




-- 


*camptocamp*
INNOVATIVE SOLUTIONS
BY OPEN SOURCE EXPERTS

*Joël Grand-Guillaume*
Division Manager
Business Solutions

+41 21 619 10 28
www.camptocamp.com
___
Mailing list: https://launchpad.net/~openerp-community
Post to : openerp-community@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openerp-community
More help   : https://help.launchpad.net/ListHelp


Re: [Openerp-community] Coding Guidlines - long lines

2013-11-25 Thread Jose Antonio Morales
Hello.

I think the same way that Oscar does.

When I saw the PEP8 updates almost cry of happiness, because 79 char is too
short when you fully follow the pep8 rules, you can see the account code
and then tell me if 79 char is enough.

The answer is simple is not enough because you would have to cut the code
lines to follow the PEP8 and this makes your code to be ugly.

I follow the PEP8 rules even in the fields definition and I tell them again
79 is not enough.

If you want follow the PEP8 fully 79 is not enough if you want follow the
PEP8 in some lines(bad way) you can use 79 char.

Use this command pep8 --show-source --show-pep8 for know how many rules you
are broken.


On Mon, Nov 25, 2013 at 1:42 AM, Mario Arias the.clone.mas...@gmail.comwrote:

 +1  for 79 chars...

 I am on the road working on my laptop most of the time...

 Regards,
 -Mario


 On Sun, Nov 24, 2013 at 2:48 PM, Franco Tampieri 
 franco.tampi...@abstract.it wrote:

 I like python pep8 rule, code i much readable on small diplay, so I agree
 at 100% to the community approach.

 Regards

 Franco



 Franco Tampieri
 System Engineer


 _
 abstract.it - +39 06 9294 6938



 Registro Imprese di Napoli 788429 / Cap. Soc. 10.000 Euro I.V.
 Avvertenze Legali – D. Lgs. 196/03 Tutela dei dati personali. Le 
 informazioni contenute in questo messaggio
 e in ogni eventuale allegato sono riservate e ne è vietata ogni forma di 
 diffusione. Se avete ricevuto questa
 comunicazione per errore, Vi preghiamo di informare immediatamente il 
 mittente del messaggio e di eliminare l'e-mail.



 2013/11/24 Leonardo Pistone leonardo.pist...@camptocamp.com

 I prefer 79 as well.

 I also agree with the pep8 idea of not using backslashes, but using
 Python's implied
  line continuation inside parentheses, brackets and braces.

 OpenERP example:

 'date_order': fields.date(
 'Date', required=True, readonly=True, select=True,
 states={
 'draft': [('readonly', False)],
 'sent': [('readonly', False)]
 }),

 Instead of the long line found in the actual openobject-addons code

 l


 On Sat, Nov 23, 2013 at 4:27 PM, Oscar Alca oszc...@gmail.com wrote:

 http://hg.python.org/peps/rev/fb24c80e9afb#l1.95


 On Fri, Nov 22, 2013 at 10:38 AM, Sebastien Beau 
 sebastien.b...@akretion.com.br wrote:

 Hi
 I also support 79.
 When I start on python I was thinking that 79 was not enough. But now
 every time I read the code of an OpenERP Module that respect pep8. I 
 really
 enjoy it, it's really more readable, so let's stay on 79.


 2013/11/22 Stefan ste...@therp.nl

 On 11/22/2013 05:15 PM, Oscar Alca wrote:

 Hello Raphael I also understand the question why the question was
 rised, also, I do not think that PEP8 Is ambiguous, it says maximum of 
 100
 with effective 99 for code mantained by a team, so, we, as a team, are
 allowed to a maximum of 100.


 Hi Oscar,

 it does not say 'code maintained by a team', it says [maintained] by
 a team that can reach agreement on this issue. And as a member of that
 team, I prefer 79 like Alexandre for now.

 Cheers,
 Stefan

 --
 Therp - Maatwerk in open ontwikkeling

 Stefan Rijnhart - Ontwerp en implementatie

 mail: ste...@therp.nl
 tel: +31 (0) 614478606
 web: http://therp.nl



 ___
 Mailing list: https://launchpad.net/~openerp-community
 Post to : openerp-community@lists.launchpad.net
 Unsubscribe : https://launchpad.net/~openerp-community
 More help   : https://help.launchpad.net/ListHelp



 ___
 Mailing list: https://launchpad.net/~openerp-community
 Post to : openerp-community@lists.launchpad.net
 Unsubscribe : https://launchpad.net/~openerp-community
 More help   : https://help.launchpad.net/ListHelp




 --




 Ing. Oscar Alcalá Rivera
 *312-107-1704 312-107-1704* · oszc...@gmail.com ozc...@gmail.com

 Paseo de Bugambilias 251 · Villa de alvarez, Colima, CP 28978
 Tlf: *312322 312322*

 *Open Source Enthusiast*
  [image: twitter] http://twitter.com/oscarolar [image: 
 linkedIn]http://www.linkedin.com/pub/oscar-alcal%C3%A1/3b/a79/922
[image: Google+]http://plus.google.com/107659954580035981067/posts


 [image: eco] No me imprimas si no es necesario. Protejamos el medio
 ambiente

 ___
 Mailing list: https://launchpad.net/~openerp-community
 Post to : openerp-community@lists.launchpad.net
 Unsubscribe : https://launchpad.net/~openerp-community
 More help   : https://help.launchpad.net/ListHelp



 ___
 Mailing list: https://launchpad.net/~openerp-community
 Post to : openerp-community@lists.launchpad.net
 Unsubscribe : https://launchpad.net/~openerp-community
 More help   : https://help.launchpad.net/ListHelp



 ___
 Mailing list: https://launchpad.net/~openerp-community
 Post to : 

Re: [Openerp-community] Coding Guidlines - long lines

2013-11-25 Thread Graeme Gellatly
I prefer 79 even if it means the odd ugly line.  In OpenERP we must work
across multiple files at once. 79 allows for 4 open editors. But sometimes
it should be broken which pep8 also allows.
On 26/11/2013 3:41 AM, Jose Antonio Morales j...@vauxoo.com wrote:

 Hello.

 I think the same way that Oscar does.

 When I saw the PEP8 updates almost cry of happiness, because 79 char is
 too short when you fully follow the pep8 rules, you can see the account
 code and then tell me if 79 char is enough.

 The answer is simple is not enough because you would have to cut the code
 lines to follow the PEP8 and this makes your code to be ugly.

 I follow the PEP8 rules even in the fields definition and I tell them
 again 79 is not enough.

 If you want follow the PEP8 fully 79 is not enough if you want follow the
 PEP8 in some lines(bad way) you can use 79 char.

 Use this command pep8 --show-source --show-pep8 for know how many rules
 you are broken.


 On Mon, Nov 25, 2013 at 1:42 AM, Mario Arias 
 the.clone.mas...@gmail.comwrote:

 +1  for 79 chars...

 I am on the road working on my laptop most of the time...

 Regards,
 -Mario


 On Sun, Nov 24, 2013 at 2:48 PM, Franco Tampieri 
 franco.tampi...@abstract.it wrote:

 I like python pep8 rule, code i much readable on small diplay, so I
 agree at 100% to the community approach.

 Regards

 Franco




 Franco Tampieri
 System Engineer



 _
 abstract.it - +39 06 9294 6938




 Registro Imprese di Napoli 788429 / Cap. Soc. 10.000 Euro I.V.
 Avvertenze Legali – D. Lgs. 196/03 Tutela dei dati personali. Le 
 informazioni contenute in questo messaggio
 e in ogni eventuale allegato sono riservate e ne è vietata ogni forma di 
 diffusione. Se avete ricevuto questa
 comunicazione per errore, Vi preghiamo di informare immediatamente il 
 mittente del messaggio e di eliminare l'e-mail.



 2013/11/24 Leonardo Pistone leonardo.pist...@camptocamp.com

 I prefer 79 as well.

 I also agree with the pep8 idea of not using backslashes, but using
 Python's implied
  line continuation inside parentheses, brackets and braces.

 OpenERP example:

 'date_order': fields.date(
 'Date', required=True, readonly=True, select=True,
 states={
 'draft': [('readonly', False)],
 'sent': [('readonly', False)]
 }),

 Instead of the long line found in the actual openobject-addons code

 l


 On Sat, Nov 23, 2013 at 4:27 PM, Oscar Alca oszc...@gmail.com wrote:

 http://hg.python.org/peps/rev/fb24c80e9afb#l1.95


 On Fri, Nov 22, 2013 at 10:38 AM, Sebastien Beau 
 sebastien.b...@akretion.com.br wrote:

 Hi
 I also support 79.
 When I start on python I was thinking that 79 was not enough. But now
 every time I read the code of an OpenERP Module that respect pep8. I 
 really
 enjoy it, it's really more readable, so let's stay on 79.


 2013/11/22 Stefan ste...@therp.nl

 On 11/22/2013 05:15 PM, Oscar Alca wrote:

 Hello Raphael I also understand the question why the question was
 rised, also, I do not think that PEP8 Is ambiguous, it says maximum of 
 100
 with effective 99 for code mantained by a team, so, we, as a team, are
 allowed to a maximum of 100.


 Hi Oscar,

 it does not say 'code maintained by a team', it says [maintained]
 by a team that can reach agreement on this issue. And as a member of 
 that
 team, I prefer 79 like Alexandre for now.

 Cheers,
 Stefan

 --
 Therp - Maatwerk in open ontwikkeling

 Stefan Rijnhart - Ontwerp en implementatie

 mail: ste...@therp.nl
 tel: +31 (0) 614478606
 web: http://therp.nl



 ___
 Mailing list: https://launchpad.net/~openerp-community
 Post to : openerp-community@lists.launchpad.net
 Unsubscribe : https://launchpad.net/~openerp-community
 More help   : https://help.launchpad.net/ListHelp



 ___
 Mailing list: https://launchpad.net/~openerp-community
 Post to : openerp-community@lists.launchpad.net
 Unsubscribe : https://launchpad.net/~openerp-community
 More help   : https://help.launchpad.net/ListHelp




 --




 Ing. Oscar Alcalá Rivera
 *312-107-1704 312-107-1704* · oszc...@gmail.com ozc...@gmail.com

 Paseo de Bugambilias 251 · Villa de alvarez, Colima, CP 28978
 Tlf: *312322 312322*

 *Open Source Enthusiast*
  [image: twitter] http://twitter.com/oscarolar [image: 
 linkedIn]http://www.linkedin.com/pub/oscar-alcal%C3%A1/3b/a79/922
[image: Google+]http://plus.google.com/107659954580035981067/posts


 [image: eco] No me imprimas si no es necesario. Protejamos el medio
 ambiente

 ___
 Mailing list: https://launchpad.net/~openerp-community
 Post to : openerp-community@lists.launchpad.net
 Unsubscribe : https://launchpad.net/~openerp-community
 More help   : https://help.launchpad.net/ListHelp



 ___
 Mailing list: https://launchpad.net/~openerp-community
 Post to : 

Re: [Openerp-community] Coding Guidlines - long lines

2013-11-25 Thread Markus Schneider
hello,

[background]i start this discussion, because i want to submit my code,
but fulfil even 79 rule, our merge request are still open, but this is a
other problem[/backgound]

in my opinion the i prefer discussion has not outcome. I guess we need
a good example where 79 char rule is implemented and the module is
complex. I look in the new magento-connector and there 7500 times
breaking this rule over all modules you need to use.

So if the big contributors like Camp2Camp will use this rule strict, the
rest of the community will follow, i think.

If the big one ignoring it and you say to the small one (like us) use
it, you will loss us.

[ironic]i name my variable absrl instad of
account_bank_statement_reconcile_line, this saves me a lot of chars, but
the code will be worst[/ironic]

On 25.11.2013 15:41, Jose Antonio Morales wrote:
 Hello.
 
 I think the same way that Oscar does.
 
 When I saw the PEP8 updates almost cry of happiness, because 79 char is
 too short when you fully follow the pep8 rules, you can see the account
 code and then tell me if 79 char is enough.
 
 The answer is simple is not enough because you would have to cut the
 code lines to follow the PEP8 and this makes your code to be ugly.
 
 I follow the PEP8 rules even in the fields definition and I tell them
 again 79 is not enough.
 
 If you want follow the PEP8 fully 79 is not enough if you want follow
 the PEP8 in some lines(bad way) you can use 79 char.
 
 Use this command pep8 --show-source --show-pep8 for know how many rules
 you are broken.
 
 
 On Mon, Nov 25, 2013 at 1:42 AM, Mario Arias the.clone.mas...@gmail.com
 mailto:the.clone.mas...@gmail.com wrote:
 
 +1  for 79 chars...
 
 I am on the road working on my laptop most of the time...
 
 Regards,
 -Mario
 
 
 On Sun, Nov 24, 2013 at 2:48 PM, Franco Tampieri
 franco.tampi...@abstract.it mailto:franco.tampi...@abstract.it
 wrote:
 
 I like python pep8 rule, code i much readable on small diplay,
 so I agree at 100% to the community approach.
 
 Regards
 
 Franco
 
 Franco Tampieri
 System Engineer
 _
 abstract.it http://abstract.it - +39 06 9294 6938
 Registro Imprese di Napoli 788429 / Cap. Soc. 10.000 Euro I.V.
 Avvertenze Legali – D. Lgs. 196/03 Tutela dei dati personali. Le
 informazioni contenute in questo messaggio
 e in ogni eventuale allegato sono riservate e ne è vietata ogni
 forma di diffusione. Se avete ricevuto questa comunicazione per
 errore, Vi preghiamo di informare immediatamente il mittente del
 messaggio e di eliminare l'e-mail.
 
 
 
 2013/11/24 Leonardo Pistone leonardo.pist...@camptocamp.com
 mailto:leonardo.pist...@camptocamp.com
 
 I prefer 79 as well.
 
 I also agree with the pep8 idea of not using backslashes,
 but using Python's implied
  line continuation inside parentheses, brackets and braces.
 
 OpenERP example:
 
 'date_order': fields.date(
 'Date', required=True, readonly=True, select=True,
 states={
 'draft': [('readonly', False)],
 'sent': [('readonly', False)]
 }),
 
 Instead of the long line found in the actual
 openobject-addons code
 
 l
 
 
 On Sat, Nov 23, 2013 at 4:27 PM, Oscar Alca
 oszc...@gmail.com mailto:oszc...@gmail.com wrote:
 
 http://hg.python.org/peps/rev/fb24c80e9afb#l1.95
 
 
 On Fri, Nov 22, 2013 at 10:38 AM, Sebastien Beau
 sebastien.b...@akretion.com.br
 mailto:sebastien.b...@akretion.com.br wrote:
 
 Hi
 I also support 79.
 When I start on python I was thinking that 79 was
 not enough. But now every time I read the code of an
 OpenERP Module that respect pep8. I really enjoy it,
 it's really more readable, so let's stay on 79.
 
 
 2013/11/22 Stefan ste...@therp.nl
 mailto:ste...@therp.nl
 
 On 11/22/2013 05:15 PM, Oscar Alca wrote:
 
 Hello Raphael I also understand the question
 why the question was rised, also, I do not
 think that PEP8 Is ambiguous, it says
 maximum of 100 with effective 99 for code
 mantained by a team, so, we, as a team, are
 allowed to a maximum of 100.
 
 
 Hi Oscar,
 
 it does not say 'code maintained by a team', it
 says [maintained] by a team that can reach
 

Re: [Openerp-community] Coding Guidlines - long lines

2013-11-25 Thread Nhomar Hernández
2013/11/25 Markus Schneider markus.schnei...@initos.com

 [ironic]i name my variable absrl instad of
 account_bank_statement_reconcile_line, this saves me a lot of chars, but
 the code will be worst[/ironic]


Yes.

[ironic]

def method (signature):
'''Document your stuff

  this method do a b and c where absri
is account_bank_statement_reconcile_line
 '''

return whatever

[/ironic] ;-) hundreds of less characters.


-- 

Saludos Cordiales

Nhomar G. Hernandez M.
+58-414-4110269
Skype: nhomar00
Web-Blog: http://geronimo.com.ve
Servicios IT: http://vauxoo.com
Linux-Counter: 467724
Correos:
nho...@openerp.com.ve
nho...@vauxoo.com
twitter @nhomar
___
Mailing list: https://launchpad.net/~openerp-community
Post to : openerp-community@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openerp-community
More help   : https://help.launchpad.net/ListHelp


Re: [Openerp-community] Coding Guidlines - long lines

2013-11-24 Thread Leonardo Pistone
I prefer 79 as well.

I also agree with the pep8 idea of not using backslashes, but using
Python's implied
 line continuation inside parentheses, brackets and braces.

OpenERP example:

'date_order': fields.date(
'Date', required=True, readonly=True, select=True,
states={
'draft': [('readonly', False)],
'sent': [('readonly', False)]
}),

Instead of the long line found in the actual openobject-addons code

l


On Sat, Nov 23, 2013 at 4:27 PM, Oscar Alca oszc...@gmail.com wrote:

 http://hg.python.org/peps/rev/fb24c80e9afb#l1.95


 On Fri, Nov 22, 2013 at 10:38 AM, Sebastien Beau 
 sebastien.b...@akretion.com.br wrote:

 Hi
 I also support 79.
 When I start on python I was thinking that 79 was not enough. But now
 every time I read the code of an OpenERP Module that respect pep8. I really
 enjoy it, it's really more readable, so let's stay on 79.


 2013/11/22 Stefan ste...@therp.nl

 On 11/22/2013 05:15 PM, Oscar Alca wrote:

 Hello Raphael I also understand the question why the question was
 rised, also, I do not think that PEP8 Is ambiguous, it says maximum of 100
 with effective 99 for code mantained by a team, so, we, as a team, are
 allowed to a maximum of 100.


 Hi Oscar,

 it does not say 'code maintained by a team', it says [maintained] by a
 team that can reach agreement on this issue. And as a member of that team,
 I prefer 79 like Alexandre for now.

 Cheers,
 Stefan

 --
 Therp - Maatwerk in open ontwikkeling

 Stefan Rijnhart - Ontwerp en implementatie

 mail: ste...@therp.nl
 tel: +31 (0) 614478606
 web: http://therp.nl



 ___
 Mailing list: https://launchpad.net/~openerp-community
 Post to : openerp-community@lists.launchpad.net
 Unsubscribe : https://launchpad.net/~openerp-community
 More help   : https://help.launchpad.net/ListHelp



 ___
 Mailing list: https://launchpad.net/~openerp-community
 Post to : openerp-community@lists.launchpad.net
 Unsubscribe : https://launchpad.net/~openerp-community
 More help   : https://help.launchpad.net/ListHelp




 --




 Ing. Oscar Alcalá Rivera
 *312-107-1704* · oszc...@gmail.com ozc...@gmail.com

 Paseo de Bugambilias 251 · Villa de alvarez, Colima, CP 28978
 Tlf: *312322 312322*

 *Open Source Enthusiast*
  [image: twitter] http://twitter.com/oscarolar [image: 
 linkedIn]http://www.linkedin.com/pub/oscar-alcal%C3%A1/3b/a79/922
[image: Google+] http://plus.google.com/107659954580035981067/posts

 [image: eco] No me imprimas si no es necesario. Protejamos el medio
 ambiente

 ___
 Mailing list: https://launchpad.net/~openerp-community
 Post to : openerp-community@lists.launchpad.net
 Unsubscribe : https://launchpad.net/~openerp-community
 More help   : https://help.launchpad.net/ListHelp


___
Mailing list: https://launchpad.net/~openerp-community
Post to : openerp-community@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openerp-community
More help   : https://help.launchpad.net/ListHelp


Re: [Openerp-community] Coding Guidlines - long lines

2013-11-24 Thread Franco Tampieri
I like python pep8 rule, code i much readable on small diplay, so I agree
at 100% to the community approach.

Regards

Franco

Franco Tampieri
System Engineer
_
abstract.it - +39 06 9294 6938

Registro Imprese di Napoli 788429 / Cap. Soc. 10.000 Euro I.V.
Avvertenze Legali – D. Lgs. 196/03 Tutela dei dati personali. Le
informazioni contenute in questo messaggio
e in ogni eventuale allegato sono riservate e ne è vietata ogni forma
di diffusione. Se avete ricevuto questa
comunicazione per errore, Vi preghiamo di informare immediatamente il
mittente del messaggio e di eliminare l'e-mail.



2013/11/24 Leonardo Pistone leonardo.pist...@camptocamp.com

 I prefer 79 as well.

 I also agree with the pep8 idea of not using backslashes, but using
 Python's implied
  line continuation inside parentheses, brackets and braces.

 OpenERP example:

 'date_order': fields.date(
 'Date', required=True, readonly=True, select=True,
 states={
 'draft': [('readonly', False)],
 'sent': [('readonly', False)]
 }),

 Instead of the long line found in the actual openobject-addons code

 l


 On Sat, Nov 23, 2013 at 4:27 PM, Oscar Alca oszc...@gmail.com wrote:

 http://hg.python.org/peps/rev/fb24c80e9afb#l1.95


 On Fri, Nov 22, 2013 at 10:38 AM, Sebastien Beau 
 sebastien.b...@akretion.com.br wrote:

 Hi
 I also support 79.
 When I start on python I was thinking that 79 was not enough. But now
 every time I read the code of an OpenERP Module that respect pep8. I really
 enjoy it, it's really more readable, so let's stay on 79.


 2013/11/22 Stefan ste...@therp.nl

 On 11/22/2013 05:15 PM, Oscar Alca wrote:

 Hello Raphael I also understand the question why the question was
 rised, also, I do not think that PEP8 Is ambiguous, it says maximum of 100
 with effective 99 for code mantained by a team, so, we, as a team, are
 allowed to a maximum of 100.


 Hi Oscar,

 it does not say 'code maintained by a team', it says [maintained] by a
 team that can reach agreement on this issue. And as a member of that team,
 I prefer 79 like Alexandre for now.

 Cheers,
 Stefan

 --
 Therp - Maatwerk in open ontwikkeling

 Stefan Rijnhart - Ontwerp en implementatie

 mail: ste...@therp.nl
 tel: +31 (0) 614478606
 web: http://therp.nl



 ___
 Mailing list: https://launchpad.net/~openerp-community
 Post to : openerp-community@lists.launchpad.net
 Unsubscribe : https://launchpad.net/~openerp-community
 More help   : https://help.launchpad.net/ListHelp



 ___
 Mailing list: https://launchpad.net/~openerp-community
 Post to : openerp-community@lists.launchpad.net
 Unsubscribe : https://launchpad.net/~openerp-community
 More help   : https://help.launchpad.net/ListHelp




 --




 Ing. Oscar Alcalá Rivera
 *312-107-1704 312-107-1704* · oszc...@gmail.com ozc...@gmail.com

 Paseo de Bugambilias 251 · Villa de alvarez, Colima, CP 28978
 Tlf: *312322 312322*

 *Open Source Enthusiast*
  [image: twitter] http://twitter.com/oscarolar [image: 
 linkedIn]http://www.linkedin.com/pub/oscar-alcal%C3%A1/3b/a79/922
[image: Google+] http://plus.google.com/107659954580035981067/posts


 [image: eco] No me imprimas si no es necesario. Protejamos el medio
 ambiente

 ___
 Mailing list: https://launchpad.net/~openerp-community
 Post to : openerp-community@lists.launchpad.net
 Unsubscribe : https://launchpad.net/~openerp-community
 More help   : https://help.launchpad.net/ListHelp



 ___
 Mailing list: https://launchpad.net/~openerp-community
 Post to : openerp-community@lists.launchpad.net
 Unsubscribe : https://launchpad.net/~openerp-community
 More help   : https://help.launchpad.net/ListHelp


___
Mailing list: https://launchpad.net/~openerp-community
Post to : openerp-community@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openerp-community
More help   : https://help.launchpad.net/ListHelp


Re: [Openerp-community] Coding Guidlines - long lines

2013-11-24 Thread Mario Arias
+1  for 79 chars...

I am on the road working on my laptop most of the time...

Regards,
-Mario


On Sun, Nov 24, 2013 at 2:48 PM, Franco Tampieri 
franco.tampi...@abstract.it wrote:

 I like python pep8 rule, code i much readable on small diplay, so I agree
 at 100% to the community approach.

 Regards

 Franco


 Franco Tampieri
 System Engineer

 _
 abstract.it - +39 06 9294 6938


 Registro Imprese di Napoli 788429 / Cap. Soc. 10.000 Euro I.V.
 Avvertenze Legali – D. Lgs. 196/03 Tutela dei dati personali. Le informazioni 
 contenute in questo messaggio
 e in ogni eventuale allegato sono riservate e ne è vietata ogni forma di 
 diffusione. Se avete ricevuto questa
 comunicazione per errore, Vi preghiamo di informare immediatamente il 
 mittente del messaggio e di eliminare l'e-mail.



 2013/11/24 Leonardo Pistone leonardo.pist...@camptocamp.com

 I prefer 79 as well.

 I also agree with the pep8 idea of not using backslashes, but using
 Python's implied
  line continuation inside parentheses, brackets and braces.

 OpenERP example:

 'date_order': fields.date(
 'Date', required=True, readonly=True, select=True,
 states={
 'draft': [('readonly', False)],
 'sent': [('readonly', False)]
 }),

 Instead of the long line found in the actual openobject-addons code

 l


 On Sat, Nov 23, 2013 at 4:27 PM, Oscar Alca oszc...@gmail.com wrote:

 http://hg.python.org/peps/rev/fb24c80e9afb#l1.95


 On Fri, Nov 22, 2013 at 10:38 AM, Sebastien Beau 
 sebastien.b...@akretion.com.br wrote:

 Hi
 I also support 79.
 When I start on python I was thinking that 79 was not enough. But now
 every time I read the code of an OpenERP Module that respect pep8. I really
 enjoy it, it's really more readable, so let's stay on 79.


 2013/11/22 Stefan ste...@therp.nl

 On 11/22/2013 05:15 PM, Oscar Alca wrote:

 Hello Raphael I also understand the question why the question was
 rised, also, I do not think that PEP8 Is ambiguous, it says maximum of 
 100
 with effective 99 for code mantained by a team, so, we, as a team, are
 allowed to a maximum of 100.


 Hi Oscar,

 it does not say 'code maintained by a team', it says [maintained] by
 a team that can reach agreement on this issue. And as a member of that
 team, I prefer 79 like Alexandre for now.

 Cheers,
 Stefan

 --
 Therp - Maatwerk in open ontwikkeling

 Stefan Rijnhart - Ontwerp en implementatie

 mail: ste...@therp.nl
 tel: +31 (0) 614478606
 web: http://therp.nl



 ___
 Mailing list: https://launchpad.net/~openerp-community
 Post to : openerp-community@lists.launchpad.net
 Unsubscribe : https://launchpad.net/~openerp-community
 More help   : https://help.launchpad.net/ListHelp



 ___
 Mailing list: https://launchpad.net/~openerp-community
 Post to : openerp-community@lists.launchpad.net
 Unsubscribe : https://launchpad.net/~openerp-community
 More help   : https://help.launchpad.net/ListHelp




 --




 Ing. Oscar Alcalá Rivera
 *312-107-1704 312-107-1704* · oszc...@gmail.com ozc...@gmail.com

 Paseo de Bugambilias 251 · Villa de alvarez, Colima, CP 28978
 Tlf: *312322 312322*

 *Open Source Enthusiast*
  [image: twitter] http://twitter.com/oscarolar [image: 
 linkedIn]http://www.linkedin.com/pub/oscar-alcal%C3%A1/3b/a79/922
[image: Google+] http://plus.google.com/107659954580035981067/posts


 [image: eco] No me imprimas si no es necesario. Protejamos el medio
 ambiente

 ___
 Mailing list: https://launchpad.net/~openerp-community
 Post to : openerp-community@lists.launchpad.net
 Unsubscribe : https://launchpad.net/~openerp-community
 More help   : https://help.launchpad.net/ListHelp



 ___
 Mailing list: https://launchpad.net/~openerp-community
 Post to : openerp-community@lists.launchpad.net
 Unsubscribe : https://launchpad.net/~openerp-community
 More help   : https://help.launchpad.net/ListHelp



 ___
 Mailing list: https://launchpad.net/~openerp-community
 Post to : openerp-community@lists.launchpad.net
 Unsubscribe : https://launchpad.net/~openerp-community
 More help   : https://help.launchpad.net/ListHelp


___
Mailing list: https://launchpad.net/~openerp-community
Post to : openerp-community@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openerp-community
More help   : https://help.launchpad.net/ListHelp


Re: [Openerp-community] Coding Guidlines - long lines

2013-11-23 Thread Oscar Alca
http://hg.python.org/peps/rev/fb24c80e9afb#l1.95


On Fri, Nov 22, 2013 at 10:38 AM, Sebastien Beau 
sebastien.b...@akretion.com.br wrote:

 Hi
 I also support 79.
 When I start on python I was thinking that 79 was not enough. But now
 every time I read the code of an OpenERP Module that respect pep8. I really
 enjoy it, it's really more readable, so let's stay on 79.


 2013/11/22 Stefan ste...@therp.nl

 On 11/22/2013 05:15 PM, Oscar Alca wrote:

 Hello Raphael I also understand the question why the question was rised,
 also, I do not think that PEP8 Is ambiguous, it says maximum of 100 with
 effective 99 for code mantained by a team, so, we, as a team, are allowed
 to a maximum of 100.


 Hi Oscar,

 it does not say 'code maintained by a team', it says [maintained] by a
 team that can reach agreement on this issue. And as a member of that team,
 I prefer 79 like Alexandre for now.

 Cheers,
 Stefan

 --
 Therp - Maatwerk in open ontwikkeling

 Stefan Rijnhart - Ontwerp en implementatie

 mail: ste...@therp.nl
 tel: +31 (0) 614478606
 web: http://therp.nl



 ___
 Mailing list: https://launchpad.net/~openerp-community
 Post to : openerp-community@lists.launchpad.net
 Unsubscribe : https://launchpad.net/~openerp-community
 More help   : https://help.launchpad.net/ListHelp



 ___
 Mailing list: https://launchpad.net/~openerp-community
 Post to : openerp-community@lists.launchpad.net
 Unsubscribe : https://launchpad.net/~openerp-community
 More help   : https://help.launchpad.net/ListHelp




-- 




Ing. Oscar Alcalá Rivera
*312-107-1704* · oszc...@gmail.com ozc...@gmail.com

Paseo de Bugambilias 251 · Villa de alvarez, Colima, CP 28978
Tlf: *312322*

*Open Source Enthusiast*
 [image: twitter] http://twitter.com/oscarolar [image:
linkedIn]http://www.linkedin.com/pub/oscar-alcal%C3%A1/3b/a79/922
   [image: Google+] http://plus.google.com/107659954580035981067/posts

[image: eco] No me imprimas si no es necesario. Protejamos el medio ambiente
___
Mailing list: https://launchpad.net/~openerp-community
Post to : openerp-community@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openerp-community
More help   : https://help.launchpad.net/ListHelp


Re: [Openerp-community] Coding Guidlines - long lines

2013-11-22 Thread Nhomar Hernández
2013/11/22 Alexandre Fayolle alexandre.fayo...@camptocamp.com

 Wait until you age and have problems reading tiny weeny letters :-)

 Yes my code editor wraps lines. The result is not developer friendly,
 because the line breaking is not hand crafted and comes all over the place.

 247 long lines are unmanageable, as your eyes are unable to find the
 beginning of the next line. There is a reason why newspaper print in
 columns and not in page-wide lines. By your argument, it would be easier
 for everyone since most article would only take up 1-5 lines.


TOTALLY agreed with you alex.

Just in my experience, when you must manage 5 consoles at same time, with
vim and other Server tools it is better less long lines.

I can live with 99 or 79 (we are using 99 internally) but 79 is fine.

but honestly at the end of the day, it is subjective, sometimes a longest
line should not stop a merge or can not be see it as brake the rule if it
help in readability.

Sometimes brake the line disturb readability too (but it is the
exception)

Regards.


-- 

Saludos Cordiales

Nhomar G. Hernandez M.
+58-414-4110269
Skype: nhomar00
Web-Blog: http://geronimo.com.ve
Servicios IT: http://vauxoo.com
Linux-Counter: 467724
Correos:
nho...@openerp.com.ve
nho...@vauxoo.com
twitter @nhomar
___
Mailing list: https://launchpad.net/~openerp-community
Post to : openerp-community@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openerp-community
More help   : https://help.launchpad.net/ListHelp


Re: [Openerp-community] Coding Guidlines - long lines

2013-11-22 Thread Alexandre Fayolle
I personnally won't block a MP for a couple of long lines in otherwise 
clean code.

OTOH a files such as account/account.py or account/account_invoice.py 
(not pointing fingers at anyone, just mentionning ones which have been 
bugging me since I started with OpenERP) could do with some gentle 
reformatting and I would probably the author of such a module to 
improve the situation a bit since it is always better to have such 
reformatting done before the merge...

Alexandre


On ven. 22 nov. 2013 09:53:30 CET, Nhomar Hernández wrote:

 2013/11/22 Alexandre Fayolle alexandre.fayo...@camptocamp.com
 mailto:alexandre.fayo...@camptocamp.com

 Wait until you age and have problems reading tiny weeny letters :-)

 Yes my code editor wraps lines. The result is not developer
 friendly, because the line breaking is not hand crafted and comes
 all over the place.

 247 long lines are unmanageable, as your eyes are unable to find
 the beginning of the next line. There is a reason why newspaper
 print in columns and not in page-wide lines. By your argument, it
 would be easier for everyone since most article would only take up
 1-5 lines.


 TOTALLY agreed with you alex.

 Just in my experience, when you must manage 5 consoles at same time,
 with vim and other Server tools it is better less long lines.

 I can live with 99 or 79 (we are using 99 internally) but 79 is fine.

 but honestly at the end of the day, it is subjective, sometimes a
 longest line should not stop a merge or can not be see it as brake
 the rule if it help in readability.

 Sometimes brake the line disturb readability too (but it is the
 exception)

 Regards.


 --
 
 Saludos Cordiales

 Nhomar G. Hernandez M.
 +58-414-4110269
 Skype: nhomar00
 Web-Blog: http://geronimo.com.ve http://geronimo.com.ve/
 Servicios IT: http://vauxoo.com http://vauxoo.com/
 Linux-Counter: 467724
 Correos:
 nho...@openerp.com.ve mailto:nho...@openerp.com.ve
 nho...@vauxoo.com mailto:nho...@vauxoo.com
 twitter @nhomar



--
Alexandre Fayolle
Chef de Projet
Tel : + 33 (0)4 79 26 57 94

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac Cedex
http://www.camptocamp.com


___
Mailing list: https://launchpad.net/~openerp-community
Post to : openerp-community@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openerp-community
More help   : https://help.launchpad.net/ListHelp


Re: [Openerp-community] Coding Guidlines - long lines

2013-11-22 Thread Nhomar Hernández
2013/11/22 Alexandre Fayolle alexandre.fayo...@camptocamp.com

 OTOH a files such as account/account.py or account/account_invoice.py
 (not pointing fingers at anyone, just mentionning ones which have been
 bugging me since I started with OpenERP) could do with some gentle
 reformatting and I would probably the author of such a module to
 improve the situation a bit since it is always better to have such
 reformatting done before the merge...


Agreed


-- 

Saludos Cordiales

Nhomar G. Hernandez M.
+58-414-4110269
Skype: nhomar00
Web-Blog: http://geronimo.com.ve
Servicios IT: http://vauxoo.com
Linux-Counter: 467724
Correos:
nho...@openerp.com.ve
nho...@vauxoo.com
twitter @nhomar
___
Mailing list: https://launchpad.net/~openerp-community
Post to : openerp-community@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openerp-community
More help   : https://help.launchpad.net/ListHelp


Re: [Openerp-community] Coding Guidlines - long lines

2013-11-22 Thread Niels Huylebroeck
 OTOH a files such as account/account.py or account/account_invoice.py
 (not pointing fingers at anyone, just mentionning ones which have been
 bugging me since I started with OpenERP) could do with some gentle
 reformatting and I would probably the author of such a module to
 improve the situation a bit since it is always better to have such
 reformatting done before the merge...


I personally would like it to have commits that change nothing functionally
but do a cleanup, that is something you can more easily verify (and maybe
get accepted in official easier).
Such commits could also be gathered maybe in a community organized branch?

Regards,
Niels
___
Mailing list: https://launchpad.net/~openerp-community
Post to : openerp-community@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openerp-community
More help   : https://help.launchpad.net/ListHelp


Re: [Openerp-community] Coding Guidlines - long lines

2013-11-22 Thread Nhomar Hernández
2013/11/22 Niels Huylebroeck n...@agaplan.eu

 I personally would like it to have commits that change nothing
 functionally but do a cleanup, that is something you can more easily verify
 (and maybe get accepted in official easier).
 Such commits could also be gathered maybe in a community organized branch?


The problem with clean up only is that you lose the LAst technical change
 in the blame history.

IMHO think it is not useful since the begining.




-- 

Saludos Cordiales

Nhomar G. Hernandez M.
+58-414-4110269
Skype: nhomar00
Web-Blog: http://geronimo.com.ve
Servicios IT: http://vauxoo.com
Linux-Counter: 467724
Correos:
nho...@openerp.com.ve
nho...@vauxoo.com
twitter @nhomar
___
Mailing list: https://launchpad.net/~openerp-community
Post to : openerp-community@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openerp-community
More help   : https://help.launchpad.net/ListHelp


Re: [Openerp-community] Coding Guidlines - long lines

2013-11-22 Thread Lionel Sausin

Le 22/11/2013 10:49, Niels Huylebroeck a écrit :
I personally would like it to have commits that change nothing 
functionally but do a cleanup, that is something you can more easily 
verify (and maybe get accepted in official easier).

Such commits could also be gathered maybe in a community organized branch?

Yes, dedicated commits and branches are the way to go for formatting issues.
However Olivier Dony once warned me that this kind of merge can only be 
done in collaboration with the core team, because it will introduce 
conflicts in almost every branch forked before the merge.
Ideally we would need some kind of freeze or dedicated merge window 
between the tagging of a stable version and the beginning of new 
developments on the trunk.


Lionel Sausin.

___
Mailing list: https://launchpad.net/~openerp-community
Post to : openerp-community@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openerp-community
More help   : https://help.launchpad.net/ListHelp


Re: [Openerp-community] Coding Guidlines - long lines

2013-11-22 Thread Raphael Valyi
Guys [0],

just a note of optimism (hey what else would you expect?):
with the new API [1], it will be easier to write shorter lines:
self.pool.get('ruby.rocks') - self.pool['ruby.rocks'] (already available
on v7 in fact)
some_object.some_method(cr, uid, ids, *args, **kw) -
some_object.some_method(ids, *args, **kw)
saving 3 to 7 chars isn't that bad in a 80 line.

Regards.

[0] Ana got caught by the morality police, right?
[1]
https://code.launchpad.net/~openerp-dev/openobject-server/trunk-apiculture


-- 
Raphaël Valyi
Founder and consultant
http://twitter.com/rvalyi http://twitter.com/#!/rvalyi
+55 21 2516 2954
www.akretion.com
___
Mailing list: https://launchpad.net/~openerp-community
Post to : openerp-community@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openerp-community
More help   : https://help.launchpad.net/ListHelp


Re: [Openerp-community] Coding Guidlines - long lines

2013-11-22 Thread Raphael Valyi
On Fri, Nov 22, 2013 at 9:46 AM, Raphael Valyi rva...@gmail.com wrote:

 Guys [0],

 just a note of optimism (hey what else would you expect?):
 with the new API [1], it will be easier to write shorter lines:
 self.pool.get('ruby.rocks') - self.pool['ruby.rocks'] (already available
 on v7 in fact)
 some_object.some_method(cr, uid, ids, *args, **kw) -
 some_object.some_method(ids, *args, **kw)


and in fact when kw is the context, you will also be able to avoid writing
context=context to pass the last argument as it will be available
automatically [0]. So it's even better, finally some Ruby-like
meta-programming magic in that Python explicit is better world...

[0]
http://bazaar.launchpad.net/~openerp-dev/openobject-server/trunk-apiculture/view/head:/openerp/osv/orm.py#L3970


-- 
Raphaël Valyi
Founder and consultant
http://twitter.com/rvalyi http://twitter.com/#!/rvalyi
+55 21 2516 2954
www.akretion.com
___
Mailing list: https://launchpad.net/~openerp-community
Post to : openerp-community@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openerp-community
More help   : https://help.launchpad.net/ListHelp


Re: [Openerp-community] Coding Guidlines - long lines

2013-11-22 Thread Oscar Alca
I don't think that there is a reason to have this discussion, PEP's were
made by a reason indeed, and PEP8 is known by allmost all Python
programmers, so here is the scenario, imagine that in a month from now a
old Python programmer dives into the OpenERP world, is he going to read all
historic data on the mailing lists to catch up with all the things that we
discussed and established?, even if we agree to do it one way or another,
will OpenERP SA publish this on the docs as a guideline?, Python has its
own best practices (known and available to everybody) and OpenERP too,
please do not try to reinvent the wheel.

BTW, I do not want to be rude, it's just my humble opinion.

Regards.


On Fri, Nov 22, 2013 at 5:57 AM, Raphael Valyi rva...@gmail.com wrote:

 On Fri, Nov 22, 2013 at 9:46 AM, Raphael Valyi rva...@gmail.com wrote:

 Guys [0],

 just a note of optimism (hey what else would you expect?):
 with the new API [1], it will be easier to write shorter lines:
 self.pool.get('ruby.rocks') - self.pool['ruby.rocks'] (already available
 on v7 in fact)
 some_object.some_method(cr, uid, ids, *args, **kw) -
 some_object.some_method(ids, *args, **kw)


 and in fact when kw is the context, you will also be able to avoid writing
 context=context to pass the last argument as it will be available
 automatically [0]. So it's even better, finally some Ruby-like
 meta-programming magic in that Python explicit is better world...

 [0]
 http://bazaar.launchpad.net/~openerp-dev/openobject-server/trunk-apiculture/view/head:/openerp/osv/orm.py#L3970


 --
 Raphaël Valyi
 Founder and consultant
 http://twitter.com/rvalyi http://twitter.com/#!/rvalyi
 +55 21 2516 2954
 www.akretion.com



 ___
 Mailing list: https://launchpad.net/~openerp-community
 Post to : openerp-community@lists.launchpad.net
 Unsubscribe : https://launchpad.net/~openerp-community
 More help   : https://help.launchpad.net/ListHelp




-- 




Ing. Oscar Alcalá Rivera
*312-107-1704* · oszc...@gmail.com ozc...@gmail.com

Paseo de Bugambilias 251 · Villa de alvarez, Colima, CP 28978
Tlf: *312322*

*Open Source Enthusiast*
 [image: twitter] http://twitter.com/oscarolar [image:
linkedIn]http://www.linkedin.com/pub/oscar-alcal%C3%A1/3b/a79/922
   [image: Google+] http://plus.google.com/107659954580035981067/posts

[image: eco] No me imprimas si no es necesario. Protejamos el medio ambiente
___
Mailing list: https://launchpad.net/~openerp-community
Post to : openerp-community@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openerp-community
More help   : https://help.launchpad.net/ListHelp


Re: [Openerp-community] Coding Guidlines - long lines

2013-11-22 Thread Raphael Valyi
On Fri, Nov 22, 2013 at 1:52 PM, Oscar Alca oszc...@gmail.com wrote:

 I don't think that there is a reason to have this discussion, PEP's were
 made by a reason indeed, and PEP8 is known by allmost all Python
 programmers, so here is the scenario, imagine that in a month from now a
 old Python programmer dives into the OpenERP world, is he going to read all
 historic data on the mailing lists to catch up with all the things that we
 discussed and established?, even if we agree to do it one way or another,
 will OpenERP SA publish this on the docs as a guideline?, Python has its
 own best practices (known and available to everybody) and OpenERP too,
 please do not try to reinvent the wheel.

 BTW, I do not want to be rude, it's just my humble opinion.

 Regards.



Oscar, again there is this discussion exactly because this is a thing that
became ambiguous in PEP8: was originally 80 chars and now states:
Some teams strongly prefer a longer line length. For code maintained
exclusively or primarily by a team that can reach agreement on this issue,
it is okay to increase the nominal line length from 80 to 100 characters
(effectively increasing the maximum length to 99 characters), provided that
comments and docstrings are still wrapped at 72 characters.
http://www.python.org/dev/peps/pep-0008/

I personally have no strong opinion about the choice, but let's say I
understand why the question was raised.


Regards.


-- 
Raphaël Valyi
Founder and consultant
http://twitter.com/rvalyi http://twitter.com/#!/rvalyi
+55 21 2516 2954
www.akretion.com
___
Mailing list: https://launchpad.net/~openerp-community
Post to : openerp-community@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openerp-community
More help   : https://help.launchpad.net/ListHelp


Re: [Openerp-community] Coding Guidlines - long lines

2013-11-22 Thread Stefan

On 11/22/2013 05:15 PM, Oscar Alca wrote:
Hello Raphael I also understand the question why the question was 
rised, also, I do not think that PEP8 Is ambiguous, it says maximum of 
100 with effective 99 for code mantained by a team, so, we, as a team, 
are allowed to a maximum of 100.


Hi Oscar,

it does not say 'code maintained by a team', it says [maintained] by a 
team that can reach agreement on this issue. And as a member of that 
team, I prefer 79 like Alexandre for now.


Cheers,
Stefan

--
Therp - Maatwerk in open ontwikkeling

Stefan Rijnhart - Ontwerp en implementatie

mail: ste...@therp.nl
tel: +31 (0) 614478606
web: http://therp.nl


___
Mailing list: https://launchpad.net/~openerp-community
Post to : openerp-community@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openerp-community
More help   : https://help.launchpad.net/ListHelp


Re: [Openerp-community] Coding Guidlines - long lines

2013-11-22 Thread Sebastien Beau
Hi
I also support 79.
When I start on python I was thinking that 79 was not enough. But now every
time I read the code of an OpenERP Module that respect pep8. I really enjoy
it, it's really more readable, so let's stay on 79.


2013/11/22 Stefan ste...@therp.nl

 On 11/22/2013 05:15 PM, Oscar Alca wrote:

 Hello Raphael I also understand the question why the question was rised,
 also, I do not think that PEP8 Is ambiguous, it says maximum of 100 with
 effective 99 for code mantained by a team, so, we, as a team, are allowed
 to a maximum of 100.


 Hi Oscar,

 it does not say 'code maintained by a team', it says [maintained] by a
 team that can reach agreement on this issue. And as a member of that team,
 I prefer 79 like Alexandre for now.

 Cheers,
 Stefan

 --
 Therp - Maatwerk in open ontwikkeling

 Stefan Rijnhart - Ontwerp en implementatie

 mail: ste...@therp.nl
 tel: +31 (0) 614478606
 web: http://therp.nl



 ___
 Mailing list: https://launchpad.net/~openerp-community
 Post to : openerp-community@lists.launchpad.net
 Unsubscribe : https://launchpad.net/~openerp-community
 More help   : https://help.launchpad.net/ListHelp

___
Mailing list: https://launchpad.net/~openerp-community
Post to : openerp-community@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openerp-community
More help   : https://help.launchpad.net/ListHelp


Re: [Openerp-community] Coding Guidlines - long lines

2013-11-17 Thread Marc Pierlot
Bonjour,

Serait il possible de ne plus n envoyer de Email de Open ERP Merci de votre
compréhension.

Bien à vous.


2013/11/16 Alexandre Fayolle alexandre.fayo...@camptocamp.com

 As someone who regularly has to work on a laptop with a not gigantic
 screen, and with an eyesight which does not really give me the chance to
 configure the fontsize of my code editor to ridiculously tiny, I'd
 really appreciate if we could stick to 79 cols as much as possible,
 which enables me to compare two buffers side by side.

 The source base of OpenERP is full of places where this width is
 exceeded and it makes the life of people working on 17 screens
 difficult for no good reasons imo.

 Code is meant to be read by humans, and chaining calls on lines does not
 improve readability.

 Kind regards,

 Alexandre

 On 15/11/2013 14:00, Quentin THEURET wrote:
  Hello,
 
  Le ven. 15 nov. 2013 13:53:19 CET, Pedro Manuel Baeza Romero a écrit :
  I remember a discussion in this way, taking the decission of stay in 79
  chars, but correct me if I am wrong.
  I don't remember a taken decsion of stay in 79 chars, but, IMHO, it is
  more simpler to check the PEP8 compliance of the code by using already
  existing tools. These tools are configured (by default) with 79 chars
  as line length.
 
  So, the rule of 79 chars by line is IMO the best.
 
  But, I think we should take a decision about that to clarify the
  situation.
 
  Regards,
  --
  Quentin THEURET
 
  TeMPO Consulting
  9, rue du Parc
  67205 Oberhausbergen
  France
 
  http://www.tempo-consulting.fr
  Tel : +33 3 88 56 82 18
  Fax : +33 3 88 56 46 64
 
  ___
  Mailing list: https://launchpad.net/~openerp-community
  Post to : openerp-community@lists.launchpad.net
  Unsubscribe : https://launchpad.net/~openerp-community
  More help   : https://help.launchpad.net/ListHelp


 --
 Alexandre Fayolle
 Chef de Projet
 Tel : + 33 (0)4 79 26 57 94

 Camptocamp France SAS
 Savoie Technolac, BP 352
 73377 Le Bourget du Lac Cedex
 http://www.camptocamp.com


 ___
 Mailing list: https://launchpad.net/~openerp-community
 Post to : openerp-community@lists.launchpad.net
 Unsubscribe : https://launchpad.net/~openerp-community
 More help   : https://help.launchpad.net/ListHelp

___
Mailing list: https://launchpad.net/~openerp-community
Post to : openerp-community@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openerp-community
More help   : https://help.launchpad.net/ListHelp


Re: [Openerp-community] Coding Guidlines - long lines

2013-11-16 Thread Alexandre Fayolle
As someone who regularly has to work on a laptop with a not gigantic
screen, and with an eyesight which does not really give me the chance to
configure the fontsize of my code editor to ridiculously tiny, I'd
really appreciate if we could stick to 79 cols as much as possible,
which enables me to compare two buffers side by side.

The source base of OpenERP is full of places where this width is
exceeded and it makes the life of people working on 17 screens
difficult for no good reasons imo.

Code is meant to be read by humans, and chaining calls on lines does not
improve readability.

Kind regards,

Alexandre

On 15/11/2013 14:00, Quentin THEURET wrote:
 Hello,

 Le ven. 15 nov. 2013 13:53:19 CET, Pedro Manuel Baeza Romero a écrit :
 I remember a discussion in this way, taking the decission of stay in 79
 chars, but correct me if I am wrong.
 I don't remember a taken decsion of stay in 79 chars, but, IMHO, it is 
 more simpler to check the PEP8 compliance of the code by using already 
 existing tools. These tools are configured (by default) with 79 chars 
 as line length.

 So, the rule of 79 chars by line is IMO the best.

 But, I think we should take a decision about that to clarify the 
 situation.

 Regards,
 --
 Quentin THEURET

 TeMPO Consulting
 9, rue du Parc
 67205 Oberhausbergen
 France

 http://www.tempo-consulting.fr
 Tel : +33 3 88 56 82 18
 Fax : +33 3 88 56 46 64

 ___
 Mailing list: https://launchpad.net/~openerp-community
 Post to : openerp-community@lists.launchpad.net
 Unsubscribe : https://launchpad.net/~openerp-community
 More help   : https://help.launchpad.net/ListHelp


-- 
Alexandre Fayolle
Chef de Projet
Tel : + 33 (0)4 79 26 57 94

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac Cedex
http://www.camptocamp.com


___
Mailing list: https://launchpad.net/~openerp-community
Post to : openerp-community@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openerp-community
More help   : https://help.launchpad.net/ListHelp


[Openerp-community] Coding Guidlines - long lines

2013-11-15 Thread Markus Schneider
Hi everyone

we start submitting our develop modules upstream to community branch.

We read http://pad.openerp.com/p/community-review carefully and on point
is not clear and should be discuss

E501 (long line) Problem on flake8 output.

If you be strict you have 79 chars - 4 space (for class) - 4 space (for
function) = 71 chars left for code.
On the other side i don't want long lines.

In my guess there should a little bit more freedom and a line length in
for all.

Strict code formating is fine, we know it form other open source projects.

So we should now discuss and decide the line length if we stay on 79
default or use a other one.

Greetings

Markus

-- 
Dipl.-Comp.-Math. Markus Schneider
Softwareentwickler

initOS GmbH  Co. KG
An der Eisenbahn 1
21224 Rosengarten

Mobil:   +49 (0)172 2303699
Phone:   +49 (0)4105 5615613
Fax: +49 (0)4105 5615610

Email:   markus.schnei...@initos.com
Web: http://www.initos.com

Geschäftsführung:
Dipl. Wirt.-Inf. Frederik Kramer  Dipl.-Ing. (FH) Torsten Francke
Haftende Gesellschafterin: initOS Verwaltungs GmbH

Sitz der Gesellschaft: Rosengarten – Klecken
Amtsgericht Tostedt, HRA 201840
USt-IdNr: DE 275698169
Steuer-Nr: 15/205/21402

___
Mailing list: https://launchpad.net/~openerp-community
Post to : openerp-community@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openerp-community
More help   : https://help.launchpad.net/ListHelp


Re: [Openerp-community] Coding Guidlines - long lines

2013-11-15 Thread Nhomar Hernández
2013/11/15 Markus Schneider markus.schnei...@initos.com

 Strict code formating is fine, we know it form other open source projects.

 So we should now discuss and decide the line length if we stay on 79
 default or use a other one.


PEP8 allow now 99 (since something like 3 month), for me is fine longer
(even we change our internal policy due to this point).

Longer than that for me is difficult to read,

Advantage and disadvantage:

79 allow you verify sidebyside code with vim without brake lines.

99 low you shorter files.

Regards.


-- 

Saludos Cordiales

Nhomar G. Hernandez M.
+58-414-4110269
Skype: nhomar00
Web-Blog: http://geronimo.com.ve
Servicios IT: http://vauxoo.com
Linux-Counter: 467724
Correos:
nho...@openerp.com.ve
nho...@vauxoo.com
twitter @nhomar
___
Mailing list: https://launchpad.net/~openerp-community
Post to : openerp-community@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openerp-community
More help   : https://help.launchpad.net/ListHelp


Re: [Openerp-community] Coding Guidlines - long lines

2013-11-15 Thread Pedro Manuel Baeza Romero
Sorry, in some moment, I lose openerp-community list CC. I include it again.

---

I think the key is in this paragraph:

Some teams strongly prefer a longer line length. For code maintained
exclusively or primarily by a team that can reach agreement on this issue,
it is okay to increase the nominal line length from 80 to 100 characters
(effectively increasing the maximum length to 99 characters), provided that
comments and docstrings are still wrapped at 72 characters.

It says that if the team decides in this manner.

I remember a discussion in this way, taking the decission of stay in 79
chars, but correct me if I am wrong.

Regards.


2013/11/15 Nhomar Hernández nho...@gmail.com


 2013/11/15 Pedro Manuel Baeza Romero pedro.ba...@gmail.com

 As long as I know, the 99 line-length is an expansion, or a PEP8 expanded
 (or relaxed) form, but the convention still remains on 79. Doesn't it?

 Regards.


 It change little time ago.

 http://hg.python.org/peps/rev/fb24c80e9afb

 specific topic:

 http://hg.python.org/peps/rev/fb24c80e9afb#l1.98

 Compiled-:

 http://www.python.org/dev/peps/pep-0008/



 --
 
 Saludos Cordiales

 Nhomar G. Hernandez M.
 +58-414-4110269
 Skype: nhomar00
 Web-Blog: http://geronimo.com.ve
 Servicios IT: http://vauxoo.com
 Linux-Counter: 467724
 Correos:
 nho...@openerp.com.ve
 nho...@vauxoo.com
 twitter @nhomar

___
Mailing list: https://launchpad.net/~openerp-community
Post to : openerp-community@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openerp-community
More help   : https://help.launchpad.net/ListHelp


Re: [Openerp-community] Coding Guidlines - long lines

2013-11-15 Thread Pedro Manuel Baeza Romero
Of course, everything can be improved, even the documentation! We are still
madurating, so there may still be things not fine-tuned. You can also make
an MP to improve this documentation on
https://code.launchpad.net/~openerp-community/openobject-doc/v7.0.

Thanks for your interest.

Regards.


2013/11/15 Markus Schneider markus.schnei...@initos.com

 hi,

 On 15.11.2013 12:42, Pedro Manuel Baeza Romero wrote:
  I remember a discussion in this way, taking the decission of stay in 79
  chars, but correct me if I am wrong.

 If a decission was made, then you should link the the email from archive
 to http://pad.openerp.com/p/community-review and have no open question
 there

 To grow the community thinks should be clear and it should be easy to
 make your first submission and get part of the community.

 So updating

 https://doc.openerp.com/contribute/02_working_in_teams/#community-contributor-teams
 Should be important, to find the right branch and a guidelines how to
 submit code.

 Greetings

 Markus

 --
 Dipl.-Comp.-Math. Markus Schneider
 Softwareentwickler

 initOS GmbH  Co. KG
 An der Eisenbahn 1
 21224 Rosengarten

 Mobil:   +49 (0)172 2303699
 Phone:   +49 (0)4105 5615613
 Fax: +49 (0)4105 5615610

 Email:   markus.schnei...@initos.com
 Web: http://www.initos.com

 Geschäftsführung:
 Dipl. Wirt.-Inf. Frederik Kramer  Dipl.-Ing. (FH) Torsten Francke
 Haftende Gesellschafterin: initOS Verwaltungs GmbH

 Sitz der Gesellschaft: Rosengarten – Klecken
 Amtsgericht Tostedt, HRA 201840
 USt-IdNr: DE 275698169
 Steuer-Nr: 15/205/21402

___
Mailing list: https://launchpad.net/~openerp-community
Post to : openerp-community@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openerp-community
More help   : https://help.launchpad.net/ListHelp


Re: [Openerp-community] Coding Guidlines - long lines

2013-11-15 Thread Quentin THEURET
Hello,

Le ven. 15 nov. 2013 13:53:19 CET, Pedro Manuel Baeza Romero a écrit :

 I remember a discussion in this way, taking the decission of stay in 79
 chars, but correct me if I am wrong.

I don't remember a taken decsion of stay in 79 chars, but, IMHO, it is 
more simpler to check the PEP8 compliance of the code by using already 
existing tools. These tools are configured (by default) with 79 chars 
as line length.

So, the rule of 79 chars by line is IMO the best.

But, I think we should take a decision about that to clarify the 
situation.

Regards,
--
Quentin THEURET

TeMPO Consulting
9, rue du Parc
67205 Oberhausbergen
France

http://www.tempo-consulting.fr
Tel : +33 3 88 56 82 18
Fax : +33 3 88 56 46 64

___
Mailing list: https://launchpad.net/~openerp-community
Post to : openerp-community@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openerp-community
More help   : https://help.launchpad.net/ListHelp