Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
tev
plugin_event
Commits
9c337fb4
Commit
9c337fb4
authored
Mar 22, 2017
by
LE GAC Renaud
Browse files
Update the API documentation.
parent
16b64c87
Changes
71
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
69 additions
and
54 deletions
+69
-54
docs/api/index.rst
docs/api/index.rst
+4
-3
docs/api/matplotlib_tools.rst
docs/api/matplotlib_tools.rst
+21
-0
docs/api/models.rst
docs/api/models.rst
+2
-2
docs/api/report.rst
docs/api/report.rst
+0
-32
docs/api/report_tools.rst
docs/api/report_tools.rst
+17
-0
modules/plugin_event/__init__.py
modules/plugin_event/__init__.py
+2
-1
modules/plugin_event/dataframes.py
modules/plugin_event/dataframes.py
+1
-1
modules/plugin_event/model_core.py
modules/plugin_event/model_core.py
+1
-1
modules/plugin_event/model_report.py
modules/plugin_event/model_report.py
+6
-2
modules/plugin_event/model_selector.py
modules/plugin_event/model_selector.py
+3
-0
modules/plugin_event/report_tools.py
modules/plugin_event/report_tools.py
+12
-12
No files found.
docs/api/index.rst
View file @
9c337fb4
...
...
@@ -10,9 +10,10 @@ API Documentation
:maxdepth: 1
callback
model
report
selector
dataframes
matplotlib_tools
models
report_tools
user_interface
Indices and tables
...
...
docs/api/matplotlib_tools.rst
0 → 100644
View file @
9c337fb4
Matplotlib tools
----------------
A collection of functions to help in building graph.
.. currentmodule:: plugin_event
.. autosummary::
:toctree: generated/
bicolor
create_pdf
header_footer
plot_references
plot_values
style
table_only
ticks_and_labels
xticks_and_labels
\ No newline at end of file
docs/api/model.rst
→
docs/api/model
s
.rst
View file @
9c337fb4
Model
-----
Model
s
-----
-
A collection of classes to define the model for the database.
...
...
docs/api/report.rst
deleted
100644 → 0
View file @
16b64c87
Reports
-------
A collection of methods and classes to build report: *list*, *graph* or
*metric*.
Helper functions
^^^^^^^^^^^^^^^^
.. currentmodule:: plugin_event
.. autosummary::
:toctree: generated/
do_title
get_value
split_dbfield
Classes
^^^^^^^
.. currentmodule:: plugin_event
.. autosummary::
:toctree: generated/
BaseReport
Graph
List
Metric1D
Metric2D
\ No newline at end of file
docs/api/
selector
.rst
→
docs/api/
report_tools
.rst
View file @
9c337fb4
Selector
--------
Report tools
------------
A collection of classes to build report: *list*, *graph* or
*metric*.
Classes
^^^^^^^
.. currentmodule:: plugin_event
.. autosummary::
:toctree: generated/
SelectorActiveItems
EvtSelector
BaseReport
Graph
List
Metric2D
\ No newline at end of file
modules/plugin_event/__init__.py
View file @
9c337fb4
...
...
@@ -36,7 +36,8 @@ from model_core import Core
from
model_report
import
Report
from
model_selector
import
Selector
from
report_tools
import
(
Graph
,
from
report_tools
import
(
BaseReport
,
Graph
,
List
,
Metric2D
,
ReportException
)
...
...
modules/plugin_event/dataframes.py
View file @
9c337fb4
...
...
@@ -233,6 +233,7 @@ def debug_df(df, opt=""):
Args
df (pandas.DataFrame):
opt (str): debug options:
* ``a``: equivalent to icIht
* ``c``: show columns
* ``I``: show index
...
...
@@ -240,7 +241,6 @@ def debug_df(df, opt=""):
* ``t``: show tail
* ``f``: show the whole dataframe
"""
if
"i"
in
opt
or
"a"
in
opt
:
df
.
memory_usage
()
...
...
modules/plugin_event/model_core.py
View file @
9c337fb4
...
...
@@ -12,7 +12,7 @@ from pydal import Field
class
Core
(
object
):
"""Create the history table and its foreign tables.
"""Create the
``
history
``
table and its foreign tables.
"""
@
staticmethod
...
...
modules/plugin_event/model_report.py
View file @
9c337fb4
...
...
@@ -106,8 +106,12 @@ TP_SUMMARY_Y = "To sum, for example, the content of each column."
class
Report
(
object
):
"""Create the tables for the reporting: lists, metrics1d, metrics2d,
and graphs.
"""Create the tables ``Lists`` and ``metrics2D`` for the reporting
Note:
The table ``graphs``, ``lists``, ``metrics1d`` and ``metrics2d``
are obsolete. They are kept to ease the transition to the new
tables ``lists2`` and ``metrics2D2`` introduce in version 0.7.0.
"""
@
staticmethod
...
...
modules/plugin_event/model_selector.py
View file @
9c337fb4
...
...
@@ -9,6 +9,9 @@ from pydal import Field
class
Selector
(
object
):
"""Create virtual tables used to generate selector interfaces.
"""
@
staticmethod
def
define_tables
(
virtdb
,
db
,
T
):
...
...
modules/plugin_event/report_tools.py
View file @
9c337fb4
...
...
@@ -41,17 +41,17 @@ class ReportException(BaseException):
class
BaseReport
(
object
):
"""Base class to build list, metric or graph reports.
Attributes:
config (gluon.dal.Row):
df (pandas.DataFrame):
selector (plugin_dbui.Selector):
store (dict):
grid (dict):
Args:
table (gluon.dal.Table): contains the report configuration.
id_report (int): identifier of the report in the table.
**Public attributes**:
* **config** (*gluon.dal.Row*): configuration for the report
* **df** (*pandas.DataFrame*): data used by the report
* **selector** (*plugin_dbui.Selector*): user criteria
* **store** (*dict*): configuration of the ``Ext.data.Store``
* **grid** (*dict*): configuration of the ``Ext.grid.Panel`` widget
"""
def
__init__
(
self
,
table
,
id_report
):
...
...
@@ -525,14 +525,14 @@ class Metric2D(BaseReport):
"""Generate the Metric2D and related configurations for ``Ext.grid.Panel``
and ``Ext.data.Store``.
Attributes:
df (pandas.DataFrame): metric with summary rows and columns.
df0 (pandas.DataFrame): metric without summary rows and columns.
is_summary (bool):
Args:
id_report: report identifier in the database
**Public attributes**:
* **df** (*pandas.DataFrame*): metric with summary rows and columns
* **df0** (*pandas.DataFrame*): metric without summary rows and columns
* **is_summary** (*bool*): summary rows or columns are there
Raises:
ReportException:
when the errors are found in the configuration of the grid columns.
...
...
Prev
1
2
3
4
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment