timweiland / xcurator_backend

Backend for the xCurator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

README

xCurator backend

Welcome! This is the repository for the backend of the xCurator.

Tech stack

Requirements

Development

  • Create a virtual environment and activate it
  • Run pip install -r requirements.txt to install the dependencies
    • On Debian/Ubuntu, you are advised to install the following packages which will install, directly or by dependency, the required geospatial libraries for the GeoDjango framework: $ sudo apt-get install binutils libproj-dev gdal-bin
  • Copy .env.dev.example to .env, change values as you see fit
  • Run python manage.py migrate to create/update the DB
  • Run python manage.py createsuperuser to create an admin account
  • Run python manage.py runserver to start the server
  • Please use a code formatter before committing.
    • I run black automatically on each save
      • TODO: We should add a pre-commit hook for this at some point

Importing data

Baden State Museum data

scripts/transform_to_unqualified_dc.ipynb can be used to transform data from the Baden State Museum to a .zip that contains

  • a file called dc.json containing the museum object metadata
  • a directory called images that contains the images associated with the objects

This .zip can be imported into the backend using the command python manage.py import_dc --zip-path <zip_path>

Questions & Problems

In case you encounter any problems or you have any questions, please raise an issue here on Github.

About

Backend for the xCurator

License:MIT License


Languages

Language:Jupyter Notebook 93.3%Language:Python 6.6%Language:HTML 0.0%