Skip to content
Snippets Groups Projects
Commit 0af50e07 authored by René Schöne's avatar René Schöne
Browse files

Switch to mkdocs

parent 604729f6
Branches
Tags
1 merge request!7Resolve "Create pages documentation"
Pipeline #8767 failed
This commit is part of merge request !7. Comments created here will be created in the context of that merge request.
Showing
with 31 additions and 96 deletions
......@@ -39,6 +39,8 @@ test:
tags:
- docker
stage: test
needs:
- build
script:
- ./gradlew --continue --console=plain --info check jacocoTestReport
artifacts:
......@@ -51,7 +53,7 @@ test:
coverage:
image: python:3.7.1-alpine
stage: report
dependencies:
needs:
- test
script:
# - ./gradlew --continue --console=plain -x test jacocoTestReport
......@@ -69,7 +71,7 @@ ragdoc_build:
name: "git-st.inf.tu-dresden.de:4567/jastadd/ragdoc-builder"
entrypoint: [""]
stage: ragdoc_build
dependencies:
needs:
- build
script:
- JAVA_FILES=$(find eraser-base/src/ -name '*.java')
......@@ -83,29 +85,29 @@ ragdoc_view:
name: "git-st.inf.tu-dresden.de:4567/jastadd/ragdoc-view:relations"
entrypoint: [""]
stage: ragdoc_view
dependencies:
needs:
- ragdoc_build
script:
- DATA_DIR=$(pwd -P)/data
- mkdir -p pages/_static/ragdoc
- OUTPUT_DIR=$(pwd -P)/pages/_static/ragdoc
- mkdir -p pages/docs/ragdoc
- OUTPUT_DIR=$(pwd -P)/pages/docs/ragdoc
- cd /ragdoc-view
- ( cd src/ && rm -rf data && ln -s $DATA_DIR )
- /ragdoc-view/build-view.sh --output-path=$OUTPUT_DIR
- ls -lah $OUTPUT_DIR
artifacts:
paths:
- "pages/_static/ragdoc"
- "pages/docs/ragdoc"
pages:
image: python:3.7-alpine
stage: publish
dependencies:
needs:
- ragdoc_view
before_script:
- pip install -U sphinx sphinx-rtd-theme recommonmark sphinxemoji sphinx-markdown-tables
- pip install -U mkdocs mkdocs-macros-plugin mkdocs-git-revision-date-plugin
script:
- sphinx-build -b html pages/ public
- cd pages && mkdocs build
artifacts:
paths:
- public
- "pages/site"
/public/
/site/
/docs/ragdoc/
# Minimal makefile for Sphinx documentation
#
# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = public
# 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)
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- 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('.'))
import sphinx_rtd_theme
# -- Project information -----------------------------------------------------
project = 'Eraser'
copyright = '2021, René Schöne'
author = 'René Schöne'
# -- General configuration ---------------------------------------------------
# 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_rtd_theme',
'recommonmark',
'sphinxemoji.sphinxemoji',
'sphinx_markdown_tables'
]
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# 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 = ['public', 'Thumbs.db', '.DS_Store']
# -- 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'
# 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']
sphinxemoji_style = 'twemoji'
{% block footer %}
<p>{% if config.copyright %}
<small>{{ config.copyright }}<br></small>
{% endif %}
<hr>
Built with <a href="https://www.mkdocs.org/">MkDocs</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
{% if page and page.meta and page.meta.revision_date %}
<small><br><i>Last updated {{ page.meta.revision_date.strftime('%B %d, %Y at %H:%M') }}</i></small>
{% endif %}
</p>
{% endblock %}
File moved
# Inner workings
Please also refer to the [API documentation](_static/ragdoc/index.html)
Please also refer to the [API documentation](ragdoc/index.html)
## openHAB synchronization via MQTT
......@@ -35,7 +35,7 @@ However, those two are intended to be independent of each other.
For retrieving the history, an asynchronous approach was chosen and is described in the following. The sequence diagram shows the important methods called, where ItemType denotes a specific subclass of Item, e.g., `ColorItem` or `ItemWithDoubleState`, and Item denotes the general, common superclass `Item`.
![item-history](_static/item-history.png)
![item-history](img/item-history.png)
To get the history, `getHistory` is called on a specific item returning a list of datapoints of a matching type, e.g., a list of `DoubleStatePoint` for an `ItemWithDoubleState`.
......@@ -48,7 +48,7 @@ This token contains the history, and is returned by the `_history` attribute. If
For events in rules to trigger, `ItemObserver` objects are used. The following figure shows three rules (A, B, C) triggered by two different items (`item1` und `item2`):
![rules-object](_static/rules-object.png)
![rules-object](img/rules-object.png)
To get those wirings, the following code can be used:
......@@ -79,7 +79,7 @@ rC.activateFor(item1);
Changes to `item1` trigger all three rules, whereas changing `item2` only triggers the second rule B.
Triggering a rule works as follows:
![rules-sequence](_static/rules-sequence.png)
![rules-sequence](img/rules-sequence.png)
When the state of `item1` is changed, its observer checks, whether the new change is different to the previous change. If that is the case, it triggers all associated rules, i.e, it calls `rule.trigger()` for every rule in the `TriggeredRuleList`.
The rule checks all conditions (if any), and if all hold, executes all actions (if any).
......
File moved
File moved
File moved
File moved
# Contributing
Please also refer to the [API documentation](_static/ragdoc/index.html)
Please also refer to the [API documentation](ragdoc/index.html)
Steps to create the initial multi-project setup from a single-project setup
......
File moved
File moved
File moved
File moved
File moved
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment