Skip to content

Commit be7237e

Browse files
committed
Merge branch 'release/0.7'
2 parents e7a38fc + be679fc commit be7237e

36 files changed

+753
-292
lines changed

.flake8

Lines changed: 0 additions & 13 deletions
This file was deleted.

.github/file-filters.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ run_tests:
2424

2525
lint:
2626
- *python
27-
- '.flake8'
2827
- 'pyproject.toml'
2928
- '.github/file-filters.yml'
3029
- '.github/workflows/lint.yml'

.github/workflows/issues.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: 'Close stale issues and PRs'
2+
on:
3+
schedule:
4+
- cron: '30 1 * * *'
5+
6+
jobs:
7+
stale:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/stale@v9
11+
with:
12+
stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.'
13+
days-before-stale: 60
14+
days-before-close: 10

.github/workflows/lint.yml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ jobs:
2929
lint: ${{steps.changes.outputs.lint }}
3030
steps:
3131
- name: Checkout code
32-
uses: actions/checkout@v4
32+
uses: actions/checkout@v4.1.7
3333
- id: changes
3434
name: Check for file changes
35-
uses: dorny/paths-filter@v3
35+
uses: dorny/paths-filter@0bc4621a3135347011ad047f9ecf449bf72ce2bd # v3.0.0
3636
with:
3737
base: ${{ github.ref }}
3838
token: ${{ github.token }}
@@ -47,19 +47,22 @@ jobs:
4747
if: needs.changes.outputs.lint
4848
steps:
4949
- name: Checkout code
50-
uses: actions/checkout@v4
50+
uses: actions/checkout@v4.1.7
5151

5252
- name: Set up Python
5353
uses: actions/setup-python@v5
5454
with:
5555
python-version: 3.12
5656
architecture: 'x64'
5757
- uses: yezz123/setup-uv@v4
58-
with:
59-
version: "latest"
58+
59+
- name: Install deps
60+
run: uv sync --all-groups
61+
6062
- name: lint
6163
if: needs.changes.outputs.lint
62-
run: |
63-
pip install ruff
64-
ruff check -e
65-
ruff format --check
64+
run: uv run tox -e lint
65+
66+
- name: pkg_meta
67+
if: needs.changes.outputs.lint
68+
run: uv run tox -e pkg_meta

