Skip to content

Latest commit

 

History

History
38 lines (30 loc) · 1.09 KB

DEVELOPMENT.md

File metadata and controls

38 lines (30 loc) · 1.09 KB

Development

Code formatting

We use the black code formatter. Always format the code with black before submitting a pull request.

Testing

Before submitting a pull request, make sure the code passes all the tests and is formatted by black. I would recommend testing this package in an isolated environment, preferably a VM; certainly, avoid doing testing in WSL as it can lead to files being erroneously removed / corrupted from your machine.

# Inside the project root (directory containing this file)
python -m venv venv && source venv/bin/activate
pip install -r requirements.txt
pip install -r requirements-test.txt
mypy
pytest
black .

This should create a virtual environment and install project's all dependencies including the ones required for running the tests, run the tests and finally format the code with black.

Packaging (uploading to PyPI)

In the project root run the following command inside the virtual environment created for testing.

pip install setuptools wheel twine
python setup.py sdist bdist_wheel
twine upload dist/*