Development & Contributions¶
Development of perfect-freehand-python takes place on Github: bigbluebutton/perfect-freehand-python.
This Python port of the perfect-freehand library is maintained by the BigBlueButton project. Like the original TypeScript version, the code is made available under the MIT license.
Pull requests are welcome! It’s important for the code in this repository to be kept in sync with the TypeScript perfect-freehand library, so if you have any functionality changes that you would like to propose, please send them to the upstream library first for discussion.
Development Environment¶
Start by cloning the perfect-freehand-python git repository:
git clone https://github.com/bigbluebutton/perfect-freehand-python.git
cd perfect-freehand-python
Rather than installing the development dependencies into your global environment, I recommend using venv. Set up a venv and install the dependencies by running the following commands:
python -m venv .venv
source .venv/bin/activate
pip install -r requirements-dev.txt
Every time you’d like to work on the project, you need to run
source .venv/bin/activate
after changing to the project directory.
Common Development Tasks¶
Automatic Formatting¶
Run black with the following command to apply automatic formatting:
black .
You might also be interested in integrating black with your editor.
Running Tests¶
Tests ported from the TypeScript library are implemented using the pytest framework. In the top level source directory, run:
pytest
Static Type-checking¶
This project includes static type hints. These can be checked using mypy. In the top level source directory, run:
mypy
Building documentation¶
The HTML documentation (what you are reading right now!) can be built by running the following command:
sphinx-build docs build/html