Files
concrete/docs/dev/GETTING-STARTED.md
2021-08-06 10:54:32 +03:00

2.3 KiB

Getting Started

Preparation

Installing Python v3.8

You can follow this guide.

Installing Poertry

You can follow this guide.

Cloning repository

git clone https://github.com/zama-ai/hdk.git

Setting up environment

cd hdk
make setup_env

Activating the environment

source .venv/bin/activate

Syncing environment with the latest changes

make sync_env

Module Structure

  • hdk
    • common: types and utilities that can be used by multiple frontends (e.g., numpy, torch)
      • bounds_measurement: utilities for determining bounds of intermediate representation
      • data_types: type definitions of typing information of intermediate representation
      • debugging: utilities for printing/displaying intermediate representation
      • representation: type definitions of intermediate representation
      • tracing: utilities for generic function tracing used during intermediate representation creation
    • hnumpy: numpy frontend of hdk

Contributing

Creating a new branch

git checkout -b (feat|fix|refactor|test|benchmark|doc|chore)/short-description

e.g.

git checkout -b feat/explicit-tlu

Before committing

Each commit to hdk should be comformant to the standards decided by the team. Conformance can be checked using the following commands.

make -k pytest
make -k pcc

Before creating pull request

Commits on the latest version of main branch should be rebased to your branch before your PR can be accepted. This is to avoid merge commits and have a clean git log. After you commit your changes to your new branch, you can use the following commands to rebase.

git checkout main
git pull
git checkout $YOUR_BRANCH
git rebase main
git push --force

You can learn more about rebasing in here.

The last requirement before creating your PR is to make sure you get a hundred percent code coverage. You can verify this using the following command.

BB=$YOUR_BRANCH make coverage

If your coverage is below hundred percent, you should write more tests and then create the pull request.