.github/workflows/release.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Release to PyPI
2+
on:
3+
push:
4+
tags: ["*"]
5+
6+
env:
7+
dists-artifact-name: python-package-distributions
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
with:
15+
fetch-depth: 0
16+
- name: Install the latest version of uv
17+
uses: astral-sh/setup-uv@v5
18+
with:
19+
enable-cache: true
20+
cache-dependency-glob: "pyproject.toml"
21+
github-token: ${{ secrets.GITHUB_TOKEN }}
22+
- name: Build package
23+
run: uv build --python 3.13 --python-preference only-managed --sdist --wheel . --out-dir dist
24+
- name: Store the distribution packages
25+
uses: actions/upload-artifact@v4
26+
with:
27+
name: ${{ env.dists-artifact-name }}
28+
path: dist/*
29+
30+
release:
31+
needs:
32+
- build
33+
runs-on: ubuntu-latest
34+
environment:
35+
name: release
36+
url: https://pypi.org/project/django-celery-boost/${{ github.ref_name }}
37+
permissions:
38+
id-token: write
39+
steps:
40+
- name: Download all the dists
41+
uses: actions/download-artifact@v4
42+
with:
43+
name: ${{ env.dists-artifact-name }}
44+
path: dist/
45+
- name: Publish to PyPI
46+
uses: pypa/[email protected]
47+
with:
48+
attestations: true

.github/workflows/test.yml

Lines changed: 25 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141

4242
ci:
4343
runs-on: ubuntu-latest
44-
name: Test py${{ matrix.python-version }}/dj${{matrix.django-version}}
44+
name: Test ${{ matrix.cfg }}
4545
services:
4646
redis:
4747
image: redis
@@ -61,8 +61,8 @@ jobs:
6161
strategy:
6262
max-parallel: 1
6363
matrix:
64-
python-version: [ "3.11", "3.12", "3.13" ]
65-
django-version: [ "4.2", "5.1" ]
64+
cfg: [ "d52-py310", "d42-py39" ]
65+
6666
fail-fast: true
6767
needs: [ changes ]
6868
if: needs.changes.outputs.run_tests || needs.changes.outputs.lint
@@ -75,7 +75,7 @@ jobs:
7575
steps:
7676
- name: Checkout code
7777
uses: actions/checkout@v4
78-
- name: Set up Python ${{ matrix.python-version }}
78+
- name: Set up Python
7979
uses: actions/setup-python@v5
8080
with:
8181
python-version: ${{ matrix.python-version }}
@@ -87,40 +87,39 @@ jobs:
8787
path: |
8888
.cache-uv/
8989
.venv/
90-
key: ${{ matrix.python-version }}-${{matrix.django-version}}-${{ hashFiles('pyproject.toml') }}-venv
90+
key: ${{ matrix.cfg}}-${{ hashFiles('pyproject.toml') }}-venv
9191

9292
- uses: yezz123/setup-uv@v4
93-
with:
94-
python: ${{ matrix.python-version }}
9593

96-
- name: Test
97-
# if: needs.changes.outputs.run_tests
98-
run: |
99-
uv add "django==${{ matrix.django-version }}.*"
100-
uv run --cache-dir .cache-uv/ \
101-
python -m pytest tests/ \
102-
--junit-xml junit-${{ matrix.python-version }}-${{matrix.django-version}}.xml \
103-
--cov --cov-report xml
104-
- name: Cache venv
105-
if: steps.cache-venv-restore.outputs.cache-hit != 'true'
106-
id: cache-venv-save
107-
uses: actions/cache/save@v4
94+
- name: Install the latest version of uv
95+
uses: astral-sh/setup-uv@v5
10896
with:
109-
path: |
110-
.cache-uv/
111-
.venv/
112-
key: ${{ matrix.python-version }}-${{matrix.django-version}}-${{ hashFiles('pyproject.toml') }}-venv
97+
version: "latest"
98+
enable-cache: true
99+
cache-dependency-glob: |
100+
pyproject.toml
101+
uv.lock
102+
cache-suffix: ${{ matrix.cfg }}
103+
github-token: ${{ secrets.GITHUB_TOKEN }}
104+
105+
- name: Install tox
106+
run: uv tool install --python-preference only-managed --python 3.13 tox --with tox-uv --with tox-gh-actions
107+
108+
- name: Setup test suite
109+
run: tox run -vv --notest --skip-missing-interpreters false -e ${{ matrix.cfg }}
110+
111+
- name: Run test suite ${{ matrix.cfg }}
112+
run: tox -e ${{ matrix.cfg }}
113113

114114
- name: Upload pytest test results
115115
uses: actions/upload-artifact@v4
116116
with:
117-
name: pytest-results-${{ matrix.python-version }}-${{matrix.django-version}}
118-
path: junit-${{ matrix.python-version }}-${{matrix.django-version}}.xml
117+
name: pytest-results-${{ matrix.cfg }}
118+
path: junit-${{ matrix.cfg }}.xml
119119
if: ${{ always() }}
120120

121121
- name: Upload coverage to Codecov
122122
uses: codecov/codecov-action@v5
123-
if: matrix.python-version == 3.12
124123
continue-on-error: true
125124
with:
126125
env_vars: OS,PYTHON

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,10 @@ uv.lock
1111
!.git
1212
!tests/.coveragerc
1313
!.github
14-
!.flake8
1514
!.gitignore
16-
!.github/
1715
!.mypy.ini
1816
!.pre-commit-config.yaml
1917
!bandit.yaml
2018
coverage.xml
2119
Makefile
20+
src/django_celery_boost/version.py

.mypy.ini

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,10 @@ mypy_path = "$MYPY_CONFIG_FILE_DIR/stubs/:$MYPY_CONFIG_FILE_DIR/src/:"
99
strict = false
1010
ignore_missing_imports = True
1111
namespace_packages = true
12-
;plugins =
13-
; mypy_django_plugin.main
1412

15-
;[mypy.plugins.django-stubs]
16-
;django_settings_module = "bitcaster.config.settings"
17-
18-
[mypy-smart_env.*]
13+
[mypy-sdjango_celery_boost.*]
1914
ignore_missing_imports = True
2015
follow_imports = skip
21-
disable_error_code = type-var,
22-
attr-defined,
23-
truthy-function,
24-
union-attr,
25-
var-annotated,
26-
valid-type,
27-
misc,
28-
attr-defined,
29-
no-any-return,
30-
return,
16+
3117
[mypy-environ.*]
3218
ignore_errors = True

.pre-commit-config.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v5.0.0
4+
hooks:
5+
- id: end-of-file-fixer
6+
- id: trailing-whitespace
7+
- repo: https://github.com/python-jsonschema/check-jsonschema
8+
rev: 0.31.2
9+
hooks:
10+
- id: check-github-workflows
11+
args: [ "--verbose" ]
12+
- repo: https://github.com/tox-dev/tox-ini-fmt
13+
rev: "1.5.0"
14+
hooks:
15+
- id: tox-ini-fmt
16+
args: [ "-p", "lint" ]
17+
- repo: https://github.com/tox-dev/pyproject-fmt
18+
rev: "v2.5.1"
19+
hooks:
20+
- id: pyproject-fmt
21+
- repo: https://github.com/astral-sh/ruff-pre-commit
22+
rev: "v0.9.9"
23+
hooks:
24+
- id: ruff-format
25+
- id: ruff
26+
args: [ "--fix", "--unsafe-fixes", "--exit-non-zero-on-fix" ]
27+
- repo: https://github.com/adamchainz/djade-pre-commit
28+
rev: "1.3.2"
29+
hooks:
30+
- id: djade
31+
args: [ --check, --target-version, "5.1" ]
32+
- repo: meta
33+
hooks:
34+
- id: check-hooks-apply
35+
- id: check-useless-excludes

CHANGES

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
0.6.1
2+
---
3+
* fix DisabledBackend object has no attribute _get_task_meta_for issue
4+
15
0.6
26
---
37
* add AsyncJobModel

0 commit comments

Comments
 (0)