Home

Awesome

Build Status Coverage Status Requirements Status

La Simpla Vortaro is a Django website intended to push what's possible with online Esperanto dictionaries.

The main areas of interest:

AGPLv3 licence, see COPYING for details.

Development

Create a virtual environment:

$ mkvirtualenv simpla -p python2
$ pip install -r requirements_pinned.txt

I also recommend the following developer tools:

$ pip install ipdb ipython

Then copy word.db from the GitHub downloads page for this project. It should be in the root of the project with the name word_db. Finally:

$ python manage.py runserver

Creating a database

You can create a database of definitions from the XML files provided by Reta Vortaro. Use ReVo-utilities to create a JSON file of definitions.

Copy the JSON file to the root of the project and call it dictionary.json. You can then create a database with:

$ python manage.py flush --noinput
$ python manage.py shell
In [1]: %run initialise_database.py

Running the tests

The unit tests (as run by Travis) have no dependencies, and can be run with:

$ python manage.py test

The word parsing tests require the full dictionary dataset. Make sure you have word_db set up.

$ DJANGO_SETTINGS_MODULE=settings python _test_parser.py

Dumping requirements

We also keep a dump of a known-good set of packages, which you can update with:

$ pip freeze > requirements_pinned.txt

Deployment

Make sure you turn off debug in settings.py.

Docker

Assuming you have word_db already created and in the working directory:

$ docker build . -t wilfred/simplavortaro:latest
$ docker run -e SECRET_KEY=abc123 --name sv -p 9001:9001 -t -d wilfred/simplavortaro:latest

This image is available on Docker Hub.

To push a new release:

$ docker push wilfred/simplavortaro:latest