Contributing#
Setup#
Clone the repository:
git clone git@github.com:open-contracting/spoonbill.git
cd spoonbill
Create a virtual environment. For example:
python3 -m venv .venv
source .venv/bin/activate
Install the development requirements:
pip install -e .[test] babel
Install the pre-commit script:
pip install pre-commit
pre-commit install
Testing#
Compile the message catalogs:
pybabel compile -f -d spoonbill/locale -D spoonbill
Run the tests:
pytest
If you want to lint the working copy, use following command:
pre-commit run -a
Translation#
Extract messages:
pybabel extract -o spoonbill/locale/messages.pot .
Update catalogs:
pybabel update -i spoonbill/locale/messages.pot -d spoonbill/locale -D spoonbill
Compile catalogs:
pybabel compile -f -d spoonbill/locale -D spoonbill
Use the Transifex Client to push and pull translations from Transifex.