Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
b792d7d
update workflow action versions
nedbat Oct 28, 2024
e6bdc06
test: adjust versions tox runs
nedbat Oct 28, 2024
877b042
build: declare django 5.1 compatibility
nedbat Nov 10, 2024
f4a3aa0
build: django 5.tip dropped 3.10 and 3.11, also test on 3.13
nedbat Jan 27, 2025
8bf14bc
add 3.13 classifier, and tweak setup.py
nedbat Jan 27, 2025
a1f1d93
drop Python 3.8
nedbat Jan 28, 2025
401654a
a few more version fixups
nedbat Jan 28, 2025
464ff86
build: not sure when rst2html.py became rst2html
nedbat Jan 28, 2025
89373eb
declare official support for Django 5.2 (#103)
browniebroke Jun 15, 2025
b1c6340
no need to mention django 5.1 specifically
nedbat Jun 15, 2025
9882b4e
modern license specification
nedbat Jun 15, 2025
0d271c3
build: distributions should include more files
nedbat Jun 15, 2025
cc7784f
docs: keep the change history current
nedbat Jun 15, 2025
9f7a856
build: add testpypi
nedbat Jun 15, 2025
8686b22
try uploading with badges
nedbat Jun 15, 2025
2cd85c6
build: more-usual make targets
nedbat Jun 15, 2025
30856df
build: move packaging and config to pyproject.toml
nedbat Jun 15, 2025
11c54bc
build: remove setup.py and setup.cfg
nedbat Jun 15, 2025
2d727d9
build: fix a packaging tweak; more badges
nedbat Jun 15, 2025
eb65668
build: v3.1.1
nedbat Jun 15, 2025
740bbbe
build: fix the tagging
nedbat Jun 15, 2025
c612c66
fix: django should be a requirement of ours, and make tagging smoother
nedbat Jun 15, 2025
a240028
drop Python 3.9, Django 2.2. Add Python 3.14
nedbat Oct 5, 2025
1c5100c
fix 'make tag'
nedbat Oct 5, 2025
544a761
docs: update license notice to new location
nedbat Nov 9, 2025
0bfaf98
update to new repo location
nedbat Nov 9, 2025
c431828
fully pinned github actions
nedbat Jan 6, 2026
3981950
chore: bump actions/checkout in the action-dependencies group (#105)
dependabot[bot] Jan 25, 2026
53d114a
chore: bump actions/setup-python in the action-dependencies group (#106)
dependabot[bot] Feb 2, 2026
deb19ae
Config option to exclude block tags by regex
rebkwok Feb 21, 2024
ef16c84
Update README
rebkwok Feb 21, 2024
9d56f5f
Merge remote-tracking branch 'origin/master' into sync-fork
rebkwok Feb 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
# For details: https://github.com/nedbat/django_coverage_plugin/blob/master/NOTICE.txt
# For details: https://github.com/coveragepy/django_coverage_plugin/blob/main/NOTICE.txt

# This file is for unifying the coding style for different editors and IDEs.
# More information at http://EditorConfig.org
Expand Down
21 changes: 21 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# From:
# https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/keeping-your-actions-up-to-date-with-dependabot
# Set update schedule for GitHub Actions

version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
# Check for updates to GitHub Actions once a week
interval: "weekly"
day: "sunday"
cooldown:
# https://blog.yossarian.net/2025/11/21/We-should-all-be-using-dependency-cooldowns
default-days: 7
groups:
action-dependencies:
patterns:
- "*"
commit-message:
prefix: "chore"
18 changes: 11 additions & 7 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,21 @@ jobs:
python-version:
# When changing this list, be sure to check the [gh-actions] list in
# tox.ini so that tox will run properly.
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.13"
- "3.14"
fail-fast: false

steps:
- name: "Check out the repo"
uses: "actions/checkout@v3"
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false

- name: "Set up Python"
uses: "actions/setup-python@v4"
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: "${{ matrix.python-version }}"
allow-prereleases: true
Expand Down Expand Up @@ -85,12 +87,14 @@ jobs:

steps:
- name: "Check out the repo"
uses: "actions/checkout@v2"
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false

- name: "Set up Python"
uses: "actions/setup-python@v2"
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: "3.8"
python-version: "3.10"

- name: "Install dependencies"
run: |
Expand Down
21 changes: 9 additions & 12 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
# Licensed under the Apache 2.0 License
# - http://www.apache.org/licenses/LICENSE-2.0
# - https://github.com/nedbat/django_coverage_plugin/blob/master/NOTICE.txt
# - https://github.com/coveragepy/django_coverage_plugin/blob/main/NOTICE.txt

exclude .isort.cfg
exclude howto.txt
exclude Makefile
exclude requirements.txt
exclude tox.ini
exclude .editorconfig
include AUTHORS.txt
include LICENSE.txt
include NOTICE.txt
include README.rst
prune tests
include *.txt
include .editorconfig
include .isort.cfg
include Makefile
include tox.ini

recursive-include .github *
recursive-include tests *.py
19 changes: 14 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
# For details: https://github.com/nedbat/django_coverage_plugin/blob/master/NOTICE.txt
# For details: https://github.com/coveragepy/django_coverage_plugin/blob/main/NOTICE.txt

# Makefile for django_coverage_plugin

.PHONY: help test clean sterile dist pypi test_pypi tag ghrelease

help: ## Show this help.
@echo "Available targets:"
@grep '^[a-zA-Z]' $(MAKEFILE_LIST) | sort | awk -F ':.*?## ' 'NF==2 {printf " %-26s%s\n", $$1, $$2}'
Expand All @@ -24,15 +26,22 @@ clean: ## Remove non-source files.
sterile: clean ## Remove all non-controlled content, even if expensive.
-rm -rf .tox*

kit: ## Make the source distribution.
dist: ## Make the source distribution.
python -m build
python -m twine check dist/*

kit_upload: ## Upload the built distributions to PyPI.
pypi: ## Upload the built distributions to PyPI.
python -m twine upload --verbose dist/*

tag: ## Make a git tag with the version number.
git tag -s -m "Version v$$(python setup.py --version)" v$$(python setup.py --version)
test_pypi: ## Upload the distributions to test PyPI.
python -m twine upload --verbose --repository testpypi --password $$TWINE_TEST_PASSWORD dist/*

_install_e:
python -m pip install -q -e .

tag: _install_e ## Make a git tag with the version number.
@export VER="$$(python -c "import django_coverage_plugin as me; print(me.__version__)")" && \
git tag -s -m "Version v$$VER" v$$VER
git push --all

ghrelease: ## Make a GitHub release for the latest version.
Expand Down
2 changes: 1 addition & 1 deletion NOTICE.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2015-2022 Ned Batchelder. All rights reserved.
Copyright 2015-2025 Ned Batchelder. All rights reserved.

Except where noted otherwise, this software is licensed under the Apache
License, Version 2.0 (the "License"); you may not use this work except in
Expand Down
56 changes: 37 additions & 19 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ Django Template Coverage.py Plugin

A `coverage.py`_ plugin to measure test coverage of Django templates.

.. start-badges
| |status| |kit| |license|
| |versions| |djversions|
| |sponsor| |bluesky-nedbat| |mastodon-nedbat|
.. |status| image:: https://img.shields.io/pypi/status/django_coverage_plugin.svg
:target: https://pypi.python.org/pypi/django_coverage_plugin
Expand All @@ -21,23 +20,31 @@ A `coverage.py`_ plugin to measure test coverage of Django templates.
.. |versions| image:: https://img.shields.io/pypi/pyversions/django_coverage_plugin.svg
:target: https://pypi.python.org/pypi/django_coverage_plugin
:alt: Supported Python Versions
.. |djversions| image:: https://img.shields.io/badge/Django-1.8%20%7C%201.11%20%7C%202.2%20%7C%203.2%20%7C%204.1-44b78b.svg
.. the Django badge says: `3.2 | 4.2 | 5.2`
.. |djversions| image:: https://img.shields.io/badge/Django-3.2%20%7C%204.2%20%7C%205.2-44b78b.svg
:target: https://pypi.python.org/pypi/django_coverage_plugin
:alt: Supported Django Versions
.. |sponsor| image:: https://img.shields.io/badge/%E2%9D%A4-Sponsor%20me-brightgreen?style=flat&logo=GitHub
:target: https://github.com/sponsors/nedbat
:alt: Sponsor me on GitHub
.. |bluesky-nedbat| image:: https://img.shields.io/badge/dynamic/json?style=flat&color=96a3b0&labelColor=3686f7&logo=icloud&logoColor=white&label=@nedbat&url=https%3A%2F%2Fpublic.api.bsky.app%2Fxrpc%2Fapp.bsky.actor.getProfile%3Factor=nedbat.com&query=followersCount
:target: https://bsky.app/profile/nedbat.com
:alt: nedbat on Bluesky
.. |mastodon-nedbat| image:: https://img.shields.io/badge/dynamic/json?style=flat&labelColor=450657&logo=mastodon&logoColor=ffffff&label=@nedbat&query=followers_count&url=https%3A%2F%2Fhachyderm.io%2Fapi%2Fv1%2Faccounts%2Flookup%3Facct=nedbat
:target: https://hachyderm.io/@nedbat
:alt: nedbat on Mastodon

------------------

.. end-badges

Supported on:

- Python: 3.8 through 3.12.
- Python: 3.10 through 3.14.

- Django: 2.x, 3.x and 4.x.
- Django: 3.2 through 5.2.

- Coverage.py: 6.x or higher.

The plugin is pip installable::
The plugin is pip-installable::

$ python3 -m pip install django_coverage_plugin

Expand All @@ -49,8 +56,7 @@ To run it, add this setting to your ``.coveragerc`` file::
Then run your tests under `coverage.py`_.

You will see your templates listed in your coverage report along with
your Python modules. Please use `coverage.py`_ v4.4 or greater to allow
the plugin to identify untested templates.
your Python modules.

If you get a :code:`django.core.exceptions.ImproperlyConfigured` error,
you need to set the :code:`DJANGO_SETTINGS_MODULE` environment variable.
Expand Down Expand Up @@ -137,6 +143,18 @@ History

.. scriv-insert-here
v3.2.0 — 2025-10-05
-------------------

Drop Python 3.9 and Django 2.2. Add Python 3.14.


v3.1.1 — 2025-06-15
-------------------

Support changes: dropped Python 3.8, added Python 3.13. Added Django 5.2.


v3.1.0 — 2023-07-10
-------------------

Expand Down Expand Up @@ -173,7 +191,7 @@ ignore_errors=True`` (`issue 78`_).
When using ``source=.``, an existing coverage HTML report directory would be
found and believed to be unmeasured HTML template files. This is now fixed.

.. _issue 78: https://github.com/nedbat/django_coverage_plugin/issues/78
.. _issue 78: https://github.com/coveragepy/django_coverage_plugin/issues/78


v2.0.1 — 2021-10-06
Expand All @@ -196,9 +214,9 @@ case-sensitively, causing templates to be missed (`issue 46`_).
Fix an issue (`issue 63`_) where tag libraries can't be found if imported
during test collection. Thanks to Daniel Izquierdo for the fix.

.. _issue 46: https://github.com/nedbat/django_coverage_plugin/issues/46
.. _issue 60: https://github.com/nedbat/django_coverage_plugin/issues/60
.. _issue 63: https://github.com/nedbat/django_coverage_plugin/issues/63
.. _issue 46: https://github.com/coveragepy/django_coverage_plugin/issues/46
.. _issue 60: https://github.com/coveragepy/django_coverage_plugin/issues/60
.. _issue 63: https://github.com/coveragepy/django_coverage_plugin/issues/63

v1.8.0 — 2020-01-23
-------------------
Expand Down Expand Up @@ -248,7 +266,7 @@ v1.4.2 — 2017-02-06
Fixes another instance of `issue 32`_, which was the result of an
initialization order problem.

.. _issue 32: https://github.com/nedbat/django_coverage_plugin/issues/32
.. _issue 32: https://github.com/coveragepy/django_coverage_plugin/issues/32


v1.4.1 — 2017-01-25
Expand All @@ -270,8 +288,8 @@ Only the ``django.template.backends.django.DjangoTemplates`` template
engine is supported, and it must be configured with
``['OPTIONS']['debug'] = True``. Fixes `issue 27`_.

.. _issue 28: https://github.com/nedbat/django_coverage_plugin/issues/28
.. _issue 27: https://github.com/nedbat/django_coverage_plugin/issues/27
.. _issue 28: https://github.com/coveragepy/django_coverage_plugin/issues/28
.. _issue 27: https://github.com/coveragepy/django_coverage_plugin/issues/27



Expand All @@ -281,7 +299,7 @@ v1.3.1 — 2016-06-02
Settings are read slightly differently, so as to not interfere with
programs that don't need settings. Fixes `issue 18`_.

.. _issue 18: https://github.com/nedbat/django_coverage_plugin/issues/18
.. _issue 18: https://github.com/coveragepy/django_coverage_plugin/issues/18



Expand Down Expand Up @@ -317,7 +335,7 @@ plugin, and fixes `issue 17`_.
Potential Django 1.9 support is included, but the patch to Django hasn't
been applied yet.

.. _issue 17: https://github.com/nedbat/django_coverage_plugin/issues/17
.. _issue 17: https://github.com/coveragepy/django_coverage_plugin/issues/17



Expand Down
4 changes: 3 additions & 1 deletion django_coverage_plugin/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
# For details: https://github.com/nedbat/django_coverage_plugin/blob/master/NOTICE.txt
# For details: https://github.com/coveragepy/django_coverage_plugin/blob/main/NOTICE.txt

"""Django Template Coverage Plugin"""

__version__ = "3.2.0"

from .plugin import DjangoTemplatePluginException # noqa
from .plugin import DjangoTemplatePlugin

Expand Down
Loading