Developer setup
Prerequisites
This project uses mise to manage tool versions (Python, PDM, prek). Install mise first:
curl https://mise.run | sh
Or via Homebrew:
brew install mise
Getting started
Clone the repository:
git clone --recursive git@github.com:LedgerHQ/python-erc7730.git
cd python-erc7730
Install tools via mise:
mise trust
mise install
This installs the correct versions of Python, PDM (package manager), and prek (git hooks manager).
Install project dependencies:
pdm install --dev
Install git hooks:
prek install
Common tasks
All project tasks are available as PDM scripts:
Command |
Description |
|---|---|
|
Run all linters/formatters via prek |
|
Run the test suite |
|
Build documentation (output at |
|
Run lint + test |
Linting
Linting is managed by prek, a fast Rust-based drop-in replacement for
pre-commit. It uses the same .pre-commit-config.yaml configuration file.
pdm run lint
Testing
pdm run test
By default, deprecated v1 tests and integration tests (full registry) are skipped. To include them:
pdm run test --run-v1 # include deprecated v1 tests
pdm run test --run-integration # include integration tests against the full registry