Skip to content

Commit 92bb04e

Browse files
committed
Doc updates for customizing.txt, start of index generation
customizing.txt: fix doc on schema.py. Documented obsolete db schema declaration/initial data method. doc on config.ini is incomplete. doc as such. Add doc for [rdbms]: backend, cache_size, sqlite_timeout document Interval schema type. Also change formatting for list of schema types to description list from regular list so types are more visible. add link to roundup wiki for schema chnge examples. fix formatting for postfix config. document Rest Access and Xmlrpc Access permissions; change classic schema.py example to include them. doc db/backend_name as obsolete, conf.py [rdbms] backend used instead. start adding index references conf.py: update copyright year index.txt: add link to genindex.html. _templates/layout.html: change code to make index output work. Not sure what the change does, just monkey pasting from sphinx basic/layout.html
1 parent e658a1f commit 92bb04e

File tree

4 files changed

+90
-40
lines changed

4 files changed

+90
-40
lines changed

doc/_templates/layout.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,11 +161,13 @@ <h3>{{ _('Quick search') }}</h3>
161161
{{ sidebar() }}
162162
</div>
163163
</div>
164+
{%- block content %}
164165
<div class="content">
165166
{{ relbar('related-top') }}
166-
{{ body }}
167+
{% block body %} {% endblock %}
167168
{{ relbar('related-bottom') }}
168169
</div>
170+
{%- endblock %}
169171
{%- block footer %}
170172
<div class="footer">
171173
{%- if hasdoc('copyright') %}

doc/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868

6969
# General information about the project.
7070
project = u'Roundup'
71-
copyright = u'2009-2016, Richard Jones, Roundup-Team'
71+
copyright = u'2009-2020, Richard Jones, Roundup-Team'
7272

7373
# The version info for the project you're documenting, acts as replacement for
7474
# |version| and |release|, also used in various other places throughout the

doc/customizing.txt

