open-contracting / spoonbill-web

A web frontend to convert OCDS data from JSON to Excel/CSV
BSD 3-Clause "New" or "Revised" License
3 stars 2 forks source link

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 core worker -l INFO --concurrency=2

Start celery beat:

celery -A core 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>