Skip to content

Commit

Permalink
Merge pull request #130 from fastmachinelearning/feature/readme_dev_u…
Browse files Browse the repository at this point in the history
…pdates

Updates to dev docs: pip upgrade, linting
  • Loading branch information
maltanar authored Aug 9, 2024
2 parents db969e6 + b0a6088 commit 326a525
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,16 +115,19 @@ Please see the documentation of the `QuantToQCDQ` transformation to learn more a

## Development

Install in editable mode in a venv:
Install in editable mode in a Python virtual environment:

```
git clone https://github.com/fastmachinelearning/qonnx
cd qonnx
virtualenv -p python3.8 venv
source venv/bin/activate
pip install --upgrade pip
pip install -e .[qkeras,testing]
```

### Running tests

Run entire test suite, parallelized across CPU cores:
```
pytest -n auto --verbose
Expand All @@ -135,6 +138,22 @@ Run a particular test and fall into pdb if it fails:
pytest --pdb -k "test_extend_partition.py::test_extend_partition[extend_id1-2]"
```

### Linting

If you plan to make pull requests to the qonnx repo, linting will be required.
We use a pre-commit hook to auto-format Python code and check for issues. See https://pre-commit.com/ for installation. Once you have `pre-commit`,
you can install the hooks into your local clone of the qonnx repo:

```
cd qonnx
source venv/bin/activate
pip install pre-commit
pre-commit install
```

Every time you commit some code, the pre-commit hooks will first run, performing various checks and fixes. In some cases pre-commit won’t be able to
fix the issues and you may have to fix it manually, then run git commit once again. The checks are configured in .pre-commit-config.yaml under the repo root.

## Why QONNX?

The QONNX representation has several advantages compared to other alternatives, as summarized in the table below.
Expand Down

0 comments on commit 326a525

Please sign in to comment.