Skip to content

Commit

Permalink
Merge branch 'main' into add-replace-url
Browse files Browse the repository at this point in the history
  • Loading branch information
limugob authored Apr 25, 2024
2 parents 2e76f85 + 7930cae commit 14dc64b
Show file tree
Hide file tree
Showing 32 changed files with 1,610 additions and 1,636 deletions.
4 changes: 4 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,9 @@ version: 2
updates:
- package-ecosystem: github-actions
directory: "/"
groups:
"GitHub Actions":
patterns:
- "*"
schedule:
interval: weekly
22 changes: 13 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
Expand All @@ -43,10 +43,10 @@ jobs:
run: tox run -f py$(echo ${{ matrix.python-version }} | tr -d .)

- name: Upload coverage data
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: coverage-data
path: '.coverage.*'
name: coverage-data-${{ matrix.python-version }}
path: '${{ github.workspace }}/.coverage.*'

coverage:
name: Coverage
Expand All @@ -55,27 +55,31 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: '3.12'

- name: Install dependencies
run: python -m pip install --upgrade coverage[toml]

- name: Download data
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: coverage-data
path: ${{ github.workspace }}
pattern: coverage-data-*
merge-multiple: true

- name: Combine coverage and fail if it's <100%
run: |
python -m coverage combine
python -m coverage html --skip-covered --skip-empty
python -m coverage report --fail-under=100
echo "## Coverage summary" >> $GITHUB_STEP_SUMMARY
python -m coverage report --format=markdown >> $GITHUB_STEP_SUMMARY
- name: Upload HTML report
if: ${{ failure() }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: html-report
path: htmlcov
30 changes: 13 additions & 17 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ default_language_version:

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
Expand All @@ -14,7 +14,7 @@ repos:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/tox-dev/pyproject-fmt
rev: 1.5.1
rev: 1.8.0
hooks:
- id: pyproject-fmt
- repo: https://github.com/tox-dev/tox-ini-fmt
Expand All @@ -29,21 +29,21 @@ repos:
- sphinx==6.1.3
- tomli==2.0.1
- repo: https://github.com/sphinx-contrib/sphinx-lint
rev: v0.9.0
rev: v0.9.1
hooks:
- id: sphinx-lint
- repo: https://github.com/asottile/pyupgrade
rev: v3.15.0
rev: v3.15.2
hooks:
- id: pyupgrade
args: [--py38-plus]
- repo: https://github.com/adamchainz/django-upgrade
rev: 1.15.0
rev: 1.16.0
hooks:
- id: django-upgrade
args: [--target-version, '3.2']
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 23.11.0
rev: 24.4.0
hooks:
- id: black
- repo: https://github.com/adamchainz/blacken-docs
Expand All @@ -52,26 +52,22 @@ repos:
- id: blacken-docs
additional_dependencies:
- black==23.1.0
- repo: https://github.com/asottile/reorder-python-imports
rev: v3.12.0
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: reorder-python-imports
args:
- --py38-plus
- --application-directories
- .:example:src
- --add-import
- 'from __future__ import annotations'
- id: isort
name: isort (python)
- repo: https://github.com/PyCQA/flake8
rev: 6.1.0
rev: 7.0.0
hooks:
- id: flake8
additional_dependencies:
- flake8-bugbear
- flake8-comprehensions
- flake8-logging
- flake8-tidy-imports
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.7.1
rev: v1.9.0
hooks:
- id: mypy
additional_dependencies:
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ django-htmx
.. image:: https://img.shields.io/readthedocs/django-htmx?style=for-the-badge
:target: https://django-htmx.readthedocs.io/en/latest/

.. image:: https://img.shields.io/github/actions/workflow/status/adamchainz/django-htmx/main.yml?branch=main&style=for-the-badge
.. image:: https://img.shields.io/github/actions/workflow/status/adamchainz/django-htmx/main.yml.svg?branch=main&style=for-the-badge
:target: https://github.com/adamchainz/django-htmx/actions?workflow=CI

.. image:: https://img.shields.io/badge/Coverage-100%25-success?style=for-the-badge
Expand Down
7 changes: 7 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
Changelog
=========

1.17.3 (2024-03-01)
-------------------

* Change ``reswap()`` type hint for ``method`` to ``str``.

Thanks to Dan Jacob for the report in `Issue #421 <https://github.com/adamchainz/django-htmx/issues/421>`__ and fix in `PR #422 <https://github.com/adamchainz/django-htmx/pull/422>`__.

1.17.2 (2023-11-16)
-------------------

Expand Down
3 changes: 1 addition & 2 deletions example/README.rst
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
Example Application
===================

Use Python 3.11 to set up and run with these commands:
Use Python 3.12 to set up and run with these commands:

.. code-block:: sh
python -m venv .venv
source .venv/bin/activate
python -m pip install -U pip wheel
python -m pip install -r requirements.txt -e ..
DEBUG=1 python manage.py runserver
Expand Down
3 changes: 1 addition & 2 deletions example/example/templates/csrf-demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,10 @@
<input id="id_number"
name="number"
type="text"
placeholder=""></input>
placeholder="">
<button type="submit">
Check if odd
</button>
</p>
</form>
</section>
<section>
Expand Down
12 changes: 6 additions & 6 deletions example/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
#
# This file is autogenerated by pip-compile with python 3.11
# To update, run:
# This file is autogenerated by pip-compile with Python 3.12
# by the following command:
#
# pip-compile
#
asgiref==3.5.2
asgiref==3.7.2
# via django
django==4.1.3
django==5.0
# via -r requirements.in
faker==15.3.1
faker==21.0.0
# via -r requirements.in
python-dateutil==2.8.2
# via faker
six==1.16.0
# via python-dateutil
sqlparse==0.4.3
sqlparse==0.4.4
# via django
15 changes: 12 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ requires = [

[project]
name = "django-htmx"
version = "1.17.2"
version = "1.17.3"
description = "Extensions for using Django with htmx."
readme = {file = "README.rst", content-type = "text/x-rst"}
keywords = [
Expand Down Expand Up @@ -45,8 +45,17 @@ Documentation = "https://django-htmx.readthedocs.io/"
Funding = "https://adamj.eu/books/"
Repository = "https://github.com/adamchainz/django-htmx"

[tool.black]
target-version = ['py38']
[tool.isort]
add_imports = [
"from __future__ import annotations"
]
force_single_line = true
profile = "black"
src_paths = [
".",
"example",
"src",
]

[tool.pytest.ini_options]
addopts = """\
Expand Down
Loading

0 comments on commit 14dc64b

Please sign in to comment.