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
15 changes: 6 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,30 +50,27 @@ jobs:
- uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/poetry.lock') }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/uv.lock') }}
restore-keys: |
${{ runner.os }}-pip-
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install and configure Poetry
run: |
pip install -U pip poetry
poetry config virtualenvs.create false
- uses: astral-sh/setup-uv@v6
- name: Install ODBC driver
run: |
curl -sSL -O https://packages.microsoft.com/config/ubuntu/$(grep VERSION_ID /etc/os-release | cut -d '"' -f 2)/packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
sudo apt-get update
sudo ACCEPT_EULA=Y apt-get install -y msodbcsql18
- name: Run ci
run: make ci
run: uv run make ci
- name: Test FastAPI/Blacksheep Example
run: |
PYTHONPATH=$DEST_FASTAPI pytest $PYTEST_ARGS $DEST_FASTAPI/_tests.py
PYTHONPATH=$DEST_BLACKSHEEP pytest $PYTEST_ARGS $DEST_BLACKSHEEP/_tests.py
PYTHONPATH=$DEST_SANIC pytest $PYTEST_ARGS $DEST_SANIC/_tests.py
PYTHONPATH=$DEST_FASTAPI uv run pytest $PYTEST_ARGS $DEST_FASTAPI/_tests.py
PYTHONPATH=$DEST_BLACKSHEEP uv run pytest $PYTEST_ARGS $DEST_BLACKSHEEP/_tests.py
PYTHONPATH=$DEST_SANIC uv run pytest $PYTEST_ARGS $DEST_SANIC/_tests.py
env:
DEST_FASTAPI: examples/fastapi
DEST_BLACKSHEEP: examples/blacksheep
Expand Down
11 changes: 4 additions & 7 deletions .github/workflows/codspeed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,16 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
# 3.12 is the minimum reqquired version for profiling enabled
# 3.12 is the minimum required version for profiling enabled
python-version: "3.12"

- name: Install and configure Poetry
run: |
pip install -U pip poetry
poetry config virtualenvs.create false
- uses: astral-sh/setup-uv@v6

- name: Install dependencies
- name: Build dists
run: make build

- name: Run benchmarks
uses: CodSpeedHQ/action@v3
with:
token: ${{ secrets.CODSPEED_TOKEN }}
run: pytest tests/benchmarks --codspeed
run: uv run pytest tests/benchmarks --codspeed
7 changes: 2 additions & 5 deletions .github/workflows/gh-pages-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,9 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: "3.9"
- name: Install and configure Poetry
run: |
pip install -U pip poetry
poetry config virtualenvs.create false
- uses: astral-sh/setup-uv@v6
- name: Build docs
run: make docs
run: uv run make docs
- name: Deploy release docs
uses: peaceiris/actions-gh-pages@v3
with:
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,9 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: "3.9"
- name: Install and configure Poetry
run: |
pip install -U pip poetry
poetry config virtualenvs.create false
- uses: astral-sh/setup-uv@v6
- name: Build docs
run: make docs
run: uv run make docs
- name: Deploy latest docs
uses: peaceiris/actions-gh-pages@v3
with:
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,7 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Install and configure Poetry
run: |
pip install -U pip poetry
poetry config virtualenvs.create false
- name: Install requirements
run: make deps
- uses: astral-sh/setup-uv@v6
- name: Build dists
run: make build
- name: Pypi Publish
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,6 @@ ENV/

# macos
.DS_Store

# pdm
.pdm-python
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ help:
@echo " lint Auto-formats the code and check type hints"

up:
@poetry update
@uv lock --upgrade

deps:
@poetry install --all-groups -E asyncpg -E accel -E psycopg -E asyncodbc -E aiomysql
@uv sync --all-groups --extra asyncpg --extra accel --extra psycopg --extra asyncodbc --extra aiomysql $(options)

deps_with_asyncmy:
@poetry install --all-groups -E asyncpg -E accel -E psycopg -E asyncodbc -E asyncmy
@uv sync --all-groups --extra asyncpg --extra accel --extra psycopg --extra asyncodbc --extra asyncmy $(options)

check: build _check
_check:
Expand Down Expand Up @@ -99,7 +99,7 @@ docs: deps

build: deps
rm -fR dist/
poetry build
uv build

publish: deps _build
twine upload dist/*
Loading