code: install_deps> python -I -m pip install coverage influxdb 'joblib>=0.3.2' 'mdclogpy<=1.1.1' 'numpy<2' 'pandas<2' pytest pytest-cov ricxappframe==3.2.2 'schedule>=0.0.0' 'scikit-learn<1.4' code: freeze> python -m pip freeze --all code: async-timeout==5.0.1,build==1.6.1,certifi==2026.10.23,charset-normalizer==3.5.2,cloudpickle==3.1.2,coverage==7.16.2,exceptiongroup==1.3.1,hiredis==2.0.0,idna==3.20,influxdb==5.3.2,iniconfig==2.3.1,inotify==0.2.12,inotify-simple==2.0.1,joblib==1.6.0,mdclogpy==1.1.1,msgpack==1.2.3,numpy==1.26.4,packaging==26.3,pandas==1.5.3,pip==26.2.2,pluggy==1.7.0,protobuf==3.20.3,Pygments==2.21.0,pyproject_hooks==1.3.3,pytest==9.1.1,pytest-cov==7.1.0,python-dateutil==3.0.0,pytz==2026.5,redis==4.3.6,requests==2.34.2,ricsdl==3.1.3,ricxappframe==3.2.2,schedule==1.2.2,scikit-learn==1.3.2,scipy==1.15.3,setuptools==84.2.1,six==1.17.0,threadpoolctl==3.7.0,tomli==2.5.0,typing_extensions==4.16.0,tzdata==2026.5,urllib3==2.8.0 code: commands[0]> pytest -v --cov src --cov-report xml --cov-report term-missing --cov-report html --cov-fail-under=50 ============================= test session starts ============================== platform linux -- Python 3.10.6, pytest-9.1.1, pluggy-1.7.0 -- /w/workspace/ric-app-ad-tox-sonarqube/.tox/code/bin/python cachedir: .tox/code/.pytest_cache rootdir: /w/workspace/ric-app-ad-tox-sonarqube plugins: cov-7.1.0 collecting ... collected 4 items tests/test_ad.py::test_database_connection PASSED [ 25%] tests/test_ad.py::test_trainModel PASSED [ 50%] tests/test_ad.py::test_predict_anomaly PASSED [ 75%] tests/test_ad.py::test_msg_to_ts PASSED [100%] =============================== warnings summary =============================== tests/test_ad.py::test_trainModel tests/test_ad.py::test_trainModel tests/test_ad.py::test_trainModel tests/test_ad.py::test_predict_anomaly tests/test_ad.py::test_predict_anomaly tests/test_ad.py::test_predict_anomaly tests/test_ad.py::test_predict_anomaly tests/test_ad.py::test_predict_anomaly /w/workspace/ric-app-ad-tox-sonarqube/.tox/code/lib/python3.10/site-packages/pandas/core/dtypes/cast.py:1641: DeprecationWarning: np.find_common_type is deprecated. Please use `np.result_type` or `np.promote_types`. See https://numpy.org/devdocs/release/1.25.0-notes.html and the docs for more information. (Deprecated NumPy 1.25) return np.find_common_type(types, []) tests/test_ad.py::test_predict_anomaly /w/workspace/ric-app-ad-tox-sonarqube/src/main.py:111: DeprecationWarning: In a future version, `df.iloc[:, i] = newvals` will attempt to set the values inplace instead of always setting a new array. To retain the old behavior, use either `df[df.columns[i]] = newvals` or, if columns are non-unique, `df.isetitem(i, newvals)` df.loc[:, 'RRU.PrbUsedDl'] = df['RRU.PrbUsedDl'].astype('float') -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html ================================ tests coverage ================================ _______________ coverage: platform linux, python 3.10.6-final-0 ________________ Name Stmts Miss Cover Missing ------------------------------------------------- src/__init__.py 0 0 100% src/ad_model.py 67 14 79% 42-43, 50-51, 57-58, 108-112, 121, 123, 125, 129 src/ad_train.py 69 6 91% 56-58, 66-68 src/database.py 94 34 64% 64-75, 85-97, 106-110, 113-118 src/exceptions.py 4 4 0% 18-25 src/insert.py 50 50 0% 21-84 src/main.py 116 65 44% 41-46, 70-83, 106-110, 119-130, 139, 146-163, 167-170, 174-177, 181-185, 190-192 src/processing.py 44 0 100% ------------------------------------------------- TOTAL 444 173 61% Coverage HTML written to dir htmlcov Coverage XML written to file coverage.xml Required test coverage of 50% reached. Total coverage: 61.04% ================== 4 passed, 9 warnings in 118.06s (0:01:58) =================== code: commands[1]> coverage xml -i code: OK ✔ in 2 minutes 37.27 seconds flake8: install_deps> python -I -m pip install flake8 flake8: freeze> python -m pip freeze --all flake8: flake8==7.4.1,mccabe==0.7.0,pip==26.2.2,pycodestyle==2.15.0,pyflakes==4.0.3,setuptools==84.2.1 flake8: commands[0]> flake8 setup.py src tests code: OK (157.27=setup[37.85]+cmd[119.24,0.18] seconds) flake8: OK (2.48=setup[2.24]+cmd[0.24] seconds) congratulations :) (159.79 seconds)