K0nkere / MLOps_Car-prices-project

Covers the most important stages of ML system / Auction car prices prediction model for MLOps-zoomcamp
0 stars 0 forks source link

5.1 Unit & integration tests #6

Open K0nkere opened 2 years ago

K0nkere commented 2 years ago

As soon as I am creating unit tests for the prediction service its need open a new VSCode window choosing /project/prediction_service/ as start folder and create tests folder in it.

Launching pipenv shell and its need to add pytest as a dev package pipenv install --dev pytest

which python > path to python > CTRL+SHIFT+P and Input new Interpreter > Select Interpreter There is a convention for naming test files so its need to create two files in the tests folder __init__.py - init file test_predict.py - file that contains unit tests !!! the name of folder that contain tests == tests is obligatory and important !!! scripts name in format test_***.py is important !!!

When we !!! clone the repo and install the pipenv from Pipfile !!! via pipenv install if we want to install all --dev dependences from it its need to run pipenv install --dev lib1 lib2 lib3 - for the development purposes like tests, linting, black and etc

Better to do it at start example pipenv install -r requirements.txt --dev deepdiff --python=3.9

K0nkere commented 2 years ago

How to

description of os.path functions