Commit 096eaf10 authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Update the documentation.

parent 4aeb745d
......@@ -32,6 +32,7 @@ the mandatory properties depend on the report and are the following:
-- ``aggregate``
``dbfield`` ``dbfield``
``text`` ``text``
``xtype`` ``xtype``
=============== ===============
A column can also contains computed values obtained by applying a mathematical
......@@ -44,22 +45,11 @@ property are the following and do not depend on the report:
* - ``dataIndex``
* - ``eval``
* - ``text``
* - ``xtype``
The most important properties are defined in the next sections as a function of
the column type.
.. note::
The ``Metric1D`` columns are always rendered as ``numbercolumn``.
Therefore the property ``xtype`` can be omitted.
Finally, the ExtJS_ library provide a special column numbering the rows
starting at one. It has only one configuration property:
.. code:: javascript
"xtype" : "rownumberer"
All columns
-----------
......@@ -72,9 +62,9 @@ All columns
``dataIndex``
the index of the column used by the ``DataFrame``, the ``Ext.data.store``
and the ``Ext.grid.Panel``. By default, this internal parameter is equal
to the ``text`` property. However, when using the ``eval`` property, it
could be useful to index the column with short name like *a*, *b*, ...
and the ``Ext.grid.Panel``. By default, this internal parameter is derived
from the ``dbfield`` property. However, when using the ``eval`` property,
it could be useful to index the column with short name like *a*, *b*, ...
``dbfield``
the address of the database field encoded as ``"tablename.fieldname"`` or
......@@ -135,3 +125,13 @@ Number column
Summary are computed over the column values.
Possible functions are ``"count"``, ``"sum"``, ``"min"``, ``"max"`` and
``"average"``.
Row numbered column
-------------------
Finally, the ExtJS_ library provide a special column numbering the rows
starting at one. It has only one configuration property:
.. code:: javascript
"xtype" : "rownumberer"
......@@ -25,9 +25,9 @@ Fundings
--------
.. list-table::
* -
-
* -
-
* - ``fundings.id``
- integer
* - ``fundings.agency``
......@@ -39,22 +39,26 @@ History
-------
.. list-table::
* -
-
* -
-
* - ``history.id``
- integer
* - ``history.id_people``
* - ``history.id_events``
- integer
* - ``history.id_teams``
- integer
* - ``history.id_projects``
- integer
* - ``history.id_fundings``
- integer
* - ``history.id_people``
- integer
* - ``history.id_people_categories``
- integer
* - ``history.id_fundings``
* - ``history.id_objects``
- integer
* - ``history.id_events``
* - ``history.id_object_categories``
- integer
* - ``history.start_date``
- date
......@@ -67,13 +71,48 @@ History
* - ``history.data``
- dictionary
Object categories
-----------------
.. list-table::
* -
-
* - ``object_categories.id``
- integer
* - ``object_categories.code``
- string
* - ``object_categories.category``
- string
* - ``object_categories.definition``
- string
Objects
-------
.. list-table::
* -
-
* - ``objects.id``
- integer
* - ``objects.reference``
- string
* - ``objects.serial_number``
- string
* - ``objects.batch_number``
- string
* - ``objects.note``
- string
People
------
.. list-table::
* -
-
* -
-
* - ``people.id``
- integer
* - ``people.first_name``
......@@ -86,21 +125,21 @@ People
- date
* - ``people.note``
- string
People categories
-----------------
.. list-table::
* -
-
* -
-
* - ``people_categories.id``
- integer
* - ``people_categories.code``
- string
* - ``people_categories.category``
* - ``people_categories.category``
- string
* - ``people_categories.definition``
* - ``people_categories.definition``
- string
Projects
......@@ -108,8 +147,8 @@ Projects
.. list-table::
* -
-
* -
-
* - ``projects.id``
- integer
* - ``projects.project``
......@@ -117,14 +156,14 @@ Projects
* - ``projects.agencies``
- string
Teams
-----
.. list-table::
* -
-
* -
-
* - ``teams.id``
- integer
* - ``teams.team``
......
......@@ -7,18 +7,18 @@ This applications record events. It can happen at a date or span during a
period of time.
An event is defined by a *starting date*, by an *ending date* and by a *type*.
It is linked to:
An event contains *meta-data* linking the event to:
* meta-data
* a person
* a team
* a project
* a category (the category of people in this application)
* a funding agency
The events are stored in the ``history`` table and the meta-data in the foreign
tables ``fundings``, ``people``, ``people_categories``, ``projects`` and
``teams``. The organization of these tables can not be modified by the user
* an object
The events are stored in the ``history`` table. The meta-data are related to
a *project*, a *team* as well as a *funding agency*. Meta-data are kept in the
tables ``teams``, ``projects`` and ``fundings``. The data describing a person
are in the table ``people`` and ``people_categories`` while those for an object
are in the tables ``objects`` and ``object_categories``.
The organization of these tables can not be modified by the user
since all their fields are standard database fields.
An event contains also the *user data block*. It is stored in the database
......@@ -53,7 +53,7 @@ possibly a default value. Possible types are *boolean*, *date*, *float*,
.. note::
For *date* type, the default value must be encoded as ``YYYY-MM-DD``.
.. note::
The *reference* type allows the user to select value within those
available for a given database field. The address of the database
......@@ -143,15 +143,24 @@ In order to create a new one:
4. Scan the different tabs and fill the appropriate entries.
The events form, shown in :num:`Fig. #event-form-figure`,
contains three tabs:
contains four tabs:
``Metadata``
the meta-data associated to the event: *people*, *team*, *project*,
*category*, *funding* and *percentage* allocated for the people.
the meta-data tab allows to associate the event to a *team*, to a
*project* as well as to a *funding agency*.
``People``
the people tab allows to associate the event to a *person*, to a
*category of people* and to specify the fraction of time
spent on the event by the person.
``Object``
the object tab allows to associate the event to an *object* as well
as to a *category of object*.
``Event``
the *event type*, the *time period* or the *date* and the *user data
block*.
the event tab defines the *event type*, the *time period* (or the
*date*) and the *user data block*.
.. note::
The *starting date* and the *ending date* have to be equal when
......
docs/userguide/figures/history-form.png

