Skip to content

Latest commit

 

History

History
103 lines (70 loc) · 1.36 KB

README.md

File metadata and controls

103 lines (70 loc) · 1.36 KB

spoonbill-web

A web frontend to convert OCDS data from JSON to Excel/CSV

Install requirememnts

pip install -r requirements_dev.txt
pre-commit install
cd frontend
npm install

Run tests

coverage run --source=core,spoonbill_web -m pytest -W error --no-migrations
cd frontend
npx vue-cli-service lint
npx vue-cli-service test:unit

Run servers

./manage.py migrate
./manage.py runserver
cd frontend
npx vue-cli-service serve

Run workers

Start celery worker:

celery -A spoonbill_web worker -l INFO --concurrency=2

Start celery beat:

celery -A spoonbill_web beat -l INFO --scheduler django_celery_beat.schedulers:DatabaseScheduler

Internationalization

Django

Extract messages:

./manage.py makemessages -a

Push to Transifex:

tx push -s -t

Pull from Transifex:

tx pull -a

Compile messages:

django-admin compilemessages

Vue

Change into the frontend/ directory:

cd frontend

Extract messages:

npx gettext-extract --removeHTMLWhitespaces --output web-app-ui.pot src/main.js $(find src -type f -name '*.vue')

Push and pull messages from Transifex as above.

Compile messages:

npx gettext-compile --output src/translations/translations.json <filenames>