Skip to content

Commit

Permalink
Start a documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
echebbi committed Mar 16, 2019
1 parent 39e9a06 commit 9f53ea9
Show file tree
Hide file tree
Showing 12 changed files with 503 additions and 1 deletion.
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,11 @@ target/

# Eclipse IDE preferences
fr.kazejiyu.discord.rpc.integration.prefs

# Sphinx generated files
_build
_static
_templates

# Visual Studio Code
.vscode
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# EKumi

[![Build Status](https://travis-ci.org/KazeJiyu/ekumi.svg?branch=master)](https://travis-ci.org/KazeJiyu/ekumi) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/01ba3d3e1da44be78cb2267ed051b88a)](https://www.codacy.com/app/KazeJiyu/ekumi?utm_source=github.com&utm_medium=referral&utm_content=KazeJiyu/ekumi&utm_campaign=Badge_Grade) [![Technical Debt](https://sonarcloud.io/api/project_badges/measure?project=fr.kazejiyu.ekumi%3Afr.kazejiyu.ekumi.root&metric=sqale_index)](https://sonarcloud.io/dashboard?id=fr.kazejiyu.ekumi%3Afr.kazejiyu.ekumi.root) [![codecov](https://codecov.io/gh/KazeJiyu/ekumi/branch/master/graph/badge.svg)](https://codecov.io/gh/KazeJiyu/ekumi) [![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=fr.kazejiyu.ekumi%3Afr.kazejiyu.ekumi.root&metric=ncloc)](https://sonarcloud.io/dashboard?id=fr.kazejiyu.ekumi%3Afr.kazejiyu.ekumi.root)
[![Build Status](https://travis-ci.org/KazeJiyu/ekumi.svg?branch=master)](https://travis-ci.org/KazeJiyu/ekumi) [![Documentation Status](https://readthedocs.org/projects/ekumi/badge/?version=latest)](https://ekumi.readthedocs.io/en/latest/?badge=latest) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/01ba3d3e1da44be78cb2267ed051b88a)](https://www.codacy.com/app/KazeJiyu/ekumi?utm_source=github.com&utm_medium=referral&utm_content=KazeJiyu/ekumi&utm_campaign=Badge_Grade) [![Technical Debt](https://sonarcloud.io/api/project_badges/measure?project=fr.kazejiyu.ekumi%3Afr.kazejiyu.ekumi.root&metric=sqale_index)](https://sonarcloud.io/dashboard?id=fr.kazejiyu.ekumi%3Afr.kazejiyu.ekumi.root) [![codecov](https://codecov.io/gh/KazeJiyu/ekumi/branch/master/graph/badge.svg)](https://codecov.io/gh/KazeJiyu/ekumi) [![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=fr.kazejiyu.ekumi%3Afr.kazejiyu.ekumi.root&metric=ncloc)](https://sonarcloud.io/dashboard?id=fr.kazejiyu.ekumi%3Afr.kazejiyu.ekumi.root)

Please check [the documentation](https://ekumi.kazejiyu.fr) for usages (_disclaimer_: the site is under construction).

## Changelog

Expand Down
19 changes: 19 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SOURCEDIR = .
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
183 changes: 183 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
# -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/master/config

# -- Path setup --------------------------------------------------------------

# 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.
#
# import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))


# -- Project information -----------------------------------------------------

project = u'EKumi'
copyright = u'2019, Emmanuel CHEBBI'
author = u'Emmanuel CHEBBI'

# The short X.Y version
version = u''
# The full version, including alpha/beta/rc tags
release = u''


# -- General configuration ---------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
#
# needs_sphinx = '1.0'

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.todo',
'sphinx.ext.githubpages'
]

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
# source_suffix = ['.rst', '.md']
source_suffix = '.rst'

# The master toctree document.
master_doc = 'index'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = [u'_build', 'Thumbs.db', '.DS_Store']

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = None


# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'sphinx_rtd_theme'

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#
# html_theme_options = {}

# 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']

# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
#
# The default sidebars (for documents that don't match any pattern) are
# defined by theme itself. Builtin themes are using these templates by
# default: ``['localtoc.html', 'relations.html', 'sourcelink.html',
# 'searchbox.html']``.
#
# html_sidebars = {}


# -- Options for HTMLHelp output ---------------------------------------------

# Output file base name for HTML help builder.
htmlhelp_basename = 'EKumidoc'


# -- Options for LaTeX output ------------------------------------------------

latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#
# 'papersize': 'letterpaper',

# The font size ('10pt', '11pt' or '12pt').
#
# 'pointsize': '10pt',

# Additional stuff for the LaTeX preamble.
#
# 'preamble': '',

# Latex figure (float) alignment
#
# 'figure_align': 'htbp',
}

# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'EKumi.tex', u'EKumi Documentation',
u'Emmanuel CHEBBI', 'manual'),
]


# -- Options for manual page output ------------------------------------------

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'ekumi', u'EKumi Documentation',
[author], 1)
]


