Skip to content

Commit

Permalink
deploy: 3e4199f
Browse files Browse the repository at this point in the history
  • Loading branch information
cribeul committed Feb 5, 2024
0 parents commit 0eb64dd
Show file tree
Hide file tree
Showing 2,579 changed files with 184,961 additions and 0 deletions.
Empty file added .nojekyll
Empty file.
Binary file added doctrees/CONTRIBUTING.doctree
Binary file not shown.
Binary file added doctrees/NOTICE.doctree
Binary file not shown.
Binary file added doctrees/cathy_main.doctree
Binary file not shown.
Binary file added doctrees/change-log.doctree
Binary file not shown.
Binary file added doctrees/code_main.doctree
Binary file not shown.
Binary file added doctrees/develop.doctree
Binary file not shown.
Binary file added doctrees/develop/debug-vscode-action.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added doctrees/develop/style-guide.doctree
Binary file not shown.
Binary file added doctrees/environment.pickle
Binary file not shown.
Binary file added doctrees/gui_main.doctree
Binary file not shown.
Binary file added doctrees/index.doctree
Binary file not shown.
Binary file added doctrees/install_development.doctree
Binary file not shown.
Binary file added doctrees/install_distribution.doctree
Binary file not shown.
Binary file added doctrees/license.doctree
Binary file not shown.
Binary file added doctrees/overview.doctree
Binary file not shown.
Binary file added doctrees/powershell.doctree
Binary file not shown.
Binary file added doctrees/setup.doctree
Binary file not shown.
Binary file added doctrees/system_main.doctree
Binary file not shown.
Binary file added doctrees/workspace_main.doctree
Binary file not shown.
Binary file added functional-json/doctrees/back-to-main.doctree
Binary file not shown.
Binary file not shown.
Binary file added functional-json/doctrees/environment.pickle
Binary file not shown.
Binary file added functional-json/doctrees/functions.doctree
Binary file not shown.
Binary file added functional-json/doctrees/index.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added functional-json/doctrees/ipy/ison-lambda.doctree
Binary file not shown.
Binary file not shown.
Binary file added functional-json/doctrees/language.doctree
Binary file not shown.
Binary file added functional-json/doctrees/license.doctree
Binary file not shown.
Binary file added functional-json/doctrees/parser.doctree
Binary file not shown.
4 changes: 4 additions & 0 deletions functional-json/html/.buildinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 5bb89d857d0771f19ff14f7e6f5ae9f6
tags: 645f666f9bcd5a90fca523b33c5a78b7
21 changes: 21 additions & 0 deletions functional-json/html/_sources/back-to-main.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!---
<LICENSE id="CC BY-SA 4.0">
Image-Render Automation Functions module documentation
Copyright 2022 Robert Bosch GmbH and its subsidiaries
This work is licensed under the
Creative Commons Attribution-ShareAlike 4.0 International License.
To view a copy of this license, visit
http://creativecommons.org/licenses/by-sa/4.0/
or send a letter to
Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.
</LICENSE>
--->

# Back to main documentation

<a href="../../html/index.html">Go back to main page...</a>
118 changes: 118 additions & 0 deletions functional-json/html/_sources/develop/style-guide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@

## Programming Style Guide

### Linter & Autoformatter

Use `black` as auto formatter and `flake8` as linter. For `flake8` set the following paramters:

| Parameter | Value |
| --------------- | ----- |
| max-line-length | 120 |
| ignore | E203 |
| | |

For `black` set the following parameters:

| Parameter | Value |
| ----------- | ----- |
| line-length | 120 |
| | |

In VS-Code use the following settings:
:::json
"python.formatting.provider": "black",
"python.formatting.blackArgs": [
"--line-length",
"120"
],
"editor.formatOnSave": true,
"python.linting.flake8Enabled": true,
"python.linting.pylintEnabled": false,
"python.linting.enabled": true,
"python.linting.flake8Args": [
"--max-line-length=120",
"--ignore=E203"
],
:::

### Variable Conventions

Variable names need to start with a lower-case letter indicating the variable type. This helps other programmers to understand your code more easily. For example, a variable of type `dict` must start with `dic`, as in `dicValues`. The first letter of descriptive name must start with a capital letter. If there are mulitple words, use camel-case, as in `dicHouseHeights`.

*Ideally*, variable names should read from the general to the specific. For example, `iCameraCount` first gives the variable type, then the object it describes an aspect of and lastly what specific parameter it contains.


