diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 347275b6a..be9e175e6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -100,11 +100,11 @@ git checkout -b my_feature_branch After you have made changes on this branch, add and commit them when you are ready: ```bash -# lint your code -black . +# black format only the source code +black fastplotlib/ # run tests from the repo root dir -WGPU_FORCE_OFFSCREEN=1 pytest tests/ +RENDERCANVAS_FORCE_OFFSCREEN=1 pytest tests/ # desktop examples pytest -v examples @@ -195,6 +195,13 @@ The tests will produce slightly different imperceptible (to a human) results on ground-truth. A small RMSE tolerance has been chosen, `0.025` for most examples. If the output image and ground-truth image are within that tolerance the test will pass. +If the test image and ground-truth image are above the threshold, the test will fail and a difference image will be located in the follow directory: + +``` +examples/desktop/diffs +examples/notebooks/diffs +``` + Some feature development may require the ground-truth screenshots to be updated. In the event that your changes require this, please do the following: @@ -288,12 +295,12 @@ pip install -e ".[imgui, tests, docs, notebook]" 4) Lint codebase and make sure tests pass ```bash -# lint codebase -black . +# black format only the source code +black fastplotlib/ # run tests # backend tests -WGPU_FORCE_OFFSCREEN=1 pytest tests/ +RENDERCANVAS_FORCE_OFFSCREEN=1 pytest tests/ # desktop examples pytest -v examples