FIFE forums

FIFE Development => Framework development => Topic started by: CheeseSucker on September 20, 2009, 05:02:44 pm

Title: Python coding standards
Post by: CheeseSucker on September 20, 2009, 05:02:44 pm
This is just a post to notify you that we now have a coding standard for our python assets:
https://github.com/fifengine/fifengine/wiki/Python-coding-standards (https://github.com/fifengine/fifengine/wiki/Python-coding-standards)

If you have comments on the article, post them here.
Title: Re: Python coding standards
Post by: ShaXbee on October 20, 2009, 09:24:59 am
Hello,

I'm lurking around Framework development forum for some time and just want to ask if i can adapt python coding guidelines for project I'm working in?
Title: Re: Python coding standards
Post by: mvBarracuda on October 20, 2009, 09:41:06 am
Sure go ahead, I don't think that anyone would be angry about that. If you're posting them at some public place (wiki, forums, etc.) it would be great if you could add a little note. Something like "these coding standards have been inspired by <link to our python coding standards>".
Title: Re: Python coding standards
Post by: ShaXbee on October 21, 2009, 07:20:46 am
Thanks. Of course i'll add note about source.

Edit:
Article is here: http://trac.eu07.pl/eu07-spt/wiki/PythonCodingGuidelines

Few possible problems in coding guidelines:
Title: Re: Python coding standards
Post by: phoku on October 21, 2009, 10:32:13 am
Hi there,

I honestly think you should head over to the PEP008 (http://www.python.org/dev/peps/pep-0008/) first.
That's where most of our guidelines were inspired from.

Regarding UnitTests, we have a bit of a problem there as the code in question (mostly) is ...


... and those are difficult to test.

As a documentation generator we use epydoc, another great tool is sphinx.
Django uses it - and well it's docs are awesome(1).

Good luck with your project :-)

-phoku

(1) http://docs.djangoproject.com/en/dev/

Title: Re: Python coding standards
Post by: ShaXbee on October 22, 2009, 07:29:20 am
Hello phoku,

I honestly think you should head over to the PEP008 (http://www.python.org/dev/peps/pep-0008/) first.
That's where most of our guidelines were inspired from.
I know the PEP8, but were to lazy to shorten it to one document :)

As a documentation generator we use epydoc, another great tool is sphinx.
Django uses it - and well it's docs are awesome(1).
It's hard to disagree that sphinx documentation is great but it requires learning Yet Another Markup Languge (RST in this case) apart from Wiki syntax :) Because ATM most of interfaces are written in C++ we use doxygen. I dont have idea how to document Python wrappers, maybe you can share some thoughts?

Good luck with your project :-)
Thanks, FIFE and PyChan are success stories and encourage me to work on project ;) I hope that i'll find some time for FIFE development too in near future.
Title: Re: Python coding standards
Post by: prock on October 22, 2009, 07:45:59 pm
Thanks, FIFE and PyChan are success stories and encourage me to work on project ;) I hope that i'll find some time for FIFE development too in near future.

I hope so also  ;D
Title: Re: Python coding standards
Post by: emilhem on March 14, 2016, 09:39:17 am
http://wiki.fifengine.net/Python_coding_standards (http://wiki.fifengine.net/Python_coding_standards)
Make sure to update the link.
The correct one is: https://github.com/fifengine/fifengine/wiki/Python-coding-standards (https://github.com/fifengine/fifengine/wiki/Python-coding-standards)
Title: Re: Python coding standards
Post by: prock on March 14, 2016, 10:25:11 am
Thanks for the pointer emilhem.  Link has been updated.