X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=docs%2Fdeveloper-guide.rst;h=6892d1514c818180246673617fcc8b7e520cf810;hb=73b11c8f6fc42327bcfba1e256f9cc3d4d044949;hp=85a3cfd0946fb08766ae10dfc6f98df32b12aa2a;hpb=2407cdc0fd08abf96999473f172acbe23bc2af33;p=ric-plt%2Fxapp-frame-py.git diff --git a/docs/developer-guide.rst b/docs/developer-guide.rst index 85a3cfd..6892d15 100644 --- a/docs/developer-guide.rst +++ b/docs/developer-guide.rst @@ -1,37 +1,73 @@ .. This work is licensed under a Creative Commons Attribution 4.0 International License. -.. http://creativecommons.org/licenses/by/4.0 +.. SPDX-License-Identifier: CC-BY-4.0 +.. Copyright (C) 2020 AT&T Intellectual Property Developer Guide =============== -.. contents:: - :depth: 3 - :local: +This document explains how to maintain the RIC Xapp framework. +Information for users of this framework (i.e., Xapp developers) is in the User Guide. + +Tech Stack +---------- + +The framework requires Python version 3.7 or later, and depends on +these packages provided by the O-RAN-SC project and third parties: + +* msgpack +* mdclogpy +* ricsdl +* protobuf + Version bumping the framework ----------------------------- This project follows semver. When changes are made, the versions are in: -1) ``docs/release-notes.rst`` - -2) ``setup.py`` +#. ``docs/release-notes.rst`` +#. ``setup.py`` Version bumping RMR ------------------- -These items in this repo must be kept in sync: -* Dockerfile-Unit-Test -* examples/Dockerfile-Ping -* examples/Dockerfile-Pong -* ``rmr-version.yaml`` controls what rmr gets installed for unit testing in Jenkins +These items in this repo must be kept in sync with the RMR version: + +#. Dockerfile-Unit-Test +#. examples/Dockerfile-Ping +#. examples/Dockerfile-Pong +#. ``rmr-version.yaml`` controls what version of RMR is installed for + unit testing in Jenkins CI + +Registration/Deregistartion of Xapp +----------------------------------- + +For registration and deregistration of Xapp following items need to be defined: + +#. CONFIG_FILE_PATH variable as a environment variable in Dockerfile if running + Xapp as a docker container or in configmap in case of Xapp as a pod. +#. Copy the xappConfig.json into the docker image in Dockerfile. Unit Testing ------------ -You can run the unit tests in Docker to avoid installing RMR locally: +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 -f Dockerfile-Unit-Test . + docker build --no-cache -f Dockerfile-Unit-Test .