Skip to content
Snippets Groups Projects
Commit 52e21348 authored by Florian Spreckelsen's avatar Florian Spreckelsen
Browse files

DOC: Move converters documentation to subdirectory

parent 3ec19b51
Branches
Tags
2 merge requests!181Release 0.9.0,!174XML Converter
Pipeline #54533 passed
src/doc/README_SETUP.md
\ No newline at end of file
# Getting started with the CaosDB Crawler #
## Installation
see INSTALL.md
## Run Unit Tests
1. Install additional dependencies:
- h5py
2. Run `pytest unittests`.
## Documentation ##
We use sphinx to create the documentation. Docstrings in the code should comply
with the Googly style (see link below).
Build documentation in `src/doc` with `make doc`. Note that for the
automatic generation of the complete API documentation, it is
necessary to first install this library with all its optional
dependencies, i.e., `pip install .[h5-crawler,spss]`.
### Requirements ###
- `sphinx`
- `sphinx-autoapi`
- `recommonmark`
- `sphinx-rtd-theme`
### How to contribute ###
- [Google Style Python Docstrings](https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html)
- [Google Style Python Docstrings 2nd reference](https://github.com/google/styleguide/blob/gh-pages/pyguide.md#38-comments-and-docstrings)
- [References to other documentation](https://www.sphinx-doc.org/en/master/usage/extensions/intersphinx.html#role-external)
# Getting started with the CaosDB Crawler #
## Installation
see INSTALL.md
## Run Unit Tests
1. Install additional dependencies:
- h5py
2. Run `pytest unittests`.
## Documentation ##
We use sphinx to create the documentation. Docstrings in the code should comply
with the Googly style (see link below).
Build documentation in `src/doc` with `make doc`. Note that for the
automatic generation of the complete API documentation, it is
necessary to first install this library with all its optional
dependencies, i.e., `pip install .[h5-crawler,spss]`.
### Requirements ###
- `sphinx`
- `sphinx-autoapi`
- `recommonmark`
- `sphinx-rtd-theme`
### How to contribute ###
- [Google Style Python Docstrings](https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html)
- [Google Style Python Docstrings 2nd reference](https://github.com/google/styleguide/blob/gh-pages/pyguide.md#38-comments-and-docstrings)
- [References to other documentation](https://www.sphinx-doc.org/en/master/usage/extensions/intersphinx.html#role-external)
......@@ -183,7 +183,7 @@ in a vairable with the same name (as it is the case for other Records).
Transform Functions
-------------------
You can use transform functions to alter variable values that the crawler consumes (e.g. a string
that was matched with a reg exp). See :doc:`Converter Documentation<converters>`.
that was matched with a reg exp). See :doc:`Converter Documentation<converters/index>`.
You can define your own transform functions by adding the the same way you add custom converters:
......
......@@ -34,7 +34,7 @@ existing StructureElements, Converters create a tree of StructureElements.
.. image:: img/converter.png
:height: 170
See the chapter :std:doc:`Converters<converters>` for details.
See the chapter :std:doc:`Converters<converters/index>` for details.
Relevant sources in:
......
......@@ -5,7 +5,7 @@ Converters treat a StructureElement and during this process create a number of n
StructureElements: the children of the initially treated StructureElement. Thus by treatment of
existing StructureElements, Converters create a tree of StructureElements.
.. image:: img/converter.png
.. image:: ../img/converter.png
:height: 170
Each StructureElement in the tree has a set of properties, organized as
......@@ -112,7 +112,7 @@ list valued property to the Report Record.
There are a number of transform functions that are defined by default (see
``src/caoscrawler/default_transformers.yml``). You can define custom transform functions by adding
them to the cfood definition (see :doc:`CFood Documentation<cfood>`).
them to the cfood definition (see :doc:`CFood Documentation<../cfood>`).
Standard Converters
......@@ -297,7 +297,7 @@ property ``b`` with values "a", "b" and "c", and an ``author``
property which references an ``author`` with a ``full_name`` property
with value "Silvia Scientist":
.. image:: img/properties-from-dict-records-author.png
.. image:: ../img/properties-from-dict-records-author.png
:height: 210
Note how the different dictionary keys are handled differently
......@@ -331,7 +331,7 @@ so that now, a ``Person`` record with a ``full_name`` property with
value "Silvia Scientist" is created as the value of the ``author``
property:
.. image:: img/properties-from-dict-records-person.png
.. image:: ../img/properties-from-dict-records-person.png
:height: 200
For the time being, only the parents of the referenced record can be
......@@ -565,8 +565,10 @@ The basic syntax for adding a custom converter to a definition file is:
package: <python>.<module>.<name>
converter: <PythonClassName>
The Converters section can be either put into the first or the second document of the cfood yaml file.
It can be also part of a single-document yaml cfood file. Please refer to :doc:`the cfood documentation<cfood>` for more details.
The Converters section can be either put into the first or the second
document of the cfood yaml file. It can be also part of a
single-document yaml cfood file. Please refer to :doc:`the cfood
documentation<../cfood>` for more details.
Details:
......
......@@ -10,7 +10,7 @@ CaosDB-Crawler Documentation
Getting started<getting_started/index>
Tutorials<tutorials/index>
Concepts<concepts>
Converters<converters>
Converters<converters/index>
CFoods (Crawler Definitions)<cfood>
Macros<macros>
How to upgrade<how-to-upgrade>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment