X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=docs%2Fdevelopers-guide.rst;fp=docs%2Fdevelopers-guide.rst;h=9330ad419f8e5c04dfc9a566cc52f970671d1d05;hb=0dfb5ffe03e6520b1291af0f51c6b8ace6b766aa;hp=0000000000000000000000000000000000000000;hpb=3dcee1f617eb918983bd1431d5f4f492cc5e16c7;p=scp%2Fric-app%2Fkpimon.git diff --git a/docs/developers-guide.rst b/docs/developers-guide.rst new file mode 100644 index 0000000..9330ad4 --- /dev/null +++ b/docs/developers-guide.rst @@ -0,0 +1,58 @@ +.. This work is licensed under a Creative Commons Attribution 4.0 International License. +.. SPDX-License-Identifier: CC-BY-4.0 +.. Copyright (C) 2020 AT&T Intellectual Property + + +Developers Guide +================= + +.. contents:: + :depth: 3 + :local: + + +Version bumping the Xapp +------------------------ + +This project follows semver. When changes are made, update the version strings in: + +#. ``container-tag.yaml`` +#. ``docs/release-notes.rst`` +#. ``setup.py`` +#. ``xapp-descriptor/config.json`` + + +Testing RMR Healthcheck +----------------------- +The following instructions should deploy the QP Driver container in bare docker, and allow you +to test that the RMR healthcheck is working. + +:: + + docker build -t qpd:latest -f Dockerfile . + docker run -d --net=host -e USE_FAKE_SDL=1 qpd:latest + docker exec -it CONTAINER_ID /usr/local/bin/rmr_probe -h 127.0.0.1:4560 + + +Unit Testing +------------ + +Running the unit tests requires the python packages ``tox`` and ``pytest``. + +The RMR library is also required during unit tests. If running directly from tox +(outside a Docker container), install RMR according to its instructions. + +Upon completion, view the test coverage like this: + +:: + + tox + open htmlcov/index.html + +Alternatively, if you cannot install RMR locally, you can run the unit +tests in Docker. This is somewhat less nice because you don't get the +pretty HTML report on coverage. + +:: + + docker build --no-cache -f Dockerfile-Unit-Test .