Setup development sandbox¶
We are happy you reached this point of the documentation. This will probably mean you want to setup a development sandbox in order to hack on the source code. We appreciate that, you mean it. Let’s go.
Install some needed packages:
apt-get install python3-venv python3-dev docker-compose mosquitto-clients
For installing them on your workstation, you might want to have a look at the Run through Docker. When running Linux, you can also install the infrastructure on your local workstation natively like Setup on Debian and Ubuntu.
The most easy way is to run Mosquitto, InfluxDB, MongoDB and Grafana as Docker containers:
Get the source code¶
mkdir -p develop; cd !$ git clone https://github.com/daq-tools/kotori.git cd kotori
# Create and activate virtualenv make setup-virtualenv source .venv/bin/activate # Set option to make the pip installer prefer binary dependencies # This might prevent compilation steps for some of them export PIP_PREFER_BINARY=1 # Install package pip install --editable=. # Install extra features # Data acquisition base pip install --editable=.[daq] # Data acquisition base, with export features pip install --editable=.[daq,export] # Data acquisition with data sink for binary payloads pip install --editable=.[daq_binary] # Data storage for RDBMS databases and MongoDB pip install --editable=.[storage_plus]
See also Install Python package from PyPI.
Run ad hoc¶
Please follow Kotori.
Add Project to PyCharm by using “Open Directory…”
There’s a Free Community edition of PyCharm, you should really give it a try.
Run as service¶
When having the need to run the application as a system service even while still being in development mode, have a look at Kotori development with systemd. We actively use this scenario for integration scenarios, testing and debugging.