# -- Options for Texinfo output ----------------------------------------------

# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'EKumi', u'EKumi Documentation',
author, 'EKumi', 'One line description of project.',
'Miscellaneous'),
]


# -- Options for Epub output -------------------------------------------------

# Bibliographic Dublin Core info.
epub_title = project

# The unique identifier of the text. This can be a ISBN number
# or the project homepage.
#
# epub_identifier = ''

# A unique identification for the text.
#
# epub_uid = ''

# A list of files that should not be packed into the epub file.
epub_exclude_files = ['search.html']


# -- Extension configuration -------------------------------------------------

# -- Options for todo extension ----------------------------------------------

# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = True
35 changes: 35 additions & 0 deletions docs/design-workflow/create_workflow_project.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
Create a new Workflow project
##############################

.. important:: Section under construction, please come back later!


Use the New Workflow Project wizard
-------------------------------------

To create a new project:

1. ``File`` > ``New...``
2. In the ``EKumi`` category select ``New Workflow Project``.
3. Fill in the name of the project, then ``Next``
4. Fill in the name of the workflow to create
5. Check ``Java`` to allow defining tasks' behaviour using Java
6. Click ``Finish``

Wait a few seconds, then you should see the project being added to the Explorer.

.. note:: If ``Java`` is not available, please see :ref:`part-installing`.

Understand the content of the project
---------------------------------------

The project already contains several files and folders which purposes are important.

- ``model/<workflow.name>.spec``: the specification of the workflow, defining the different tasks which it's made of
- ``representations.aird``: the description of the workflow diagram

If ``Java`` has been selected as a scripting language the following should also exist:

- ``src/``: directory for Java source files
- ``META-INF/MANIFEST.MF``: defines project's dependencies, including EKumi's API
- ``build.properties``: defines the files to include when the project is packaged
16 changes: 16 additions & 0 deletions docs/execute-workflow/execute_workflow.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Execute a workflow
###################

Using the context menu
-----------------------

1. Right-clic on the ``model/<workflow-name>.spec`` file > ``Run As...`` > ``Workflow``

Using a Run Configuration

1. ``Run`` > ``Run Configurations...``
2. Create a new ``Workflow`` configuration
3. Click on ``Browse`` to select the ``.spec`` file defining the workflow to execute
4. Press ``Run``.

.. note:: No debug configuration is currently available.
87 changes: 87 additions & 0 deletions docs/extensibility/add_data_type.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
Add a new Data Type
#############################

.. important:: This section requires some knowledge about `Eclipse Extension Points <https://www.vogella.com/tutorials/EclipseExtensionPoint/article.html>`_.

What is a data type?
------------------------------

A data type is a language that can be used to specify the format of a data. The term data represents both inputs and outputs. Concretely, a datatype is a parser that can:

1. Instantiate an ``Object`` from a given String
2. Create a String from an existing ``Object``.

It is hence responsible of serializing and deserializing data so that they can both be persisted and used during the execution.

How to add a new datatype?
-------------------------------------

A new one can be defined by contributing to the ``fr.kazejiyu.ekumi.model.datatypes`` extension point.

It requires one class that implements the ``DataType<T>`` interface.

The interface is defined as follows:

.. code-block:: java
:linenos:
public interface DataType<T> {
/**
* Returns an identifier for this type.
* @return an identifier for this type.
*/
String getId();
/**
* Returns the name of the type.
* @return the name of the type.
*/
String getName();
/**
* Returns the Java class corresponding to this type.
* @return the Java class corresponding to this type.
*/
Class<T> getJavaClass();
/**
* Returns the default value of a new instance of this type.
* @return the default value of a new instance of this type.
*/
T getDefaultValue();
/**
* Returns a String representation of the type.<br>
* <br>
* For any type {@code type}, the following assertion must be {@code true}:
* <pre>{@code instance.equals( type.unserialize(type.serialize(instance)) );}</pre>
*
* @return a String representation of the type.
*
* @throws DataTypeSerializationException if T cannot be turned into a String
*
* @see #unserialize(String)
*/
String serialize(T instance);
/**
* Returns a new instance of the type from a given representation.<br>
* <br>
* For any type {@code type}, the following assertion must be {@code true}:
* <pre>{@code instance.equals( type.unserialize(type.serialize(instance)) );}</pre>
*
* @param representation
* The string representation of the type.
*
* @throws DataTypeUnserializationException if representation cannot be turned into an instance of T
*
* @see #serialize()
*/
T unserialize(String representation);
}
How to use the new datatype within the workflow diagram editor?
------------------------------------------------------------------------------------

.. important:: Feature not implemented yet.

0 comments on commit 9f53ea9

Please sign in to comment.