Skip to content

Commit 9d098b1

Browse files
committed
chore: update dependencies
1 parent a065579 commit 9d098b1

File tree

5 files changed

+56
-25
lines changed

5 files changed

+56
-25
lines changed

.github/workflows/release.yml

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: Release python package
22

33
on:
4+
workflow_dispatch: null
45
push:
56
tags:
67
- "*"

.github/workflows/test.yml

+12-10
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ jobs:
2323
python -m pip install --upgrade pip
2424
pip install -e ".[dev]"
2525
26-
- name: Run black
26+
- name: Run formatter
2727
shell: bash
28-
run: black taskiq_faststream
28+
run: ruff format taskiq_faststream
2929

3030
- name: Run mypy
3131
shell: bash
@@ -40,7 +40,7 @@ jobs:
4040
runs-on: ubuntu-latest
4141
strategy:
4242
matrix:
43-
python-version: ["3.8", "3.9", "3.10", "3.11"]
43+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
4444
fail-fast: false
4545

4646
steps:
@@ -61,13 +61,14 @@ jobs:
6161
- name: Test
6262
run: bash scripts/test.sh
6363
env:
64-
COVERAGE_FILE: coverage/.coverage.${{ runner.os }}-py${{ matrix.python-version }}
65-
CONTEXT: ${{ runner.os }}-py${{ matrix.python-version }}
64+
COVERAGE_FILE: coverage/.coverage.${{ runner.os }}-py${{ matrix.python-version }}-${{ matrix.pydantic-version }}
65+
CONTEXT: ${{ runner.os }}-py${{ matrix.python-version }}-${{ matrix.pydantic-version }}
6666
- name: Store coverage files
67-
uses: actions/upload-artifact@v3
67+
uses: actions/upload-artifact@v4
6868
with:
69-
name: coverage
69+
name: .coverage.${{ runner.os }}-py${{ matrix.python-version }}-${{ matrix.pydantic-version }}
7070
path: coverage
71+
if-no-files-found: error
7172

7273
coverage-combine:
7374
needs: [test]
@@ -81,10 +82,11 @@ jobs:
8182
python-version: '3.8'
8283

8384
- name: Get coverage files
84-
uses: actions/download-artifact@v3
85+
uses: actions/download-artifact@v4
8586
with:
86-
name: coverage
87+
pattern: .coverage*
8788
path: coverage
89+
merge-multiple: true
8890

8991
- run: pip install coverage[toml]
9092

@@ -94,7 +96,7 @@ jobs:
9496
- run: coverage html --show-contexts --title "taskiq-faststream coverage for ${{ github.sha }}"
9597

9698
- name: Store coverage html
97-
uses: actions/upload-artifact@v3
99+
uses: actions/upload-artifact@v4
98100
with:
99101
name: coverage-html
100102
path: htmlcov

pyproject.toml

+16-10
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ classifiers = [
2525
"Programming Language :: Python :: 3.9",
2626
"Programming Language :: Python :: 3.10",
2727
"Programming Language :: Python :: 3.11",
28+
"Programming Language :: Python :: 3.12",
2829
"Operating System :: OS Independent",
2930
"Topic :: Software Development :: Libraries :: Python Modules",
3031
"Topic :: Software Development :: Libraries",
@@ -42,7 +43,7 @@ dynamic = ["version"]
4243

4344
dependencies = [
4445
"taskiq>=0.10.0,<1.0.0",
45-
"faststream>=0.2.12,<1.0.0",
46+
"faststream>=0.3.0,<1.0.0",
4647
]
4748

4849
[project.optional-dependencies]
@@ -58,25 +59,27 @@ kafka = [
5859
"faststream[kafka]"
5960
]
6061

62+
redis = [
63+
"faststream[redis]"
64+
]
65+
6166
# local dev
6267
test = [
6368
"taskiq-faststream[nats]",
6469
"taskiq-faststream[rabbit]",
6570
"taskiq-faststream[kafka]",
71+
"taskiq-faststream[redis]",
6672

6773
"coverage[toml]>=7.2.0,<8.0.0",
68-
"pytest==7.4.3",
74+
"pytest>=7.4.0,<8",
6975
]
7076

7177
dev = [
7278
"taskiq-faststream[test]",
7379

74-
"mypy==1.7.1",
75-
"isort==5.13.2",
76-
"black==23.12.0",
77-
"ruff==0.1.8",
78-
"pyupgrade-directories==0.3.0",
79-
"pre-commit==3.6.0",
80+
"mypy>=1.8.0,<1.9.0",
81+
"ruff==0.1.11",
82+
"pre-commit >=3.6.0,<4.0.0",
8083
]
8184

8285
[project.urls]
@@ -139,6 +142,8 @@ select = [
139142
"ISC", # Implicit string concat
140143
"PIE", # Unnecessary code
141144
"T20", # Catch prints
145+
"UP", # pyupgrade
146+
"PERF",# perfomance checks
142147
"PYI", # validate pyi files
143148
"Q", # Checks for quotes
144149
"RSE", # Checks raise statements
@@ -162,6 +167,8 @@ ignore = [
162167
"ANN401", # typing.Any are disallowed in `**kwargs
163168
"PLR0913", # Too many arguments for function call
164169
"D106", # Missing docstring in public nested class
170+
"COM812",
171+
"ISC001",
165172
]
166173
exclude = [".venv/"]
167174

@@ -211,8 +218,7 @@ omit = [
211218
[tool.coverage.report]
212219
show_missing = true
213220
skip_empty = true
214-
exclude_lines = [
215-
".*# pragma: no cover",
221+
exclude_also = [
216222
"if __name__ == .__main__.:",
217223
"self.logger",
218224
"def __repr__",

scripts/lint.sh

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
#!/bin/bash
22

3-
echo "Running pyup_dirs..."
4-
pyup_dirs --py38-plus --recursive taskiq_faststream tests
5-
63
echo "Running ruff..."
74
ruff taskiq_faststream tests --fix
85

9-
echo "Running black..."
10-
black taskiq_faststream tests
6+
echo "Running ruff formatter..."
7+
ruff format taskiq_faststream tests
118

129
echo "Running mypy..."
1310
mypy taskiq_faststream

tests/test_redis.py

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import pytest
2+
from faststream import FastStream
3+
from faststream.redis import RedisBroker, TestRedisBroker
4+
from taskiq import AsyncBroker
5+
6+
from taskiq_faststream import AppWrapper
7+
8+
from .testcase import SchedulerTestcase
9+
10+
11+
@pytest.fixture
12+
def broker() -> RedisBroker:
13+
return RedisBroker()
14+
15+
16+
class TestBroker(SchedulerTestcase):
17+
test_class = TestRedisBroker
18+
subj_name = "channel"
19+
20+
21+
class TestApp(TestBroker):
22+
@staticmethod
23+
def build_taskiq_broker(broker: RedisBroker) -> AsyncBroker:
24+
"""Build AppWrapper."""
25+
return AppWrapper(FastStream(broker))

0 commit comments

Comments
 (0)