Warning
☢️ This package is under development, it is not a complete Holochain client and is not fully tested! ☢️
The developer environment for this project relies on Holonix, which you can find out more about in the Holochain getting started guide. Once you have Nix installed, you can create a new development environment by entering the following command into your shell at the root of this project:
nix developThen once the Nix shell has spawned, create a virtual environment:
python -m venv .venv
source .venv/bin/activateThen install dependencies using Poetry:
poetry install --no-rootRunning the tests is a good way to check your development environment!
The tests rely on a fixture. The fixture is a simple Holochain app that contains a single zome. It must be built before running the tests. You can do this using:
cd fixture
npm install
npm run build:happ
cd ..If that succeeds then the tests will be able to find the built happ and you can move on to running the tests.
You can run all the tests using:
poetry run pytestTo select a single test suite, pass the path to pytest. For example:
poetry run tests/api/app/client_test.pyTo run a single test, pass the path to the test suite and the use the -k flag. For example:
poetry run pytest tests/api/app/client_test.py -k test_call_zomeTip
By default pytest captures output. Use the -s flag in combination with RUST_LOG=info to debug tests against Holochain.
Linting and formatting are done by one tool, Ruff. Run the linter using:
poetry run ruff checkIf you want it to automatically fix the problems it finds, then use:
poetry run ruff check --fixRun the formatter using:
poetry run ruff format