From b7899f2e2ea7294618dc6d8c1ebc06c59b7e8186 Mon Sep 17 00:00:00 2001 From: SANDEEP KUMAR JAISAWAL Date: Wed, 23 Nov 2022 16:31:57 +0530 Subject: [PATCH] Adding more depencies for tm ci process Issue-id: AIMLWF-5 Signed-off-by: SANDEEP KUMAR JAISAWAL Change-Id: I4bd842efbfcb9a08c470eb6a7409a5bed927475e --- tests/README.MD | 16 +++++++++++++--- tests/requirement_tests.txt | 16 ++++++++++++++++ tox.ini | 13 ++++++++++++- 3 files changed, 41 insertions(+), 4 deletions(-) create mode 100644 tests/requirement_tests.txt diff --git a/tests/README.MD b/tests/README.MD index 741424c..ca6c657 100644 --- a/tests/README.MD +++ b/tests/README.MD @@ -25,11 +25,21 @@ tm |setup.py -# Prerequisite to run the test cases -Install training manager as python package +## Prerequisite to run the test cases +Install training manager itself as python package pip3 install . -Example to run test cases. +## Install modelmetricsdk and featurestoresdk as python packages +git clone "https://gerrit.o-ran-sc.org/r/aiml-fw/athp/sdk/feature-store" +git clone "https://gerrit.o-ran-sc.org/r/aiml-fw/athp/sdk/model-storage" + +pip3 install feature-store/. +pip3 install model-storage/. + +## Install all python dependecy packages +pip3 install -r requirements_test.txt + +# Example to run test cases. # Generate test report sudo python3 -m pytest -rA . --capture=tee-sys --cov-report term-missing --cov-report xml:coverage.xml --cov-report html:htmlcov --junitxml test-reports/junit.xml --cov=./ \ No newline at end of file diff --git a/tests/requirement_tests.txt b/tests/requirement_tests.txt new file mode 100644 index 0000000..c01eb38 --- /dev/null +++ b/tests/requirement_tests.txt @@ -0,0 +1,16 @@ + pytest + coverage + pytest-cov + connexion + mock + boto3 + botocore + Flask + Flask-API + Flask-Cors + requests + pandas + PyYAML + python-dotenv + kubernetes + pg8000 \ No newline at end of file diff --git a/tox.ini b/tox.ini index e83fffa..93d1911 100644 --- a/tox.ini +++ b/tox.ini @@ -24,6 +24,7 @@ skipsdist = true basepython = python3.8 deps= pytest + python-pytest coverage pytest-cov connexion @@ -36,7 +37,17 @@ deps= requests pandas PyYAML + python-dotenv + kubernetes + pg8000 -setenv = TESTS_BASE_PATH = {toxinidir}/tests +setenv = cd = {toxinidir}/tests commands = + pip3 install {toxinidir} + + git clone "https://gerrit.o-ran-sc.org/r/aiml-fw/athp/sdk/feature-store" + git clone "https://gerrit.o-ran-sc.org/r/aiml-fw/athp/sdk/model-storage" + + pip3 install feature-store/. + pip3 install model-storage/. pytest --cov-append --cov {toxinidir} --cov-report xml --cov-report term-missing --cov-report html \ No newline at end of file -- 2.16.6