Lines changed: 81 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ initial_data.py Holds any data to be entered into the database when the
4646
tracker is initialised.
4747
db/ Holds the tracker's database
4848
db/files/ Holds the tracker's upload files and messages
49-
db/backend_name Names the database back-end for the tracker
49+
db/backend_name Names the database back-end for the tracker (obsolete).
50+
Current way uses the ``backend`` setting in the rdbms
51+
section of config.ini.
5052
detectors/ Auditors and reactors for this tracker
5153
extensions/ Additional actions and `templating utilities`_
5254
html/ Web interface templates, images and style sheets
@@ -66,6 +68,8 @@ schema`_. Some configuration is also performed using permissions - see the
6668
automatically register through the email interface, you must grant the
6769
"Anonymous" Role the "Email Access" Permission.
6870

71+
.. index:: configuration; sections
72+
6973
The following is taken from the `Python Library Reference`__ (July 18, 2018)
7074
section "ConfigParser -- Configuration file parser":
7175

@@ -90,8 +94,12 @@ section "ConfigParser -- Configuration file parser":
9094

9195
__ https://docs.python.org/2/library/configparser.html
9296

93-
Example configuration settings are below.
97+
Example configuration settings are below. This is a partial
98+
list. Documentation on all the settings is included in the
99+
``config.ini`` file.
94100

101+
.. index:: configuration; sections main
102+
95103
Section **main**
96104
database -- ``db``
97105
Database directory path. The path may be either absolute or relative
@@ -195,6 +203,8 @@ Section **tracker**
195203
language is determined by the environment variable LANGUAGE, LC_ALL,
196204
LC_MESSAGES, or LANG, in that order of preference.
197205

206+
.. index:: configuration; sections web
207+
198208
Section **web**
199209
allow_html_file -- ``no``
200210
Setting this option enables Roundup to serve uploaded HTML
@@ -222,7 +232,12 @@ Section **web**
222232
tracker admin."),
223233

224234
Section **rdbms**
225-
Settings in this section are used by Postgresql and MySQL backends only
235+
Settings in this section are used to set the backend and configure
236+
addition settings needed by RDBMs like SQLite, Postgresql and
237+
MySQL backends.
238+
239+
backend -- set to value by init
240+
The database backend such as anydbm, sqlite, mysql or postgres.
226241

227242
name -- ``roundup``
228243
Name of the database to use.
@@ -248,6 +263,14 @@ Section **rdbms**
248263
Name of the group to use in the MySQL defaults file. Only used in
249264
MySQL connections.
250265

266+
sqlite_timeout -- ``30``
267+
Number of seconds to wait when the SQLite database is locked.
268+
Used only for SQLite.
269+
270+
cache_size -- `100`
271+
Size of the node cache (in elements) used to keep most recently used
272+
data in memory.
273+
251274
Section **logging**
252275
config -- default *blank*
253276
Path to configuration file for standard Python logging module. If this
@@ -470,8 +493,7 @@ existing settings using the ``roundup-admin updateconfig`` command.
470493

471494
Configuration variables may be referred to in lower or upper case. In code,
472495
variables not in the "main" section are referred to using their section and
473-
name, so "domain" in the section "mail" becomes MAIL_DOMAIN. The
474-
configuration variables available are:
496+
name, so "domain" in the section "mail" becomes MAIL_DOMAIN.
475497

476498
Extending the configuration file
477499
--------------------------------
@@ -501,6 +523,7 @@ applied to the extension config files, so if you instead have::
501523

502524
then the above ``db.config.detectors['QA_RECIPIENTS']`` will still work.
503525

526+
.. index:: schema
504527

505528
Tracker Schema
506529
==============
@@ -514,22 +537,19 @@ A tracker schema defines what data is stored in the tracker's database.
514537
Schemas are defined using Python code in the ``schema.py`` module of your
515538
tracker.
516539

517-
The ``schema.py`` module
518-
------------------------
540+
The ``schema.py`` and ``initial_data.py`` modules
541+
-------------------------------------------------
519542

520-
The ``schema.py`` module contains two functions:
543+
The schema.py module is used to define what your tracker looks like
544+
on the inside, the schema of the tracker. It defines the Classes
545+
and properties on each class. It also defines the security for
546+
those Classes. The next few sections describe how schemas work
547+
and what you can do with them.
521548

522-
**open**
523-
This function defines what your tracker looks like on the inside, the
524-
**schema** of the tracker. It defines the **Classes** and **properties**
525-
on each class. It also defines the **security** for those Classes. The
526-
next few sections describe how schemas work and what you can do with
527-
them.
528-
**init**
529-
This function is responsible for setting up the initial state of your
530-
tracker. It's called exactly once - by the ``roundup-admin initialise``
531-
command. See the start of the section on `database content`_ for more
532-
info about how this works.
549+
The initial_data.py module sets up the initial state of your
550+
tracker. It’s called exactly once - by the ``roundup-admin initialise``
551+
command. See the start of the section on database content for more
552+
info about how this works.
533553

534554

535555
The "classic" schema
@@ -656,21 +676,32 @@ Properties
656676

657677
A Class is comprised of one or more properties of the following types:
658678

659-
* String properties are for storing arbitrary-length strings.
660-
* Password properties are for storing encoded arbitrary-length strings.
661-
The default encoding is defined on the ``roundup.password.Password``
662-
class.
663-
* Date properties store date-and-time stamps. Their values are Timestamp
664-
objects.
665-
* Integer properties store integer values. (Number can store real/float values.)
666-
* Number properties store numeric values. There is an option to use
667-
double-precision floating point numbers.
668-
* Boolean properties store on/off, yes/no, true/false values.
669-
* A Link property refers to a single other item selected from a
670-
specified class. The class is part of the property; the value is an
671-
integer, the id of the chosen item.
672-
* A Multilink property refers to possibly many items in a specified
673-
class. The value is a list of integers.
679+
String
680+
properties are for storing arbitrary-length strings.
681+
Password
682+
properties are for storing encoded arbitrary-length strings.
683+
The default encoding is defined on the ``roundup.password.Password``
684+
class.
685+
Date
686+
properties store date-and-time stamps. Their values are Timestamp
687+
objects.
688+
Interval
689+
properties store time periods rather than absolute dates. For
690+
example 2 hours.
691+
Integer
692+
properties store integer values. (Number can store real/float values.)
693+
Number
694+
properties store numeric values. There is an option to use
695+
double-precision floating point numbers.
696+
Boolean
697+
properties store on/off, yes/no, true/false values.
698+
Link
699+
properties refers to a single other item selected from a
700+
specified class. The class is part of the property; the value is an
701+
integer, the id of the chosen item.
702+
Multilink
703+
properties refer to possibly many items in a specified
704+
class. The value is a list of integers.
674705

675706
Properties can have additional attributes to change the default
676707
behaviour:
@@ -723,7 +754,7 @@ behaviour:
723754
it is modified). The new property can be used in normal searches
724755
using the "filter" method of the Class. This means it can be used
725756
like other Multilink properties when searching (in an index
726-
template) or via the REST- and XMLRPC-APIs.
757+
template) or via the REST and XMLRPC APIs.
727758

728759
As a example, suppose you want to group multiple issues into a
729760
super issue. Each issue can be part of only one super issue. It is
@@ -964,8 +995,11 @@ property, or sorting will result in random ordering.
964995
Examples of adding to your schema
965996
---------------------------------
966997

967-
The Roundup wiki has examples of how schemas can be customised to add
968-
new functionality.
998+
The `Roundup wiki`_ has examples of
999+
how schemas can be customised to add new functionality.
1000+
1001+
.. _Roundup wiki:
1002+
https://wiki.roundup-tracker.org/
9691003

9701004

9711005
Detectors - adding behaviour to your tracker
@@ -1292,7 +1326,7 @@ Example: Modifying the mail gateway
12921326
-----------------------------------
12931327

12941328
One site receives email on a main gateway. The virtual alias delivery
1295-
table on the postfix server is configured with:
1329+
table on the postfix server is configured with::
12961330

12971331
12981332
@@ -1475,6 +1509,11 @@ also define:
14751509
*Web Roles*
14761510
Controls user access to editing the "roles" property of the "user" class.
14771511
TODO: deprecate in favour of a property-based control.
1512+
*Rest Access* and *Xmlrpc Access*
1513+
These control access to the Rest and Xmlrpc endpoints. The Admin and User
1514+
roles have these by default in the classic tracker. See the
1515+
`directions in the rest interface documentation`_ and the
1516+
`xmlrpc interface documentation`_.
14781517

14791518
These are hooked into the default Roles:
14801519

@@ -1512,6 +1551,8 @@ Put together, these settings appear in the tracker's ``schema.py`` file::
15121551
# Give the regular users access to the web and email interface
15131552
db.security.addPermissionToRole('User', 'Web Access')
15141553
db.security.addPermissionToRole('User', 'Email Access')
1554+
db.security.addPermissionToRole('User', 'Rest Access')
1555+
db.security.addPermissionToRole('User', 'Xmlrpc Access')
15151556

15161557
# Assign the access and edit Permissions for issue, file and message
15171558
# to regular users now
@@ -5788,4 +5829,6 @@ rather than requiring a web server restart.
57885829
.. _`design documentation`: design.html
57895830
.. _`developer's guide`: developers.html
57905831
.. _`rest interface documentation`: rest.html#programming-the-rest-api
5832+
.. _`directions in the rest interface documentation`: rest.html#enabling-the-rest-api
5833+
.. _`xmlrpc interface documentation`: xmlrpc.html#through-roundup
57915834
.. _`zxcvbn`: https://github.com/dwolfhub/zxcvbn-python

doc/index.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,8 @@ Contents
3333

3434
See: https://wiki.roundup-tracker.org/ReleaseErrata for fixes to
3535
documentation.
36+
37+
Indices
38+
=======
39+
40+
* :ref:`genindex`

0 commit comments

Comments
 (0)