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
17 changes: 11 additions & 6 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,18 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Setup pdm
uses: pdm-project/setup-pdm@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v3

- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}

- name: Install dependencies
run: pdm install -G lint
run: |
uv sync --group lint

- name: Run lint
run: pdm lint
run: |
source .venv/bin/activate
chmod 755 pre-commit.sh
./pre-commit.sh
15 changes: 9 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,16 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Setup pdm
uses: pdm-project/setup-pdm@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v3

- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}

- name: Install dependencies
run: pdm install -G test
run: |
uv venv
uv pip install -r requirements.txt

- name: Run test
run: pdm run -v pytest
run: uv run pytest
16 changes: 8 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@ repos:
- id: check-toml

- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.4.5
rev: v0.7.2
hooks:
- id: ruff
args:
- '--fix'
- '--unsafe-fixes'
- id: ruff-format

- repo: https://github.com/pdm-project/pdm
rev: 2.12.2
- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.4.29
hooks:
- id: pdm-export
- id: uv-lock
- id: uv-export
args:
- -o
- '-o'
- 'requirements.txt'
- '--without-hashes'
files: ^pdm.lock$
- id: pdm-lock-check
- '--no-hashes'
513 changes: 0 additions & 513 deletions pdm.lock

This file was deleted.

30 changes: 12 additions & 18 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
[project]
name = "sqlalchemy-crud-plus"
description = "Asynchronous CRUD operation based on SQLAlchemy2 model"
dynamic = [
"version",
]
version = '1.5.0'
authors = [
{ name = "Wu Clan", email = "jianhengwu0407@gmail.com" },
]
Expand All @@ -26,16 +24,19 @@ license = { text = "MIT" }
homepage = "https://github.com/fastapi-practices/sqlalchemy-crud-plus"
repository = "https://github.com/fastapi-practices/sqlalchemy-crud-plus"

[tool.pdm.dev-dependencies]
lint = [
"ruff>=0.4.0",
"pre-commit>=3.5.0",
]
test = [
[dependency-groups]
dev = [
"pytest>=8.1.1",
"aiosqlite>=0.20.0",
"pytest-asyncio>=0.23.6",
]
lint = [
"ruff>=0.4.0",
"pre-commit>=3.5.0",
]

[tool.uv]
python-downloads = "manual"

[tool.ruff]
line-length = 120
Expand All @@ -58,13 +59,6 @@ order-by-type = true
quote-style = "single"
docstring-code-format = true

[tool.pdm]
distribution = true
version = { source = "file", path = "sqlalchemy_crud_plus/__init__.py" }

[tool.pdm.scripts]
lint = "pre-commit run --all-files"

[build-system]
requires = ["pdm-backend"]
build-backend = "pdm.backend"
requires = ["hatchling"]
build-backend = "hatchling.build"
41 changes: 15 additions & 26 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,29 +1,18 @@
# This file is @generated by PDM.
# Please do not edit it manually.

# This file was autogenerated by uv via the following command:
# uv export -o requirements.txt --no-hashes
-e .
aiosqlite==0.20.0
annotated-types==0.6.0
cfgv==3.4.0
colorama==0.4.6; sys_platform == "win32"
distlib==0.3.8
exceptiongroup==1.2.1; python_version < "3.11"
filelock==3.13.4
greenlet==3.0.3; platform_machine == "win32" or platform_machine == "WIN32" or platform_machine == "AMD64" or platform_machine == "amd64" or platform_machine == "x86_64" or platform_machine == "ppc64le" or platform_machine == "aarch64"
identify==2.5.35
annotated-types==0.7.0
colorama==0.4.6 ; sys_platform == 'win32'
exceptiongroup==1.2.2 ; python_full_version < '3.11'
greenlet==3.1.1 ; (python_full_version < '3.13' and platform_machine == 'AMD64') or (python_full_version < '3.13' and platform_machine == 'WIN32') or (python_full_version < '3.13' and platform_machine == 'aarch64') or (python_full_version < '3.13' and platform_machine == 'amd64') or (python_full_version < '3.13' and platform_machine == 'ppc64le') or (python_full_version < '3.13' and platform_machine == 'win32') or (python_full_version < '3.13' and platform_machine == 'x86_64')
iniconfig==2.0.0
nodeenv==1.8.0
packaging==24.0
platformdirs==4.2.0
packaging==24.1
pluggy==1.5.0
pre-commit==3.7.1
pydantic==2.7.1
pydantic-core==2.18.2
pytest==8.2.1
pytest-asyncio==0.23.7
pyyaml==6.0.1
ruff==0.4.5
setuptools==69.5.1
sqlalchemy==2.0.30
tomli==2.0.1; python_version < "3.11"
typing-extensions==4.10.0
virtualenv==20.25.3
pydantic==2.9.2
pydantic-core==2.23.4
pytest==8.3.3
pytest-asyncio==0.24.0
sqlalchemy==2.0.36
tomli==2.0.2 ; python_full_version < '3.11'
typing-extensions==4.12.2
2 changes: 1 addition & 1 deletion sqlalchemy_crud_plus/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# -*- coding: utf-8 -*-
from .crud import CRUDPlus as CRUDPlus

__version__ = 'v1.4.0'
__version__ = '1.5.0'
Loading