Skip to content

Latest commit

 

History

History
41 lines (29 loc) · 1.62 KB

DEVELOPER_GUIDE.md

File metadata and controls

41 lines (29 loc) · 1.62 KB

Developer Guide

Setting up a DEV environment

We use PDM as a package and dependency manager. You can set up a local python environment for development as follows:

  1. Install package and dependency manager PDM following the instructions here.
  2. Install system dependencies
    • For MacOS: brew install Cmake
    • For Linux (Debian): sudo apt-get install build-essential cmake
  3. Run pdm install -G dev to install the python dependencies. This will create a virtual environment in eva/.venv.

Adding new dependencies

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.

Continuous Integration (CI)

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 with python -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