We use PDM as a package and dependency manager. You can set up a local python environment for development as follows:
- Install package and dependency manager PDM following the instructions here.
- Install system dependencies
- For MacOS:
brew install Cmake
- For Linux (Debian):
sudo apt-get install build-essential cmake
- For MacOS:
- Run
pdm install -G dev
to install the python dependencies. This will create a virtual environment ineva/.venv
.
Add a new dependency to the core
submodule:
pdm add <package_name>
Add a new dependency to the vision
submodule:
pdm add -G vision <package_name>
After adding a new dependency, you also need to update the pdm.lock
file:
pdm update
For more information about managing dependencies please look here.
For testing automation, we use nox
.
Installation:
- with brew:
brew install nox
- with pip:
pip install --user --upgrade nox
(this way, you might need to run nox commands withpython -m nox
or specify an alias)
Commands:
nox
to run all the automation tests.nox -s fmt
to run the code formatting tests.nox -s lint
to run the code lining tests.nox -s check
to run the type-annotation tests.nox -s test
to run the unit tests.nox -s test -- tests/eva/metrics/test_average_loss.py
to run specific tests