Skip to content

sul-cidr/scriptchart-backend

Repository files navigation

Syriac DASH Scriptchart Backend

Admin UI and API for DASH

Development

With a working version on Python 3.7+ and Pipenv:

  1. Install dependencies (use sync instead of install to use Pipfile.lock instead, and ensure a deterministic enviroment)
$ pipenv sync --dev
  1. Create a database (if not created yet) and migrate. A DATABASE_URL can be defined in a .env file or set as an environment variable. See .env_tempate and here for details. It will default to sqlite:///tmp/db.sqlite. (If using MySQL, see the note about MySQL drivers in scriptchart/settings.py)
$ touch tmp/db.sqlite
$ pipenv run python manage.py migrate
  1. Create a superuser
$ pipenv run python manage.py createsuperuser
  1. (Optional) Download and load a database dump
$ pipenv run python manage.py loaddata tmp/scripts.json
  1. Start development server and go to http://localhost:8000/admin/
$ pipenv run python manage.py runserver localhost:8000

Testing

  • Tests
$ pipenv run python manage.py test
  • Linting
$ pipenv run flake8

Deployment

Deployment will happen automatically upon a sucessful merge/rebase from develop to master.