Commit 9a02df7d authored by Lucas Bourneuf's avatar Lucas Bourneuf

improve user doc

parent 2deff54a
......@@ -72,6 +72,10 @@ if you want to update by just running a file.
# API
Biseau is a regular python package, importable with `import biseau`.
See [the example](../examples/api_basics.py) for usage, and [the main](../biseau/__main__.py) for implementation of the CLI, that can be useful.
# Program
......@@ -276,28 +280,11 @@ def run_on(context, *, nb_node:int=10, density:float=0.2):
Note that:
- a `run_on` function can be a generator of string
- script have the responsibility to preserve (or not) the input context. This allow for scripts that hide or modify it, for instance.
- `OUTPUTS` is used when sorting the scripts.
- script have the responsibility to preserve (or not) the input context, unless `ERASE_CONTEXT = False` is given in global scope. This allow for scripts that hide or modify it, for instance.
- `INPUTS` and `OUTPUTS` are used when sorting the scripts: biseau tries to order scripts according to their I/O.
- the docstrings are used in the GUI, as script doc or to populate tooltips.
You will find much more explanations in the [example script](scripts/example.py).
## Container
Instead of letting Biseau infer a `ScriptWidget` from your script (either JSON or Python),
you can provide directly your own `Runnable` subclass.
See [`scripts/context.py`](scripts/context.py) for an example of that.
Note that currently, the interface suffer of some problems, that may
or may not be fixed in the future.
This interface will probably change often, because of its proximity to Biseau core.
# CLI presentation
Currently not implemented.
----
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment