Development¶
Clone:
$ git clone https://github.com/tony/django-docutils.git
$ cd django-docutils
Install packages:
$ uv sync --all-extras --dev
Codebase map¶
The Django-facing entry points are the template tag and filter in
django_docutils.templatetags.django_docutils, the template backend in
django_docutils.template, and DocutilsView in django_docutils.views.
They all hand source to the publisher helpers in django_docutils.lib, where
roles, directives, transforms, writers, settings, and sanitization are applied.
Running tests¶
$ uv run pytest
Run a single test file:
$ uv run pytest tests/test_template.py
Watch tests:
$ uv run ptw .
Building docs¶
$ just build-docs
Run Sphinx doctests:
$ just -f docs/justfile doctest
Live reload:
$ just start-docs
Before committing, run the full local gate from the repository root:
$ rm -rf docs/_build
$ uv run ruff check . --fix --show-fixes
$ uv run ruff format .
$ uv run mypy .
$ uv run py.test --reruns 0 -vvv
$ just build-docs