-
Notifications
You must be signed in to change notification settings - Fork 7
Development
Roman Grundkiewicz edited this page Mar 19, 2021
·
6 revisions
First, install requirements and initialize the database following INSTALL.md.
For development install also development requirements from requirements-dev.txt
.
Then, start the server and create your first competition, test set and submission:
- Login to the admin panel (http://127.0.0.1:8000/admin) with your superuser account.
- Add two new languages.
- Add a new competition.
- Add a new test set. For example, WMT test sets in SGML and TXT format can be used. For testing you may use sample data from unit tests.
- Logout and "Register your team". Save the token number.
- Logged in as a team "Create submission". If none test set is available, check the campaign deadline and start time.
- Submissions should be visible on the competition leaderboard.
.
├── evaluation # App implementing comparison of two systems/submissions.
├── leaderboard # App implementing competitions, test sets, submissions, etc.
├── ocelot # Main Django App files
├── submissions # Storage for submitted files, automatically created
└── testsets # Storage for test sets, automatically created
Generating the database diagram. On Ubuntu 20.04, install packages:
sudo apt-get install graphviz-dev graphviz pkg-config python3-pygraphviz
pip install django-extensions pygraphviz graphviz
Add django_extensions
to INSTALLED_APPS
in ocelot/settings.py
, then run:
python manage.py graph_models -a -g -o db.png
The diagram generated for v0.0.1:
Code format/type checks are run automatically for new code. You may test them locally via:
pip install -r requirements-dev.txt # Install development requirements if needed
black -S -l 75 --check .
find . -name "*.py" -not -path "./venv*" | xargs mypy
find . -name "*.py" -not -path "./venv*" | xargs pylint --fail-under 9 --rcfile setup.cfg
find . -name "*.py" -not -path "./venv*" | xargs reorder-python-imports --diff-only
Notes:
- All migration files will start with
# pylint: disable=invalid-name,missing-docstring
Unit tests:
python manage.py test