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: ...@@ -32,6 +32,7 @@ the mandatory properties depend on the report and are the following:
-- ``aggregate`` -- ``aggregate``
``dbfield`` ``dbfield`` ``dbfield`` ``dbfield``
``text`` ``text`` ``text`` ``text``
``xtype`` ``xtype``
=============== =============== =============== ===============
A column can also contains computed values obtained by applying a mathematical 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: ...@@ -44,22 +45,11 @@ property are the following and do not depend on the report:
* - ``dataIndex`` * - ``dataIndex``
* - ``eval`` * - ``eval``
* - ``text`` * - ``text``
* - ``xtype``
The most important properties are defined in the next sections as a function of The most important properties are defined in the next sections as a function of
the column type. 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 All columns
----------- -----------
...@@ -72,9 +62,9 @@ All columns ...@@ -72,9 +62,9 @@ All columns
``dataIndex`` ``dataIndex``
the index of the column used by the ``DataFrame``, the ``Ext.data.store`` 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 and the ``Ext.grid.Panel``. By default, this internal parameter is derived
to the ``text`` property. However, when using the ``eval`` property, it from the ``dbfield`` property. However, when using the ``eval`` property,
could be useful to index the column with short name like *a*, *b*, ... it could be useful to index the column with short name like *a*, *b*, ...
``dbfield`` ``dbfield``
the address of the database field encoded as ``"tablename.fieldname"`` or the address of the database field encoded as ``"tablename.fieldname"`` or
...@@ -135,3 +125,13 @@ Number column ...@@ -135,3 +125,13 @@ Number column
Summary are computed over the column values. Summary are computed over the column values.
Possible functions are ``"count"``, ``"sum"``, ``"min"``, ``"max"`` and Possible functions are ``"count"``, ``"sum"``, ``"min"``, ``"max"`` and
``"average"``. ``"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 ...@@ -25,9 +25,9 @@ Fundings
-------- --------
.. list-table:: .. list-table::
* - * -
- -
* - ``fundings.id`` * - ``fundings.id``
- integer - integer
* - ``fundings.agency`` * - ``fundings.agency``
...@@ -39,22 +39,26 @@ History ...@@ -39,22 +39,26 @@ History
------- -------
.. list-table:: .. list-table::
* - * -
- -
* - ``history.id`` * - ``history.id``
- integer - integer
* - ``history.id_people`` * - ``history.id_events``
- integer - integer
* - ``history.id_teams`` * - ``history.id_teams``
- integer - integer
* - ``history.id_projects`` * - ``history.id_projects``
- integer - integer
* - ``history.id_fundings``
- integer
* - ``history.id_people``
- integer
* - ``history.id_people_categories`` * - ``history.id_people_categories``
- integer - integer
* - ``history.id_fundings`` * - ``history.id_objects``
- integer - integer
* - ``history.id_events`` * - ``history.id_object_categories``
- integer - integer
* - ``history.start_date`` * - ``history.start_date``
- date - date
...@@ -67,13 +71,48 @@ History ...@@ -67,13 +71,48 @@ History
* - ``history.data`` * - ``history.data``
- dictionary - 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 People
------ ------
.. list-table:: .. list-table::
* - * -
- -
* - ``people.id`` * - ``people.id``
- integer - integer
* - ``people.first_name`` * - ``people.first_name``
...@@ -86,21 +125,21 @@ People ...@@ -86,21 +125,21 @@ People
- date - date
* - ``people.note`` * - ``people.note``
- string - string
People categories People categories
----------------- -----------------
.. list-table:: .. list-table::
* - * -
- -
* - ``people_categories.id`` * - ``people_categories.id``
- integer - integer
* - ``people_categories.code`` * - ``people_categories.code``
- string - string
* - ``people_categories.category`` * - ``people_categories.category``
- string - string
* - ``people_categories.definition`` * - ``people_categories.definition``
- string - string
Projects Projects
...@@ -108,8 +147,8 @@ Projects ...@@ -108,8 +147,8 @@ Projects
.. list-table:: .. list-table::
* - * -
- -
* - ``projects.id`` * - ``projects.id``
- integer - integer
* - ``projects.project`` * - ``projects.project``
...@@ -117,14 +156,14 @@ Projects ...@@ -117,14 +156,14 @@ Projects
* - ``projects.agencies`` * - ``projects.agencies``
- string - string
Teams Teams
----- -----
.. list-table:: .. list-table::
* - * -
- -
* - ``teams.id`` * - ``teams.id``
- integer - integer
* - ``teams.team`` * - ``teams.team``
......
...@@ -7,18 +7,18 @@ This applications record events. It can happen at a date or span during a ...@@ -7,18 +7,18 @@ This applications record events. It can happen at a date or span during a
period of time. period of time.
An event is defined by a *starting date*, by an *ending date* and by a *type*. 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 person
* a team * an object
* a project
* a category (the category of people in this application) The events are stored in the ``history`` table. The meta-data are related to
* a funding agency 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
The events are stored in the ``history`` table and the meta-data in the foreign are in the table ``people`` and ``people_categories`` while those for an object
tables ``fundings``, ``people``, ``people_categories``, ``projects`` and are in the tables ``objects`` and ``object_categories``.
``teams``. The organization of these tables can not be modified by the user The organization of these tables can not be modified by the user
since all their fields are standard database fields. since all their fields are standard database fields.
An event contains also the *user data block*. It is stored in the database 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*, ...@@ -53,7 +53,7 @@ possibly a default value. Possible types are *boolean*, *date*, *float*,
.. note:: .. note::
For *date* type, the default value must be encoded as ``YYYY-MM-DD``. For *date* type, the default value must be encoded as ``YYYY-MM-DD``.
.. note:: .. note::
The *reference* type allows the user to select value within those The *reference* type allows the user to select value within those
available for a given database field. The address of the database available for a given database field. The address of the database
...@@ -143,15 +143,24 @@ In order to create a new one: ...@@ -143,15 +143,24 @@ In order to create a new one:
4. Scan the different tabs and fill the appropriate entries. 4. Scan the different tabs and fill the appropriate entries.
The events form, shown in :num:`Fig. #event-form-figure`, The events form, shown in :num:`Fig. #event-form-figure`,
contains three tabs: contains four tabs:
``Metadata`` ``Metadata``
the meta-data associated to the event: *people*, *team*, *project*, the meta-data tab allows to associate the event to a *team*, to a
*category*, *funding* and *percentage* allocated for the people. *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`` ``Event``
the *event type*, the *time period* or the *date* and the *user data the event tab defines the *event type*, the *time period* (or the
block*. *date*) and the *user data block*.
.. note:: .. note::
The *starting date* and the *ending date* have to be equal when 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 @@ ...@@ -2,16 +2,30 @@
The collection of hyperlinks used in the different section 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: http://pandas.pydata.org/pandas-docs/stable/api.html#dataframe
.. _DataFrame.plot: .. _DataFrame.plot:
http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.plot. http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.plot.
html#pandas.DataFrame.plot html#pandas.DataFrame.plot
.. _epydoc: http://epydoc.sourceforge.net/
.. _ExtJS: http://docs-origin.sencha.com/extjs/4.2.1/#!/api .. _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/ .. _JSON: http://www.json.org/
.. _mathjax: http://www.mathjax.org/
.. _matplotlib: http://matplotlib.org/ .. _matplotlib: http://matplotlib.org/
.. _matplotlib.colormap: http://matplotlib.org/users/colormaps.html .. _matplotlib.colormap: http://matplotlib.org/users/colormaps.html
...@@ -22,6 +36,8 @@ ...@@ -22,6 +36,8 @@
.. _plotting: http://pandas.pydata.org/pandas-docs/stable/visualization.html .. _plotting: http://pandas.pydata.org/pandas-docs/stable/visualization.html
.. _plugin_dbui: https://marprod.in2p3.fr/plugin_dbui_book
.. _pyplot.bar: .. _pyplot.bar:
http://matplotlib.org/api/pyplot_api.html#matplotlib.pyplot.bar http://matplotlib.org/api/pyplot_api.html#matplotlib.pyplot.bar
...@@ -43,6 +59,8 @@ ...@@ -43,6 +59,8 @@
.. _pyplot.scatter: .. _pyplot.scatter:
http://matplotlib.org/api/pyplot_api.html#matplotlib.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- .. _smart_query: http://web2py.com/books/default/chapter/29/06/the-database-
abstraction-layer#smart_query--experimental abstraction-layer#smart_query--experimental
......
...@@ -17,6 +17,7 @@ Documentation contents ...@@ -17,6 +17,7 @@ Documentation contents
metric1d metric1d
metric2d metric2d
graph graph
third_party
appendix_dbfield appendix_dbfield
appendix_virtualfield appendix_virtualfield
appendix_column appendix_column
......
...@@ -96,15 +96,23 @@ The configuration of the grid columns is defined in the ...@@ -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 ``Columns`` tab. It has a single entry which has to be filled with a
JSON_-type ``array`` of object. Each object configures a columns. 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`` ``dbfield``
the address of the database field the address of the database field.
``text`` ``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: 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: ...@@ -114,7 +122,8 @@ The following configuration displays the list of people with their current age:
"xtype": "rownumbered" "xtype": "rownumbered"
}, { }, {
"dbfield": "people.last_name", "dbfield": "people.last_name",
"text": "name" "text": "name",
"xtype": "gridcolumn"
}, { }, {
"align": "right", "align": "right",
"dbfield": "history.age", "dbfield": "history.age",
......
...@@ -96,7 +96,7 @@ The configuration of the grid columns is defined in the ...@@ -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 ``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. 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`` ``aggregate``
the aggregation function applied on the values the aggregation function applied on the values
...@@ -111,15 +111,18 @@ The configuration of a column requires a minimum of three properties: ...@@ -111,15 +111,18 @@ The configuration of a column requires a minimum of three properties:
``text`` ``text``
the label of the column. the label of the column.
In order to compute a summary row for the columns, use the ``summaryType`` ``xtype``
property. Possible values are ``count``, ``sum``, ``min``, ``max`` and the type of data stored in the column, usually ``numbercolumn``.
``average``.
To add column containing the result of mathematical operation applied on To add column containing the result of mathematical operation applied on
column cells, use the properties ``eval`` instead of ``dbfield`` and 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 The following configuration has been used for the metrics of the
:num:`Fig. #metric1d-figure`: :num:`Fig. #metric1d-figure`:
...@@ -131,23 +134,27 @@ The following configuration has been used for the metrics of the ...@@ -131,23 +134,27 @@ The following configuration has been used for the metrics of the
"align": "right", "align": "right",
"dbfield": "people.id", "dbfield": "people.id",
"format": "0", "format": "0",
"text": "entrées" "text": "entrées",
"xtype": "numbercolumn"
}, { }, {
"aggregate": "mean", "aggregate": "mean",
"align": "right", "align": "right",
"dataIndex": "a", "dataIndex": "a",
"dbfield": "people.age", "dbfield": "people.age",
"format": "0.0", "format": "0.0",
"text": "<age>" "text": "<age>",
"xtype": "numbercolumn"
}, { }, {
"aggregate": "std", "aggregate": "std",
"align": "right", "align": "right",
"dataIndex": "b", "dataIndex": "b",
"dbfield": "people.age", "dbfield": "people.age",
"format": "0.0", "format": "0.0",
"text": "σ(age)" "text": "σ(age)",
"xtype": "numbercolumn"
},{ },{
"align": "right", "align": "right",
"eval": "b/a", "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