An implementation of Arbor.js and related tools, for Python 3.7+ (tests also require node.js, preferably v11+)
N.B. This is a work in progress, but isn't really being worked on (by me, anyway): it will eventually be replaced by bindings to a rust implementation which could also be used in the frontend as WASM. Pull requests are welcome, however!
- Development install with
make install-dev
- Format code with
make fmt
(usesblack
) - Lint with
make lint
(usespyflakes
) - Test with
make test
(usespytest
)
- This also downloads the reference JS implementation, runs them on a real arbor, and dumps them out for reference
Run hooks/install.sh
(unix-only) to install a pre-commit hook which formats changed python files
and runs the linter.
Test results and benchmarks are compared to the original javascript implementation, run in node. This test harness is a git submodule which may need to be pulled in, installed and then populated with
git submodules --init --recursive
cd tests/arbor-harness
npm install
npm start
althought make test
should do all of this for you.
Tests of functions which run very slowly are run by default;
use pytest --skipslow
to skip them,
and @pytest.mark.slow
to mark new tests as slow.