Commit 0cae7e68 authored by payno's avatar payno

[doc] Add empty documentation on existing widgets

parent 69557c5c
......@@ -15,12 +15,14 @@
import sys
import os
import shlex
sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'ext'))
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#sys.path.insert(0, os.path.abspath('.'))
# sys.path.insert(0, os.path.abspath('.'))
# -- General configuration ------------------------------------------------
......@@ -50,9 +52,9 @@ source_parsers = {".md": "recommonmark.parser.CommonMarkParser"}
master_doc = 'index'
# General information about the project.
project = 'Orange3 Example Add-on'
copyright = '2015, Biolab'
author = 'Biolab'
project = 'id06workflow'
copyright = '2016-2018, ESRF'
author = 'ESRF'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
......@@ -131,7 +133,7 @@ html_theme = 'nature'
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
#html_logo = None
html_logo = "img/logo.png"
# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
......@@ -141,7 +143,7 @@ html_theme = 'nature'
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['static']
# html_static_path = ['static']
# Add any extra paths that contain custom files (such as robots.txt or
# .htaccess) here, relative to this directory. These files are copied
......@@ -204,7 +206,7 @@ html_static_path = ['static']
#html_search_scorer = 'scorer.js'
# Output file base name for HTML help builder.
htmlhelp_basename = 'Orange3ExampleAdd-ondoc'
htmlhelp_basename = 'id06workflow (orange add-on)'
# -- Options for LaTeX output ---------------------------------------------
......@@ -226,7 +228,7 @@ latex_elements = {
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'Orange3ExampleAdd-on.tex', 'Orange3 Example Add-on Documentation',
(master_doc, 'Orange3ESRFAdd-on.tex', 'Orange3 ESRF Add-on Documentation',
'Biolab', 'manual'),
]
......@@ -256,7 +258,7 @@ latex_documents = [
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'orange3exampleadd-on', 'Orange3 Example Add-on Documentation',
(master_doc, 'id06workflowadd-on', 'id06workflow Add-on Documentation',
[author], 1)
]
......@@ -270,8 +272,8 @@ man_pages = [
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'Orange3ExampleAdd-on', 'Orange3 Example Add-on Documentation',
author, 'Orange3ExampleAdd-on', 'One line description of project.',
(master_doc, 'id06workflowAdd-on', 'id06workflow Add-on Documentation',
author, 'id06workflowAdd-on', 'One line description of project.',
'Miscellaneous'),
]
......
Developing Orange3 Add-ons
==========================
=============
ID06 Workflow
=============
Orange add-on is an ordinary python package, installed by running setup.py install and
distributed via pypi. Widgets, tutorials and help are registered in setup.py file using
entry points. When Orange Canvas starts, it reads this entry points, registers all the
widgets and adds them to the menu. This containts one widget (Hello World), which is
contained in a new category (My Category). The widget also displays help when you press F1.
Registering widgets
-------------------
The My Category category is registered using "orange.widgets" entry point in setup.py,
which contains category name (My Category) and package that contains the widgets
(orangecontrib.example.widgets). The packages __init__.py contains category metadata,
including category ICON, BACKGROUD color and WIDGET_HELP_PATH. The latter can be either
a local path or a url to a server which hosts the add-on documentation.
Orange Canvas will automatically discover all widget modules that are placed inside
the category package and put found widgets into the category. Widget is a class extending
Orange.widgets.widget.OWWidget and has an attribute name. Each widget should be placed in
a separate directory.
Providing Help files
--------------------
When F1 is press on open widget or on a selected widget icon, a help file is shown. Help
files are ordinary documentation pages, written in rst and placed into doc/widgets folder.
Help pages can be written in markdown or in rst. The only requirement is that the title of
the page is the same as the widget name. To allow automatic discovery of help pages, all
widget help pages should be listed on a documentation page inside a section named Widget.
The location of the documentation is set using the "orange.canvas.help" entrypoint. It
usually points to the constant WIDGET_HELP_PATH in the package containing widgets. The
constant should list the possible locations of the master page (the one that links to
all widgets). This example add-on includes three different locations:
- Development documentation is available for developers that manually build documentation
using sphinx
- Locally installed documentation, which is available if the add-on was installed using
a wheel package. Local installation has to be enabled in setup.py by calling function
include_documentation.
- Online documentation points to the hosted documentation such as read the docs or
python hosted.
The locations are tried in order they are listed, the first one available will be used.
Beside widgets, add-on can also include tutorial schemas, that are shown in the Welcome
dialog. Tutorials are ordinary ows files, but often include annotations that guide the user.
Tutorial packages are registered in setup.py using "orange.widgets.tutorials" entry point.
TODO: goal and description
Contents:
......@@ -58,12 +15,12 @@ Widgets
.. toctree::
:maxdepth: 1
widgets/mywidget
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
widgets/datareduction
widgets/dataselection
widgets/geometry
widgets/mapping
widgets/noisereduction
widgets/roiselection
widgets/saveexperiment
widgets/saveimage
widgets/shiftcorrection
Data reduction
Data Reduction
==============
![image](icons/mywidget.png)
A dummy widget that greets the world.
Signals
-------
......@@ -17,4 +16,4 @@ Signals
Description
-----------
This is a simple widget that greets the world using a QLabel. If you are interested in widget development, you should take a look at it's source code.
TODO
Data selection
Data Selection
==============
![image](icons/mywidget.png)
A dummy widget that greets the world.
Signals
-------
......@@ -17,4 +16,4 @@ Signals
Description
-----------
This is a simple widget that greets the world using a QLabel. If you are interested in widget development, you should take a look at it's source code.
TODO
......@@ -3,7 +3,6 @@ Geometry
![image](icons/mywidget.png)
A dummy widget that greets the world.
Signals
-------
......@@ -17,4 +16,4 @@ Signals
Description
-----------
This is a simple widget that greets the world using a QLabel. If you are interested in widget development, you should take a look at it's source code.
TODO
Mapping
=======
![image](icons/mywidget.png)
Signals
-------
- (Data)
**Outputs**:
- (Data)
Description
-----------
TODO
Noise reduction
Noise Reduction
===============
![image](icons/mywidget.png)
A dummy widget that greets the world.
Signals
-------
......@@ -17,4 +16,4 @@ Signals
Description
-----------
This is a simple widget that greets the world using a QLabel. If you are interested in widget development, you should take a look at it's source code.
TODO
Noise selection
===============
Roi Selection
=============
![image](icons/mywidget.png)
A dummy widget that greets the world.
Signals
-------
......@@ -17,4 +16,4 @@ Signals
Description
-----------
This is a simple widget that greets the world using a QLabel. If you are interested in widget development, you should take a look at it's source code.
TODO
Save experiment
Save Experiment
===============
![image](icons/mywidget.png)
A dummy widget that greets the world.
Signals
-------
......@@ -17,4 +16,4 @@ Signals
Description
-----------
This is a simple widget that greets the world using a QLabel. If you are interested in widget development, you should take a look at it's source code.
TODO
Save Screenshot
===============
![image](icons/mywidget.png)
Signals
-------
- (Data)
Description
-----------
TODO
Shift correction
Shift Correction
================
![image](icons/mywidget.png)
A dummy widget that greets the world.
Signals
-------
......@@ -17,4 +16,4 @@ Signals
Description
-----------
This is a simple widget that greets the world using a QLabel. If you are interested in widget development, you should take a look at it's source code.
TODO
......@@ -8,11 +8,15 @@ ICON = "icons/ID06.png"
# and widget icon background in workflow.
BACKGROUND = "light-blue"
URL = 'http://www.silx.org/pub/doc/id06workflow'
# Location of widget help files.
WIDGET_HELP_PATH = (
intersphinx = (
# Development documentation
# You need to build help pages manually using
# make htmlhelp
# inside doc folder
("{DEVELOP_ROOT}/doc/build/htmlhelp/index.html", None),
("{URL}/docs/latest/",
"{URL}/docs/latest/_objects/")
)
......@@ -43,7 +43,7 @@ class SaveExperimentOW(OWWidget):
Dataset.
"""
name = "save experiement"
name = "save experiment"
id = "orange.widgets.id06workflow.saveexperiment"
description = "Save the current experiment treatment"
icon = "icons/document-save.svg"
......
......@@ -43,7 +43,7 @@ class SaveImageOW(OWWidget):
Save image to the folder defined in the os
"""
name = "save screen shot"
name = "save screenshot"
id = "orange.widgets.id06workflow.saveimage"
description = "save image to the folder defined in environment variable " \
"'WORKFLOW_OUTPUT'"
......
......@@ -810,7 +810,7 @@ def get_project_configuration(dry_run):
# Register widget help
"orange.canvas.help": (
'html-index=orangecontrib.id06workflow.widgets:WIDGET_HELP_PATH',
'html-index=orangecontrib.id06workflow.widgets:intersphinx',
),
}
......
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