Princeton-CDH / derrida-django

Derrida's Margins - Python/Django web application
https://derridas-margins.princeton.edu
Apache License 2.0
8 stars 1 forks source link
annotation citations derrida digital-humanities django python website

derrida-django

This work is no longer active and has been archived.

A web archive of the project is available at https://github.com/Princeton-CDH/derridas-margins-archive <https://github.com/Princeton-CDH/derridas-margins-archive>_.

The web archive is also available through Princeton Data Commons, along with a CSV file of all URLs found by crawling the site.

Chenoweth, Katie, Koeser, Rebecca Sutton, & Alexander, Baron-Raiffe. (2024). Derrida's Margins web archive [Dataset]. Princeton University. doi:10.34770/yw3y-ze12 <https://doi.org/10.34770/yw3y-ze12>_


.. sphinx-start-marker-do-not-remove

Django web application for Derrida's Margins <https://derridas-margins.princeton.edu/> a DH project sponsored by CDH <https://cdh.princeton.edu/projects/derridas-margins/>.

.. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.5602038.svg :target: https://doi.org/10.5281/zenodo.5602038 :alt: doi:10.5281/zenodo.5602038

.. image:: https://github.com/Princeton-CDH/derrida-django/actions/workflows/unittests.yaml/badge.svg :target: https://github.com/Princeton-CDH/derrida-django/actions/workflows/unittests.yaml :alt: Unit Test status

.. image:: https://codecov.io/gh/Princeton-CDH/derrida-django/branch/main/graph/badge.svg :target: https://codecov.io/gh/Princeton-CDH/derrida-django :alt: Code coverage

Current release documentation <https://princeton-cdh.github.io/derrida-django/>_.

This repository uses git-flow <https://github.com/nvie/gitflow>_ conventions; main 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:

Tests



Python unit tests are written with `py.test <http://doc.pytest.org/>`_ 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

Automated accessibility testing is also possible using `pa11y <https://github.com/pa11y/pa11y>`_
and `pa11y-ci <https://github.com/pa11y/pa11y-ci>`_. To run accessibility tests,
start the server with ``python manage.py runserver`` and then use ``npm``::

    npm run pa11y

The accessibility tests are configured to read options from the ``.pa11yci.json``
file and look for a sitemap at ``localhost:8000/sitemap.xml`` to use to crawl the
site. Additional URLs to test can be added to the `urls` property of the
``.pa11yci.json`` file.

Data
----

To generate the published datasets, run the following commands::

    python manage.py annotation_data
    python manage.py instance_data
    python manage.py insertion_data
    python manage.py reference_data

To ensure that the data conforms to our requirements, install and run the 
`Frictionless Data <https://frictionlessdata.io/>`_ test::

    pip install frictionless
    frictionless validate data/datapackage.json

(This package is not available in Python 3.5)

Documentation
-------------

Documentation is generated using `sphinx <http://www.sphinx-doc.org/>`_.
To generate documentation, first install development requirements::

    pip install -r dev-requirements.txt

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

    cd sphinx-docs
    make html

To build and publish documentation for a release, add the ``gh-pages`` branch
to the ``docs`` folder in your worktree::

  git worktree add -B gh-pages docs origin/gh-pages

In the ``sphinx-docs`` folder, use ``make docs`` to build the HTML documents
and static assets, add it to the docs folder, and commit it for publication on
Github Pages. After the build completes, push to GitHub from the ``docs`` folder.