| Type | Prefix | Example |
| ------------ | ------ | ----------- |
| `int` | `i` | `iIdx` |
| `float` | `f` | `fAngle` |
| `bool` | `b` | `bIsValid` |
| `str` | `s` | `sName` |
| `dict` | `dic` | `dicValues` |
| `list` | `l` | `lValues` |
| `enum class` | `e` | `eType` |
| other | `x` | `xMyClass` |
| | | |

If you know that a variable can have more than one type and you know which types, then list them after an `x` at the beginning of the variable name. For example, a variable that can be list or integer is named `xilValue`. For dictionaries, just use `d` in this case, as in `xidValue` for a variable that can be integer or dictionary. Variables that can be anything start with an `x`.

Regarding **class instances**, if the meaning of your class can be abbreviated well, then use this as prefix for a variable. For example, a variable of type `pathlib.Path` should be written `pathFile`.

**Blender variable types**:

| Type | Prefix | Example |
| ----------- | ------ | ------------ |
| objects | `obj` | `objCube` |
| collections | `cln` | `clnCameras` |
| | | |

Variables of variable type or complex types like classes, must start with an `x`.

If it is not clear for the linter of what type a variable is from the variable initialization, then declare its' type.

### Function Conventions

Function names start with a capital letter and use camel-case for multiple words, as in `MyWonderfulFunction`. This distinguishes them from variable names.

*Ideally*, use type attributes whereever possible. You may need to import the `typing` module to achieve this. For example,

:::python
from typing import Optional

def Run(*,
_sWsName: str,
_sPathTrg: Optional[str] = None,
_bForce: bool = False,
_bDoList: bool = False
) -> bool:
:::

**Function interface argument** names must start with an underscore (as in the example above), so that there is a distinction between interface variables and local variables in the function body.

### Classes

- *Ideally*, each class should be defined in its own python file.
- The filename *must* start with `cls_` as in `cls_complex.py`.
- The class typenames *must* start with a capital `C`, as in `CWorkspace`. This clearly differentiates a class instance initialization from a function call.
- Classes derived from type `enum.Enum` must have a name that starts with a capital `E`, as in `EMyEnum`.


### Block-end Comments

All ends of indented block that are required by Python need a `# end[command] [comment]` line at the end. For example, `if`, `for`, `while`, `with`, `def`, `class`, etc. require you to indent the containing code. These blocks must be ended like this:
:::python
def MyFunc():
while bA is True:
MyCode()
if iA > 2:
RunNow()
with pathA.open("w") as xFile:
WriteToFile(xFile)
# endwith
# endif iA > 2
MoreWork()
# endwhile bA is True
# enddef MyFunc()
:::

*Ideally*, for long code blocks, there is a comment behind the `# end[...]`, so that you can immediately see what this end belongs to.
14 changes: 14 additions & 0 deletions functional-json/html/_sources/functions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# ISON Functions

This is a reference documentation of the available functions in the default ISON parser. Note that additional function modules can be registered with the parser. These functions will be documented in the corresponding documentation.

**Contents**
- {doc}`ipy/ison-functions-convert`
- {doc}`ipy/ison-functions-file`
- {doc}`ipy/ison-functions-logic`
- {doc}`ipy/ison-functions-math`
- {doc}`ipy/ison-functions-string`
- {doc}`ipy/ison-functions-struct`
- {doc}`ipy/ison-functions-lambda`
- {doc}`ipy/ison-functions-special`

46 changes: 46 additions & 0 deletions functional-json/html/_sources/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@

.. # <LICENSE id="CC BY-SA 4.0">
.. #
.. #
.. # Functional JSON module documentation
.. # Copyright 2022 Robert Bosch GmbH and its subsidiaries
.. #
.. # This work is licensed under the
.. #
.. # Creative Commons Attribution-ShareAlike 4.0 International License.
.. #
.. # To view a copy of this license, visit
.. # http://creativecommons.org/licenses/by-sa/4.0/
.. # or send a letter to
.. # Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.
.. #
.. #
.. # </LICENSE>
.. Functional Json documentation master file, created by
sphinx-quickstart on Wed May 18 12:40:44 2022.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
ISON - Functional JSON
===========================================
*A JSON compatible functional programming language*


.. toctree::
:maxdepth: 4
:caption: Contents:

language
functions
parser
license
back-to-main


.. Indices and tables
.. ==================
.. * :ref:`genindex`
.. * :ref:`modindex`
.. * :ref:`search`
Loading

0 comments on commit 0eb64dd

Please sign in to comment.