source: narcissusplugin/0.11/README.txt

Last change on this file was 7626, checked in by chai_research, 14 years ago

Initial import from the mercurial repository http://vandor.it.usyd.edu.au/hg/narcissus-plugin/

File size: 5.7 KB
RevLine 
[7626]1 Trac Narcissus Plugin
2---------------------
3
4Description
5===========
6
7Narcissus is a plugin for Trac that provides an interactive visualisation
8for mirroring the activities of small groups over a period of months.
9The activities are measured differently for each resource. Contributions to
10the wiki and Subversion repository are measured according to the number of
11added lines. Tickets are scored according to the type of activity, such as
12creating, accepting, and resolving tickets, as well as adding comments at
13different stages of the task.
14
15Users have the ability to control the value placed in each activity. The
16underlying measures of the visualisations are very simple; it is important
17that this is clear to the users.
18
19
20Requirements
21============
22
23The narcissus plugin requires the Python Imaging Library (PIL) to
24produce PNG images, and must be installed on your system. It can
25be downloaded from http://www.pythonware.com/products/pil.
26
27
28Optional requirements
29=====================
30
31Any TrueType font may be used for the narcissus visualisations. Microsoft's
32TrueType core fonts can be downloaded from http://corefonts.sourceforge.net/
33for Linux and from http://web.nickshanks.com/typography/corefonts for Mac
34or Windows systems.
35
36
37Installation via Source
38=======================
39
40The installation of the narcissus plugin from source is done by
41creating a Python egg distribution file and copying the .egg file to
42the Trac plugins directory. Detailed information on Python eggs can be
43found at http://peak.telecommunity.com/DevCenter/PythonEggs. In
44addition, the Easy Install package is required to create Python
45eggs. See http://peak.telecommunity.com/DevCenter/EasyInstall for more
46information on using and installing Easy Install.
47
48Checkout the source code for the narcissus plugin from:
49http://praxis.it.usyd.edu.au/svn/kim/hons/Project/narcissus-plugin
50
51Change to the narcissusplugin/0.10 directory and run:
52
53python setup.py bdist_egg
54
55This will generate a python egg in the dist directory. Copy the egg
56file into the trac/plugins directory and follow the Configuration
57steps outlined below.
58
59We are currently looking at adding the narcissus plugin to the
60swapoff repository hosted by http://trac-hacks.org/ in the future,
61as the plugin matures.
62
63Configuration
64=============
65
66Once the narcissus plugin has been installed either via source or via a
67python egg, some configuration is needed before it can be used.
68
69A new section called narcissus should be added to the conf/trac.ini
70file with these fields:
71
72cache_dir - The directory that will be used to cache the
73            generated images.
74
75cache_manager - If this entry exists in the configuration file,
76            then the cache management logic will be invoked
77            and the cache_max_size, cache_min_size,
78            cache_max_count and cache_min_count must be
79            defined.
80
81cache_max_size - The maximum size in bytes that the cache should
82            consume. This is the high watermark for disk space
83            used.
84
85cache_min_size - When cleaning out the cache, remove files until
86            this size in bytes is used by the cache. This is
87            the low watermark for disk space used.
88
89cache_max_count - The maximum number of files that the cache should
90            contain. This is the high watermark for the directory
91            entry count.
92
93ttf_path - The path (including directory and filename) of the
94            TrueType font to be used for visualisation. Optional.
95
96The cache_dir directory must exist and the Trac server must have read
97and write access.
98
99The cache manager is an attempt at keeping the cache directory under
100control. This is experimental code that may cause more problems than
101it fixes. The cache manager will be invoked only if a new Narcissus
102image is to be produced. If the image can be loaded from the cache,
103then the cache manager shouldn't need to run. This should minimize the
104I/O performance impact on the trac server. When the cache manager
105determines that it should clean up the cache, it will delete files
106based on the file access time. The files that were least accessed will
107be deleted first.
108
109Note: it is also recommended that the restrict_owner field under the
110ticket section of the configuration file should be set to true, in
111order to get the most out of the ticket view of the visualisation:
112
113[ticket]
114restrict_owner = true
115
116
117Configuration Example
118+++++++++++++++++++++
119
120Here is a sample narcissus section:
121
122[narcissus]
123cache_dir = /tmp/trac/htdocs/narcissus
124cache_manager = yes
125cache_max_size = 10000000
126cache_min_size = 5000000
127cache_max_count = 2000
128cache_min_count = 1500
129ttf_path = /usr/share/fonts/truetype/msttcorefonts/arial.ttf
130
131Note: /tmp may be cleaned after reboot depending on your platform and
132system preferences, which implies that the cache directory would need
133to be recreated after a reboot if it has been set to the above example.
134
135The cache manager is turned on since there is an entry in the narcissus
136section called cache_manager. The value doesn't matter. To turn off
137the cache manager, simply comment out the cache_manager entry.
138
139When the size of all the files in the cache directory exceeds
14010,000,000 bytes or the number of files in the cache directory exceeds
1412,000, then files are deleted until the size is less than 5,000,000
142bytes and the number of files is less than 1,500.
143
144Here's the same example but for Windows systems:
145
146[narcissus]
147cache_dir = C:\projects\plugins\env\trac\htdocs\narcissus
148cache_manager = yes
149cache_max_size = 10000000
150cache_min_size = 5000000
151cache_max_count = 2000
152cache_min_count = 1500
153ttf_path = C:\windows\fonts\arial.ttf
154
155
156Contributors
157============
158
159Some of the source code in the narcissus plugin was adapted from:
160
161 * Trac/Timeline.py, Copyright (c) Edgewall Software
162 * The graphviz plugin, Copyright (c) Peter Kropf
163 * The peerreview plugin, Copyright (C) Team5
164 
165Many thanks to Trent Apted for random smatterings of help and advice.
Note: See TracBrowser for help on using the repository browser.