Developer Notes
This package is still under active development. We are still adding features to it, but contributions are welcomed especially if it is bug fixes or aligns with our development plans:
Simulated annealing and simulated tempering techniques
2D and 3D Voronoi nuclei parameterization utilities
Expanding our scientific examples set by running BayesBay against your own problem
Local setup
To set up the development environment
$ mamba env create -f envs/environment_dev.yml
Or
$ python -m venv bayesbay_dev $ source bayesbay_dev/bin/activate $ pip install -r envs/requirements_dev.txt
To install the package in editable mode
$ python -m pip install -e .
Look at
noxfile.pyfor details on building, testing, formatting and linting.Pre commit is also recommended, so that formatting and notebook executation in the documentation will be done automatically after you make a commit. Set it up by creating a new file
.git/hooks/pre-commitas following:#!/bin/sh black src/bayesbay if git diff --cached --name-status | grep -q 'docs/source/tutorials/*.ipynb'; then cd docs make html fi
Voronoi cache validation
Changes to the planar or spherical Voronoi cache lifecycle can be checked with the standalone numerical validator:
$ python benchmarks/validate_voronoi_cache_equivalence.py
The script runs seeded move, birth, and death sequences for Voronoi2D and
Voronoi2DSphere. It checks every incremental interpolation cache and KD-tree
against a full nearest-site calculation. To compare implementations, run the same
command before and after a change and compare the reported SHA-256 fingerprints.
The number of proposals and interpolation positions can be increased with
--n-proposals and --n-positions.