Skip to content

Commit ce54994

Browse files
Workflow maintenance, apply isort and black (#3)
1 parent 3eaa296 commit ce54994

7 files changed

Lines changed: 52 additions & 70 deletions

File tree

.github/workflows/build.yml

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ jobs:
1818
build:
1919
runs-on: ubuntu-18.04
2020
strategy:
21+
fail-fast: false
2122
matrix:
22-
python-version: [3.7, 3.8, 3.9]
23+
python-version: [3.8, 3.9, "3.10", "3.11"]
2324

2425
steps:
2526
- uses: actions/checkout@v1
@@ -28,24 +29,13 @@ jobs:
2829
submodules: false
2930

3031
- name: Use Python ${{ matrix.python-version }}
31-
uses: actions/setup-python@v1
32+
uses: actions/setup-python@v3
3233
with:
3334
python-version: ${{ matrix.python-version }}
3435

35-
- uses: actions/cache@v1
36-
id: depcache
37-
with:
38-
path: deps
39-
key: requirements-pip-${{ matrix.python-version }}-${{ hashFiles('requirements.txt') }}
40-
41-
- name: Download dependencies
42-
if: steps.depcache.outputs.cache-hit != 'true'
43-
run: |
44-
pip download --dest=deps -r dev-requirements.txt
45-
4636
- name: Install dependencies
4737
run: |
48-
pip install -U --no-index --find-links=deps deps/*
38+
pip install -r dev-requirements.txt
4939
5040
- name: Prepare test database
5141
run: |

blacksheepsqlalchemy/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
from typing import Optional
22

3+
from blacksheep.server import Application
34
from sqlalchemy.ext.asyncio import (
4-
create_async_engine,
5+
AsyncConnection,
56
AsyncEngine,
67
AsyncSession,
7-
AsyncConnection,
8+
create_async_engine,
89
)
9-
from blacksheep.server import Application
1010

1111

1212
def __configure_services(

dev-requirements.txt

Lines changed: 37 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,42 @@
11
aiosqlite==0.17.0
2-
alembic==1.6.3
3-
appdirs==1.4.4
4-
asyncpg==0.23.0
5-
attrs==21.2.0
6-
black==21.5b1
7-
blacksheep==1.0.5
8-
cchardet==2.1.7
9-
certifi==2020.12.5
10-
click==7.1.2
11-
coverage==5.5
12-
essentials==1.1.4
13-
essentials-openapi==0.1.2
14-
flake8==3.9.2
15-
greenlet==1.1.0
16-
guardpost==0.0.7
17-
h11==0.12.0
18-
httptools==0.2.0
2+
alembic==1.8.1
3+
attrs==22.1.0
4+
black==22.10.0
5+
blacksheep==1.2.8
6+
certifi==2022.9.24
7+
click==8.1.3
8+
coverage==6.5.0
9+
essentials==1.1.5
10+
essentials-openapi==0.1.6
11+
exceptiongroup==1.0.4
12+
flake8==6.0.0
13+
greenlet==2.0.1
14+
guardpost==0.0.9
15+
h11==0.14.0
16+
httptools==0.5.0
1917
iniconfig==1.1.1
20-
itsdangerous==1.1.0
21-
Jinja2==2.11.3
22-
Mako==1.1.4
23-
MarkupSafe==2.0.1
24-
mccabe==0.6.1
25-
mypy==0.812
18+
isort==5.10.1
19+
itsdangerous==2.1.2
20+
Jinja2==3.1.2
21+
Mako==1.2.4
22+
MarkupSafe==2.1.1
23+
mccabe==0.7.0
2624
mypy-extensions==0.4.3
27-
packaging==20.9
28-
pathspec==0.8.1
29-
pluggy==0.13.1
30-
py==1.10.0
31-
pycodestyle==2.7.0
32-
pyflakes==2.3.1
33-
pyparsing==2.4.7
34-
pytest==6.2.4
35-
pytest-asyncio==0.15.1
36-
pytest-cov==2.12.0
37-
python-dateutil==2.8.1
38-
python-editor==1.0.4
25+
packaging==21.3
26+
pathspec==0.10.2
27+
platformdirs==2.5.4
28+
pluggy==1.0.0
29+
pycodestyle==2.10.0
30+
pyflakes==3.0.1
31+
pyparsing==3.0.9
32+
pytest==7.2.0
33+
pytest-asyncio==0.20.2
34+
pytest-cov==4.0.0
35+
python-dateutil==2.8.2
3936
PyYAML==5.4.1
40-
regex==2021.4.4
41-
rodi==1.1.1
37+
rodi==1.1.3
4238
six==1.16.0
43-
SQLAlchemy==1.4.15
44-
sqlalchemy-stubs==0.4
45-
sqlalchemy2-stubs==0.0.2a1
46-
toml==0.10.2
47-
typed-ast==1.4.3
48-
typing-extensions==3.10.0.0
49-
uvicorn==0.13.4
39+
SQLAlchemy==1.4.44
40+
tomli==2.0.1
41+
typing_extensions==4.4.0
42+
uvicorn==0.20.0

tests/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
from blacksheep.messages import Response
1313
from blacksheep.server import Application
1414
from blacksheep.server.openapi.v3 import OpenAPIHandler
15-
from blacksheepsqlalchemy import use_sqlalchemy
1615
from openapidocs.v3 import Info
1716
from sqlalchemy import delete as sql_delete
1817
from sqlalchemy import text
1918

19+
from blacksheepsqlalchemy import use_sqlalchemy
2020
from tests.domain import Country
2121

2222
app = Application(show_error_details=True)

tests/migrations/env.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
import sys
22
from logging.config import fileConfig
33

4-
from sqlalchemy import engine_from_config
5-
from sqlalchemy import pool
6-
74
from alembic import context
5+
from sqlalchemy import engine_from_config, pool
86

97
# hack to keep example code inside the tests folder without polluting the root folder
108
# of the repository

tests/migrations/versions/ae4207a54d40_structure.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@
55
Create Date: 2021-05-22 09:54:27.486818
66
77
"""
8-
from alembic import op
98
import sqlalchemy as sa
10-
9+
from alembic import op
1110

1211
# revision identifiers, used by Alembic.
1312
revision = "ae4207a54d40"

tests/test_blacksheepsqlalchemy.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
from blacksheep.contents import JSONContent
21
import pytest
3-
from .fixtures import * # NoQA
4-
from blacksheep.server import Application
52
from blacksheep.client import ClientSession
3+
from blacksheep.contents import JSONContent
4+
from blacksheep.server import Application
5+
66
from blacksheepsqlalchemy import use_sqlalchemy
77

8+
from .fixtures import * # NoQA
9+
810

911
async def insert_fetch_delete_scenario(
1012
client_session: ClientSession, option: str, country_code: str, country_name: str

0 commit comments

Comments
 (0)