Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
18 changes: 10 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,20 @@ on: pull_request
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions:
contents: read
jobs:
matrix:
name: Build test matrix
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
persist-credentials: false
ref: ${{ github.event.pull_request.head.sha }}
- name: Setup Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: "3.13"
cache: "pip"
Expand All @@ -37,12 +39,12 @@ jobs:
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
persist-credentials: false
ref: ${{ github.event.pull_request.head.sha }}
- name: Setup Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python }}
cache: "pip"
Expand All @@ -52,7 +54,7 @@ jobs:
pip install $(grep -E "^(tox|tox-uv)==" requirements/local.txt)
tox -e ${{ matrix.tox_env }}
- name: Upload coverage data
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: coverage-data-${{ matrix.tox_env }}
include-hidden-files: true
Expand All @@ -66,17 +68,17 @@ jobs:
if: always()
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
persist-credentials: false
ref: ${{ github.event.pull_request.head.sha }}
- name: Setup Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: "3.13"
cache: "pip"
cache-dependency-path: "requirements/*.txt"
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v8
with:
pattern: coverage-data-*
merge-multiple: true
Expand Down
19 changes: 8 additions & 11 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
tags:
- "*"

permissions:
contents: read

jobs:
build:
name: Build packages
Expand All @@ -13,19 +16,19 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
persist-credentials: false
- name: Setup Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: "3.13"
- name: Build packages
run: |
pip install -r requirements/testing.txt
make package
- name: Upload packages
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: python-package-distributions
path: dist/
Expand All @@ -44,7 +47,7 @@ jobs:

steps:
- name: Download packages
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
with:
name: python-package-distributions
path: dist/
Expand All @@ -65,16 +68,10 @@ jobs:

steps:
- name: Download packages
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
with:
name: python-package-distributions
path: dist/
- name: Sign packages
uses: sigstore/gh-action-sigstore-python@v3.0.0
with:
inputs: >-
./dist/*.tar.gz
./dist/*.whl
- name: Create GitHub Release
env:
GH_TOKEN: ${{ github.token }}
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2018-2024, Developer Society Limited
Copyright (c) 2018-2026, Developer Society Limited
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion findreplace/management/commands/findreplace.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def get_fields(self):
for app in apps.get_app_configs():
for model in app.get_models():
for field in model._meta.get_fields():
if isinstance(field, (models.CharField, models.TextField)):
if isinstance(field, models.CharField | models.TextField):
fields.append(field)

return fields
5 changes: 2 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = '0.2'
description = 'Django Find Replace'
readme = 'README.md'
maintainers = [{ name = 'The Developer Society', email = 'studio@dev.ngo' }]
requires-python = '>= 3.9'
requires-python = '>= 3.10'
dependencies = [
'Django>=3.2',
]
Expand All @@ -14,7 +14,6 @@ classifiers = [
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
Expand All @@ -38,7 +37,7 @@ include = ['findreplace*']

[tool.ruff]
line-length = 99
target-version = 'py39'
target-version = 'py310'

[tool.ruff.lint]
select = [
Expand Down
6 changes: 3 additions & 3 deletions requirements/local.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
-r testing.txt

bump-my-version==0.29.0
bump-my-version==1.3.0
Django>=4.2,<5.0
tox==4.23.2
tox-uv==1.16.2
tox==4.50.3
tox-uv==1.33.4
10 changes: 5 additions & 5 deletions requirements/testing.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
build==1.2.2.post1
check-wheel-contents==0.6.1
coverage==7.6.9
pipdeptree==2.24.0
build==1.4.2
check-wheel-contents==0.6.3
coverage==7.13.5
pipdeptree==2.34.0
ruff==0.8.4
twine==6.0.1
twine==6.2.0
6 changes: 3 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[tox]
envlist =
env_list =
check
lint
py{39,310}-django3.2
py{39,310,311,312}-django4.2
py310-django3.2
py{310,311,312}-django4.2
coverage
no_package = true

Expand Down