Development

Tools

Taboot uses what is becoming a pretty standard and a quite simple toolset.

Required Tools

  1. python - The python programming language
  2. distutils - Python building and packaging library
  3. git - Source code management
  4. Func - The Fedora Unified Network Controller
  5. an editor or ide that doesn’t suck

Optional Tools

These should be available via your package manager:

  1. rpm-build - Should be packaged in your RPM distribution
  2. pep8 - Check your patches for pep8 compliance with make pep8

Source

You can clone the repo via git through the following command::

$ git clone git://git.fedorahosted.org/Taboot.git

PEP 0008 should be followed. This outlines the highlights that we require above and beyond. Your code must follow this (or note why it can’t) before patches will be accepted.

  • global variables should be in ALLCAPPS

  • attributes should be all lowercase

  • classes should be CamelCased, filenames should be lowercase.

  • functions and methods should be lowercase with spaces replaced with _’s:

    def a_test_method(self):
        pass
    
  • classes should subclass object unless it subclasses a different object:

    class Person(object):
        pass
    
    class Steve(Person):
        pass
    
  • 4 spaces per indent level

  • max length is 79 chars.

  • single quotes preferred over double quotes.

  • avoid from x import * imports unless a must use

  • modules, functions, classes, and methods all must have docstrings - doc strings should be descriptive of what objects, functions, and methods do

  • document any potentially confusing sections of code

  • functions and methods should be broken down in such a way as to be easily understood and self contained

  • use descriptive variable names, only use things like x, y, etc.. when doing integer loops and even then see if you can use more descriptive names

Note

The Makefile included in the root of the source distribution includes a target called pep8. Run make pep8 to automatically scan the taboot/ subdirectory for violations.

Git

The best way to develop on Taboot is to branch feature sets. For instance, if you were to add xml deserialization you would want to branch locally and work on that branch.:

  $  git branch
* master
  $ git status
  # On branch master
  nothing to commit (working directory clean)
  $ git branch xmldeserialization
  $ git checkout xmldeserialization

Now we pretend you are all finished and have done at least one commit to the xmldeserialization branch.:

$ git-format-patch master
0001-created-initial-classes.patch
0002-added-in-documentation.patch
$

You now have patch sets which you can send in for perusal and acceptance. Open a new ticket in our issue tracker or attach them to an existing ticket.

Table Of Contents

This Page