Derrida documentation

Django web application for Derrida’s Margins a DH project sponsored by CDH.

DOI: 10.5281/zenodo.1299972 Build status Code coverage Maintainability Requirements Status

Current release documentation.

This repository uses git-flow conventions; master contains the most recent release, and work in progress will be on the develop branch. Pull requests should be made against develop.

Python 3.5 / Django 1.11 / Node 8.16.0 / MariaDB (MySQL) 5.5 w/ timezone info

License

derrida-django is distributed under the Apache 2.0 License.

©2018 Trustees of Princeton University. Permission granted via Princeton Docket #18-3472-1 for distribution online under a standard Open Source license. Ownership rights transferred to Rebecca Koeser provided software is distributed online via open source.

Development instructions

Initial setup and installation:

  • recommended: create and activate a python 3.5 virtualenv:

    virtualenv derrida -p python3.5
    source derrida/bin/activate
    
  • Use pip to install required python dependencies:

    pip install -r requirements.txt
    pip install -r dev-requirements.txt
    
  • Copy sample local settings and configure for your environment:

    cp derrida/local_settings.py.sample derrida/local_settings.py
    
  • Download required fonts from project folder and add to /sitemedia/fonts

  • Create a database, configure in local settings, and run migrations:

    python manage.py migrate
    
  • Create a Solr core, configure it, and index content:

    python manage.py build_solr_schema --configure-directory=/path/to/solr/derrida/conf --reload-core derrida
    python manage.py rebuild_index --noinput
    
  • If running this application on MariaDB/MySQL, you must make sure that time zone definitions are installed. On most flavors of Linux/MacOS, you may use the following command, which will prompt for the database server’s root password:

    mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root mysql -p
    

    If this command does not work, make sure you have the command line utilities for MariaDB/MySQL installed and consult the documentation for your OS for timezone info. Windows users will need to install a copy of the zoneinfo files.

    See MariaDB’s info on the utility for more information.

Unit Tests

Unit tests are written with py.test but use Django fixture loading and convenience testing methods when that makes things easier. To run them, first install development requirements:

pip install -r dev-requirements.txt

Configure a Solr core for testing and update with the built solr schema using the same build_solr_schema manage command as for development, above. (The test Solr core will be cleared and reindexed for tests of functionality that require Solr.) Any new unit tests that require Solr should use Django override_settings to use the test connection.

Run tests using py.test:

py.test

Documentation

Documentation is generated using sphinx To generate documentation, first install development requirements:

pip install -r dev-requirements.txt

Then build the documentation using the customized make file in the docs directory:

cd sphinx-docs
make html

When building documentation for a production release, use make docs to update the published documentation on GitHub Pages.

Indices and tables