The following tools are required:
You can setup your dev environment using tox, an environment orchestrator which allows for setting up environments for and invoking builds, unit tests, formatting, linting, etc. Install tox with:
pip install -r setup_requirements.txt
If you want to manage your own virtual environment instead of using tox
, you can install vllm_detector_adapter
and all dependencies with:
pip install .
Unit tests are enforced by the CI system. When making changes, run the tests before pushing the changes to avoid CI issues.
Running unit tests against all supported Python versions is as simple as:
tox
Running tests against a single Python version can be done with:
tox -e py
vllm-detector-adapter follows the python pep8 coding style. [FUTURE] The coding style is enforced by the CI system, and your PR will fail until the style has been applied correctly.
We use pre-commit to enforce coding style using black, prettier and isort.
You can invoke formatting with:
tox -e fmt
In addition, we use pylint to perform static code analysis of the code.
You can invoke the linting with the following command
tox -e lint