This document provides step-by-step instructions for setting up, building, and testing the DeliteAI coreruntime and the DeliteAI Python SDK.
git clone git@https://github.com/NimbleEdge/deliteAI.git./setup.sh --sdk pythonpython3 -m venv <path-to-virtual-env>
source <path-to-virtual-env>/bin/activate
cd $GIT_ROOT/coreruntime
pip3 install -r requirements.txtNavigate to $GIT_ROOT/coreruntime and run:
export GIT_ROOT="$(git rev-parse --show-toplevel)"
./build.pyThis will compile an executable build/nimble_client/nimble_client from main.cpp.
Pre-requisite:
python3 -m pip install "pybind11[global]"Run:
cd $GIT_ROOT/coreruntime
./build.py --simulatorPre-requisite: Set up mockserver.
cd $GIT_ROOT/coreruntime
rm -rf build
./build.py --testing
cd build
./nimbletestcd $GIT_ROOT/coreruntime
./build.py --simulator
cd ../nimblenet_py/simulation_tests/
python3 -m pytestPre-requisite: For Linux, since we are using Clang for compilation, appropriate gcov needs to be
used. First, identify the clang version being used, using clang --version. Then pass this extra
argument in all the above gcov commands
--gcov-executable="/usr/lib/llvm-{clang version}/bin/llvm-cov gcov".
cd $GIT_ROOT/coreruntime
rm -rf build
./build.py --testing --coverage
cd build
./nimbletest
cd ..
gcovr --html-nested coverage.html
open coverage.htmlcd $GIT_ROOT/coreruntime
./build.py --simulator --coverage
cd $GIT_ROOT/nimblenet_py/simulation_tests
python3 -m pytest
cd ../..
gcovr --html-nested coverage.html
open coverage.htmlThe above two will generate html files with directory structure.
To get merged data from the above two:
Instead of gcovr --html-nested coverage.html do gcovr --json run-1.json and
gcovr --json run-2.json for nimbletest and simulation_tests respectively and then merge the two
files using gcovr --json-add-tracefile "run-*.json" --html-details coverage.html.
This won't generate nested directory structure.