Skip to content

Commit cd55108

Browse files
authored
Merge pull request #15 from mutating/develop
0.0.12
2 parents 17f0a38 + d005d73 commit cd55108

4 files changed

Lines changed: 77 additions & 18 deletions

File tree

.github/workflows/lint.yml

Lines changed: 34 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@ name: Lint
33
on: push
44

55
jobs:
6+
# Основной джоб для современных версий
67
build:
78
runs-on: ubuntu-latest
89
strategy:
910
matrix:
11+
# Вернули чистый список без 3.9.1
1012
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14", "3.14t", "3.15.0-alpha.1"]
1113

1214
steps:
@@ -21,30 +23,53 @@ jobs:
2123
uses: actions/cache@v4
2224
with:
2325
path: ~/.cache/pip
24-
key: ${{ runner.os }}-pip-${{ github.workflow }}-${{ hashFiles('requirements_dev.txt') }}
25-
restore-keys: |
26-
${{ runner.os }}-pip-${{ github.workflow }}-
26+
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ github.workflow }}-${{ hashFiles('requirements_dev.txt') }}
27+
28+
- name: Install dependencies
29+
run: pip install -r requirements_dev.txt
30+
31+
- name: Install the library
32+
run: pip install .
33+
34+
- name: Run ruff
35+
run: ruff check transfunctions
36+
37+
- name: Run ruff for tests
38+
run: ruff check tests
39+
40+
- name: Run mypy
41+
run: mypy --strict transfunctions
42+
43+
- name: Run mypy for tests
44+
run: mypy tests --exclude typing
45+
46+
# A separate job specifically for bug testing in Python 3.9.1 (Linux only)
47+
build-3-9-1:
48+
runs-on: ubuntu-latest
49+
container: python:3.9.1
50+
steps:
51+
- uses: actions/checkout@v4
52+
53+
- name: Cache pip dependencies
54+
uses: actions/cache@v4
55+
with:
56+
path: ~/.cache/pip
57+
key: debian-pip-3.9.1-${{ github.workflow }}-${{ hashFiles('requirements_dev.txt') }}
2758

2859
- name: Install dependencies
29-
shell: bash
3060
run: pip install -r requirements_dev.txt
3161

3262
- name: Install the library
33-
shell: bash
3463
run: pip install .
3564

3665
- name: Run ruff
37-
shell: bash
3866
run: ruff check transfunctions
3967

4068
- name: Run ruff for tests
41-
shell: bash
4269
run: ruff check tests
4370

4471
- name: Run mypy
45-
shell: bash
4672
run: mypy --strict transfunctions
4773

4874
- name: Run mypy for tests
49-
shell: bash
5075
run: mypy tests --exclude typing

.github/workflows/tests_and_coverage.yml

Lines changed: 41 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,32 +12,32 @@ jobs:
1212

1313
steps:
1414
- uses: actions/checkout@v4
15+
1516
- name: Set up Python ${{ matrix.python-version }}
1617
uses: actions/setup-python@v5
1718
with:
1819
python-version: ${{ matrix.python-version }}
1920

20-
- name: Install the library
21-
shell: bash
22-
run: pip install .
23-
2421
- name: Cache pip dependencies
2522
uses: actions/cache@v4
2623
with:
2724
path: ~/.cache/pip
28-
key: ${{ runner.os }}-pip-${{ github.workflow }}-${{ hashFiles('requirements_dev.txt') }}
29-
restore-keys: |
30-
${{ runner.os }}-pip-${{ github.workflow }}-
25+
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ github.workflow }}-${{ hashFiles('requirements_dev.txt') }}
3126

3227
- name: Install dependencies
3328
shell: bash
3429
run: pip install -r requirements_dev.txt
3530

31+
- name: Install the library
32+
shell: bash
33+
run: pip install .
34+
3635
- name: Print all libs
3736
shell: bash
3837
run: pip list
3938

4039
- name: Run tests and show coverage on the command line
40+
shell: bash
4141
run: |
4242
coverage run --source=transfunctions --omit="*tests*" -m pytest --cache-clear --assert=plain && coverage report -m --fail-under=94
4343
coverage xml
@@ -53,4 +53,38 @@ jobs:
5353
continue-on-error: true
5454

5555
- name: Run tests and show the branch coverage on the command line
56+
shell: bash
57+
run: coverage run --branch --source=transfunctions --omit="*tests*" -m pytest --cache-clear --assert=plain && coverage report -m --fail-under=94
58+
59+
# A separate job specifically for bug testing in Python 3.9.1 (Linux only)
60+
build-3-9-1:
61+
runs-on: ubuntu-latest
62+
container: python:3.9.1
63+
steps:
64+
- uses: actions/checkout@v4
65+
66+
- name: Cache pip dependencies
67+
uses: actions/cache@v4
68+
with:
69+
path: ~/.cache/pip
70+
key: ubuntu-pip-3.9.1-${{ github.workflow }}-${{ hashFiles('requirements_dev.txt') }}
71+
72+
- name: Install dependencies
73+
shell: bash
74+
run: pip install -r requirements_dev.txt
75+
76+
- name: Install the library
77+
shell: bash
78+
run: pip install .
79+
80+
- name: Print all libs
81+
shell: bash
82+
run: pip list
83+
84+
- name: Run tests and show coverage on the command line
85+
shell: bash
86+
run: coverage run --source=transfunctions --omit="*tests*" -m pytest --cache-clear --assert=plain && coverage report -m --fail-under=94
87+
88+
- name: Run tests and show the branch coverage on the command line
89+
shell: bash
5690
run: coverage run --branch --source=transfunctions --omit="*tests*" -m pytest --cache-clear --assert=plain && coverage report -m --fail-under=94

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "transfunctions"
7-
version = "0.0.11"
7+
version = "0.0.12"
88
authors = [{ name = "Evgeniy Blinov", email = "zheni-b@yandex.ru" }]
99
description = 'Say NO to Python fragmentation on sync and async'
1010
readme = "README.md"

transfunctions/typing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
else:
1313
from typing import TypeAlias
1414

15-
if sys.version_info <= (3, 9):
15+
if sys.version_info <= (3, 10):
1616
from typing import Callable, Coroutine, Generator # pragma: no cover
1717
else:
1818
from collections.abc import Callable, Coroutine, Generator

0 commit comments

Comments
 (0)