26.1 KB | W: | H:

docs/userguide/figures/history-form.png

20.7 KB | W: | H:

docs/userguide/figures/history-form.png
docs/userguide/figures/history-form.png
docs/userguide/figures/history-form.png
docs/userguide/figures/history-form.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -2,16 +2,30 @@
The collection of hyperlinks used in the different section
.. _ace: http://ace.c9.io/
.. _CeCILL: http://www.cecill.info/index.en.html
.. _DataFrame: http://pandas.pydata.org/pandas-docs/stable/api.html#dataframe
.. _DataFrame.plot:
http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.plot.
html#pandas.DataFrame.plot
.. _epydoc: http://epydoc.sourceforge.net/
.. _ExtJS: http://docs-origin.sencha.com/extjs/4.2.1/#!/api
.. _git: http://git-scm.com/
.. _jsduck: https://github.com/senchalabs/jsduck
.. _JSLint: http://javascript.crockford.com/code.html
.. _JSON: http://www.json.org/
.. _mathjax: http://www.mathjax.org/
.. _matplotlib: http://matplotlib.org/
.. _matplotlib.colormap: http://matplotlib.org/users/colormaps.html
......@@ -22,6 +36,8 @@
.. _plotting: http://pandas.pydata.org/pandas-docs/stable/visualization.html
.. _plugin_dbui: https://marprod.in2p3.fr/plugin_dbui_book
.. _pyplot.bar:
http://matplotlib.org/api/pyplot_api.html#matplotlib.pyplot.bar
......@@ -43,6 +59,8 @@
.. _pyplot.scatter:
http://matplotlib.org/api/pyplot_api.html#matplotlib.pyplot.scatter
.. _python: https://www.python.org/
.. _smart_query: http://web2py.com/books/default/chapter/29/06/the-database-
abstraction-layer#smart_query--experimental
......
......@@ -17,6 +17,7 @@ Documentation contents
metric1d
metric2d
graph
third_party
appendix_dbfield
appendix_virtualfield
appendix_column
......
......@@ -96,15 +96,23 @@ The configuration of the grid columns is defined in the
``Columns`` tab. It has a single entry which has to be filled with a
JSON_-type ``array`` of object. Each object configures a columns.
The configuration of a column requires a minimum of two properties:
The configuration of a column requires a minimum of three properties:
``dbfield``
the address of the database field
the address of the database field.
``text``
the label of the column
the label of the column.
Many more properties are available. They are detailed in :ref:`Appendix C`.
``xtype``
the type of data stored in the column. Possible values are
``booleancolumn``, ``datecolumn``, ``gridcolumn`` and ``numbercolumn``.
To add column containing the result of mathematical operation applied on
column cells, use the properties ``eval`` instead of ``dbfield``. In that case
the property ``dataIndex`` has to be specified.
Many more details are given in :ref:`Appendix C`.
The following configuration displays the list of people with their current age:
......@@ -114,7 +122,8 @@ The following configuration displays the list of people with their current age:
"xtype": "rownumbered"
}, {
"dbfield": "people.last_name",
"text": "name"
"text": "name",
"xtype": "gridcolumn"
}, {
"align": "right",
"dbfield": "history.age",
......
......@@ -96,7 +96,7 @@ The configuration of the grid columns is defined in the
``Columns`` tab. It has a single entry which has to be filled with an
JSON_-type ``array`` of object. Each object configures a columns and its metric.
The configuration of a column requires a minimum of three properties:
The configuration of a column requires a minimum of four properties:
``aggregate``
the aggregation function applied on the values
......@@ -111,15 +111,18 @@ The configuration of a column requires a minimum of three properties:
``text``
the label of the column.
In order to compute a summary row for the columns, use the ``summaryType``
property. Possible values are ``count``, ``sum``, ``min``, ``max`` and
``average``.
``xtype``
the type of data stored in the column, usually ``numbercolumn``.
To add column containing the result of mathematical operation applied on
column cells, use the properties ``eval`` instead of ``dbfield`` and
``aggregate``.
``aggregate``. In that case, the property ``dataIndex`` has to be specified.
In order to compute a summary row for the columns, use the ``summaryType``
property. Possible values are ``count``, ``sum``, ``min``, ``max`` and
``average``.
Many more properties are available. They are detailed in :ref:`Appendix C`.
Many more details are given in :ref:`Appendix C`.
The following configuration has been used for the metrics of the
:num:`Fig. #metric1d-figure`:
......@@ -131,23 +134,27 @@ The following configuration has been used for the metrics of the
"align": "right",
"dbfield": "people.id",
"format": "0",
"text": "entrées"
"text": "entrées",
"xtype": "numbercolumn"
}, {
"aggregate": "mean",
"align": "right",
"dataIndex": "a",
"dbfield": "people.age",
"format": "0.0",
"text": "<age>"
"text": "<age>",
"xtype": "numbercolumn"
}, {
"aggregate": "std",
"align": "right",
"dataIndex": "b",
"dbfield": "people.age",
"format": "0.0",
"text": "σ(age)"
"text": "σ(age)",
"xtype": "numbercolumn"
},{
"align": "right",
"eval": "b/a",
"text": "sigma/mean"
"text": "sigma/mean",
"xtype": "numbercolumn"
}]
.. include:: hyperlinks.txt
.. _third party:
Third party software
=====================
The ``track_events`` relies on third party free and open source software:
* The programming language python_
* The framework web2py_ and its documentations
* The web2py plugin plugin_dbui_
* The javascript editor ace_
* The javascript library `ExtJS`_
* The javascript library mathjax_
* The version control system git_
* The documentation generator for python epydoc_
* The documentation generator for javascript jsduck_
* The javascript code checker JSLint_
Licence
=======
The ``track_events`` software and its documentations are free and open source
software distributed under the CeCILL_ license.
Copyright
=========
@ 2012-2015 Renaud Le Gac
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment