To develop this project, it is recommended to install the following Visual Studio Code extensions:
To format and check your code using pre-commit
, follow these steps:
-
Install
pre-commit
:pre-commit install
-
Run checks on all files:
pre-commit run --all-files
This project uses `pytest` for running unit tests. Follow the steps below to run the tests locally.
poetry install --with dev
- -s parameter: This ensures that loguru outputs log messages directly to the console during test execution, making it easier to observe real-time logs. (pytest -s)
pytest
pytest kodiks_ai_lib/tests/decorator_timeout_test.py
Add the following settings to your settings.json
file for Black
and Flake8
:
{
"editor.defaultFormatter": "ms-python.black-formatter",
"editor.formatOnSave": true,
"black-formatter.args": [
"--line-length",
"120"
],
"[python]": {
"editor.codeActionsOnSave": {
"source.organizeImports": "always"
}
},
"flake8.args": [
"--max-line-length",
"120",
"--extend-ignore",
"E203"
]
}