FIFE Development > Framework development

Python coding standards

(1/2) > >>

CheeseSucker:
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

If you have comments on the article, post them here.

ShaXbee:
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?

mvBarracuda:
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>".

ShaXbee:
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:

* What about maximal line length? Do you limit it to 79 characters same as in PEP8?
* Your coding guidelines says little about unit tests - how they are implemented? In seperate files or in same file?
* What documentation generator is used? Tags in docstrings aren't explained.

phoku:
Hi there,

I honestly think you should head over to the PEP008 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 ...


* The Editor
* The Gui Library
... 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/

Navigation

[0] Message Index

[#] Next page

Go to full version