Doc: Update documentation

This commit is contained in:
mrjk 2022-02-02 17:44:08 -05:00
parent 8a996ca9dd
commit 53f7584877
8 changed files with 15 additions and 1183 deletions

View File

@ -5,4 +5,9 @@ make clean
#sphinx-apidoc -f -M -o ./api ../kheops/ #sphinx-apidoc -f -M -o ./api ../kheops/
sphinx-apidoc -M -o ./api ../kheops/ sphinx-apidoc -M -o ./api ../kheops/
mkdir -p learn
jupyter nbconvert --to markdown --output=../learn/learn101.md jupyter/learn101.ipynb
# See: https://www.datacamp.com/community/tutorials/jinja2-custom-export-templates-jupyter
make html make html

View File

@ -7,9 +7,9 @@
+ Can be a simple string or complex data + Can be a simple string or complex data
+ Can be anything in json compatible + Can be anything in json compatible
- Kheops will resolve query in 2 parts: - Kheops will resolve query in 2 parts:
+ It will first look in different locations the key. It is usually files, but it can also be an url or anything. The queried data must be a valid json data type (TOFIX: So it works also for yaml, toml .... it supports [anyconfig]() ) + It will first look in different locations the key. It is usually files, but it can also be an url or anything. The queried data must be a valid json data type (TOFIX: So it works also for yaml, toml .... it supports [anyconfig](https://github.com/ssato/python-anyconfig) )
* Example: The `path` strategy will allow you to target * Example: The `path` strategy will allow you to target
+ Then it will process all results and load a [strategy]() to resolve which results to keep. + Then it will process all results and load a strategy to resolve which results to keep.
Example: The `last` strategy consists in keeping always the last result while the `merge` strategy consists in merging inteligentelly data. This is quite useful for dict or lists. Example: The `last` strategy consists in keeping always the last result while the `merge` strategy consists in merging inteligentelly data. This is quite useful for dict or lists.
+ +
- Lookup data in a tree of files - Lookup data in a tree of files
@ -21,8 +21,8 @@
+ Rules match to a key and apply a strategy (essentially determine if and how the different value are merged or replaced). It can also apply filter to the result and modify its content (future). + Rules match to a key and apply a strategy (essentially determine if and how the different value are merged or replaced). It can also apply filter to the result and modify its content (future).
* This is modular * This is modular
* Strategy: last/schema * Strategy: last/schema
- Last will always take the last found value, whatever what it previously found. [schema](plugins/strategy_last.md) - Last will always take the last found value, whatever what it previously found.
- schema: It will take into account the strucutre of the data and try to merge them intelligentelly. See more on [schema](plugins/strategy_schema.md) - schema: It will take into account the strucutre of the data and try to merge them intelligentelly. See more on
+ Then it returns the result + Then it returns the result
- Use cases - Use cases
+ Ansible integration + Ansible integration

View File

@ -13,7 +13,7 @@
+ Rules match to a key and apply a strategy (essentially determine if and how the different value are merged or replaced). It can also apply filter to the result and modify its content (future). + Rules match to a key and apply a strategy (essentially determine if and how the different value are merged or replaced). It can also apply filter to the result and modify its content (future).
* This is modular * This is modular
* Strategy: last/schema * Strategy: last/schema
- Last will always take the last found value, whatever what it previously found. [schema](plugins/strategy_last.md) - Last will always take the last found value, whatever what it previously found.
- schema: It will take into account the strucutre of the data and try to merge them intelligentelly. See more on [schema](plugins/strategy_schema.md) - schema: It will take into account the strucutre of the data and try to merge them intelligentelly.
+ Then it returns the result + Then it returns the result

View File

@ -2,7 +2,7 @@
* 105: Integrations * 105: Integrations
- Integration in Ansible - Integration in Ansible
- Integration as a web server (future) [webserver](webserver.md) - Integration as a web server (future)
- Integration with Puppet - Integration with Puppet
- Integration with Foreman - Integration with Foreman

View File

@ -7,6 +7,7 @@ Learn
:maxdepth: 2 :maxdepth: 2
:caption: Contents: :caption: Contents:
../../learn/learn101.md
100.rst 100.rst
101.md 101.md
102.md 102.md

View File

@ -34,7 +34,6 @@ Content
Python API <api/modules.rst> Python API <api/modules.rst>
Indices and tables Indices and tables
================== ==================
* :ref:`genindex` * :ref:`genindex`

File diff suppressed because it is too large Load Diff

View File

@ -610,11 +610,9 @@
] ]
}, },
{ {
"cell_type": "code", "cell_type": "markdown",
"execution_count": null, "id": "f5413f84",
"id": "b7613ffd",
"metadata": {}, "metadata": {},
"outputs": [],
"source": [ "source": [
"So it's become quite easy to compare the difference between environment, with a simple variable switch:" "So it's become quite easy to compare the difference between environment, with a simple variable switch:"
] ]