Project

General

Profile

Headers and footers

Header

Please, use the following template for ALL the files include in PoTrA, modify the required fields as needed.

#!/usr/bin/env python
#
# File:      filename
# Authors:   John Smith <john.smith@bsc.es>
#            Peter Pan <peter.pan@bsc.es>      
#
# Copyright (c) 2012 Barcelona Supercomputing Center {{{
#
# This file is part of PoTrA.
#
# PoTrA is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# PoTrA is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with PoTrA.  If not, see <http://www.gnu.org/licenses/>.
#
# This copyright notice must be reproduced on each copy, or partial 
# copy, of this software.
#  
# }}}
#
# Subversion info {{{
# $Id$
# $Date$
# $Author$
# $Revision$
# $HeadURL$
# }}}
#

""" 
DOCSTRING
""" 

# Built-in modules

# Third party modules

# Own modules

__author__ = "John Smith, Peter Pan" 
__copyright__ = "Copyright 2012, Barcelona Supercomputing Center" 
__credits__ = ["John Smith", "Peter Pan", "Helpful person"]
__license__ = "GPL" 
__version__ = "0.0.1" 
__maintainer__ = "John Smith" 
__email__ = "john.smith@bsc.es" 
__status__ = "Development" # "Prototype", "Development", or "Production" 

Notice that we also automatically add subversion information in the file. To do that, when you add the file to the subversion repository the property svn:keywords of the file should contain, at least, the following: Id Date Author Revision HeadURL values. To avoid manually setting that property for all the files, you can configure subversion to automatically set up them for you. This is done by setting the enable-auto-props option plus editing the [auto-props] section of your ~/.subversion/config file. Here there is an example:

### Section for configuring automatic properties.
[auto-props]
### The format of the entries is:
###   file-name-pattern = propname[=value][;propname[=value]...]
### The file-name-pattern can contain wildcards (such as '*' and
### '?').  All entries which match (case-insensitively) will be
### applied to the file.  Note that auto-props functionality
### must be enabled, which is typically done by setting the
### 'enable-auto-props' option.
*.c    = svn:eol-style=native;svn:keywords=Id Date Author Revision HeadURL
*.cpp  = svn:eol-style=native;svn:keywords=Id Date Author Revision HeadURL
*.h    = svn:eol-style=native;svn:keywords=Id Date Author Revision HeadURL
*.sh   = svn:eol-style=native;svn:executable;svn:keywords=Id Date Author Revision HeadURL
*.py   = svn:eol-style=native;svn:executable;svn:keywords=Id Date Author Revision HeadURL
*.tmpl = svn:eol-style=native;svn:keywords=Id Date Author Revision HeadURL
*.txt  = svn:eol-style=native;svn:keywords=Id Date Author Revision HeadURL
*.png  = svn:mime-type=image/png
*.jpg  = svn:mime-type=image/jpeg
Makefile = svn:eol-style=native;svn:keywords=Id Date Author Revision HeadURL

Footer

Sometimes, we use VIM for quickly editing files, although our development IDE is Eclipse. Please also include the following footer in all the files.

# vim:set ts=4 sw=4 tw=80 cino=t0 cms=#\ %s foldmethod=marker expandtab: