How to install the CBD framework?¶
This section describes the necessary components and steps to take to install the CBD framework.
Dependencies¶
The following dependencies are required:
Python
>= 3.6, as identified by vermin.All additional libraries should be bundled with Python, so no extra installations should be needed.
Changed in version 1.5: Python 2 is no longer supported.
Next, there are some additional optional requirements:
Simulation:
Visualization and Plotting:
GraphViz for generating a graphical version of the dependency graph.
MatPlotLib for plotting data in Matplotlib.
Seaborn for plotting data using Seaborn.
Bokeh for plotting data in Bokeh.
Conversion:
Lark for the
CBD.converters.eq2CBDconverter, to allow the creation of CBDs directly from a textual language.PythonPDEVS for the
CBD.converters.hybridmodule. This allows CBDs to be run inside of DEVS simulations.
Documentation:
Sphinx-Theme for creating the docs.
Installation¶
There are a few ways of using the framework:
Use it as a project dependency. Simply add the
src/CBDfolder to your project and import it w.r.t. the provided path.Edit the
PYTHONPATHorsys.pathvariables to point to thesrcfolder. This way, the execution of your program will recognize things like:from CBD.Core import CBD
Tip
Some code editors (like PyCharm) allow you to mark a directory as “Sources Root”, which basically adds it to your path upon execution.
Execute one of the following commands in the
srcfolder to install the project to your user directory or update it:# BUILDING: python setup.py install --user # UPDATING: python -m pip install .
Standalone¶
There are some additional standalone components that have been made to work with the framework, but can technically be used without the connection to CBDs. These are: