Thuban

 

Patch Submission Guideline

To make the code more maintainable in the context of Thuban and to make it easier for us to review patches, please try to follow the style and practices used in the code already there.
  • All lines should be at most 79 characters long.
  • Put spaces around binary operators and after commas, colons and semicolons (but not before them).
  • Every class, function and method should have a doc string. The doc string should start with a brief one-line description of the class or method. If more explanations are needed add an empty line and one or more paragraphs.
  • New functionality and bug fixes should have corresponding tests in the test suite.
  • Changes should be documented in the ChangeLog file
  • Do not use "from module import *"

    This form of the import statement leads to code that is hard to maintain for several reasons:

    • If the module's contents change the names bound in the code that executes the import statement change as well and might accidentally override python builtins or names already bound in the module
    • It's hard to find out which of the objects in the imported module are actually used by the importing code. It's especially hard to find out whether the import is still needed if the code has changed.

    "from wxPython.wx import *" is tolerable, but I try to avoid that too.

  • Thuban has to be compatible with Python 2.2, so avoid features only present in newer versions.
  • Try to submit small patches. Smaller patches are easier to understand, take less time to review and are therefore much more likely to be applied quickly.

2004/02/16

Info
Homepage
Screenshots
Concept
Roadmap
Documentation
License
ChangeLog
Download
SVN
Mailing Lists
Problem Tracker
Mini-Payments

Commercial Support
About
   
News

Archive
   
Exits
Python
wxPython
FreeGIS
   
Thuban Project Team <thuban@intevation.de>
These pages are hosted by Intevation GmbH.