Changes between Initial Version and Version 1 of DevGuide


Ignore:
Timestamp:
Mar 31, 2014, 9:02:35 PM (10 years ago)
Author:
Ryan J Ollos
Comment:

Just a start, but hopefully it gain some momentum.

Legend:

Unmodified
Added
Removed
Modified
  • DevGuide

    v1 v1  
     1[[PageOutline(2-5,Contents,pullout)]]
     2= Plugin Development Guide
     3
     4This document captures some best practices and guidelines for plugin development. It is a community driven document, and everyone is encouraged to contribute to it. If you have questions or comments, please raise them on the [trac:MailingList].
     5
     6== License
     7
     8Plugin authors are encouraged to clearly indicate how the contribution is licensed. This is important for both users and future !developers of your plugin. Having a clearly defined license allows someone else to adopt and carry on development of the plugin if you choose to no longer support it. It is also important for users and administrators who need to understand the terms and conditions under which they can use or modify the code.
     9
     10Trac-Hacks is an open source community driven by voluntary contributions and made successful by collaboration. Therefore we encourage the use of licenses that foster collaboration and minimal restrictions on future use of the code. Trac has adopted the [trac:TracLicense BSD 3-Clause license], and use of the same license in any plugin code is encouraged. One of the many benefits to adopting this license is that any plugin code can potentially be integrated into the Trac core down the road.
     11
     12The following steps are suggeted:
     13 1. Add the `license` keyword in `setup.py` ([browser:/plantumlmacro/trunk/setup.py@11477:22 example]).
     14 1. Add a license header to every Python source file ([browser:/plantumlmacro/trunk/plantuml/macro.py@11477:1-9 example]).
     15 {{{#!python
     16# -*- coding: utf-8 -*-
     17#
     18# Copyright (C) your name here <your email here>
     19# All rights reserved.
     20#
     21# This software is licensed as described in the file COPYING, which
     22# you should have received as part of this distribution.
     23}}}
     24 1. Add a license header to every HTML template (example: TBD).
     25 {{{#!text/html
     26<!--!
     27  Copyright (C) your name here <your email here>
     28  All rights reserved.
     29
     30  This software is licensed as described in the file COPYING, which
     31  you should have received as part of this distribution.
     32-->
     33}}}
     34 The use of the XML comment marker as shown is important so that the text does not get rendered to the output. Make sure not to use the alternate form, which is rendered to the output as a hidden comment: `<!-- This is also a comment -->`
     35 1. Add a `COPYING` file with the license text in the top-level directory of the project ([browser:/plantumlmacro/trunk/COPYING example]).
     36 {{{#!comment Uncomment when #11658 is resolved.
     37 1. Add an appropriate tag to the wiki page: [tag:bsd-license], [tag:apache-license], [tag:gpl-license], [lgpl-license], [tag:mit-license]. Additional tags can be created for additional or more descriptive license types.
     38}}}
     39
     40Currently it is not recommended to add license text to static resources (i.e. file in `htdocs`), since doing so will increase the size of the content that is sent to the client. This issue will be addressed in the Trac core when support is added for minimization (trac:#10672).
     41
     42== Coding Style
     43
     44Authors are encouraged to conform to the [trac:TracDev/CodingStyle Trac Style Guide] and [http://legacy.python.org/dev/peps/pep-0008/ PEP-0008 style guide].
     45