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/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
fail-fast: false
matrix:
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
python-version: ['3.10', '3.14']
python-version: ['3.12', '3.14']
steps:
- uses: actions/checkout@v6

Expand Down Expand Up @@ -143,11 +143,11 @@ jobs:
run: uv run --isolated --no-project --with dist/*.tar.gz tests/smoke_test.py

- name: Upload artifacts
uses: actions/upload-artifact@v6
uses: actions/upload-artifact@v7
with:
name: python-packages
path: dist/
retention-days: 7
retention-days: 3

release:
name: Create Release
Expand All @@ -158,7 +158,7 @@ jobs:
contents: write
steps:
- name: Download artifacts
uses: actions/download-artifact@v7
uses: actions/download-artifact@v8
with:
name: python-packages
path: release-assets/
Expand All @@ -167,11 +167,8 @@ jobs:
uses: softprops/action-gh-release@v2
with:
name: Release ${{ github.ref_name }}
body: |
Automated release for version ${{ github.ref_name }}
draft: false
prerelease: false
files: release-assets/*
generate_release_notes: true

publish:
name: Publish to PyPI
Expand All @@ -183,7 +180,7 @@ jobs:
id-token: write
steps:
- name: Download package artifacts
uses: actions/download-artifact@v7
uses: actions/download-artifact@v8
with:
name: python-packages
path: dist
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -161,3 +161,4 @@ cython_debug/
# Custom
*.prof
junit.xml
/requirements.txt
16 changes: 16 additions & 0 deletions .snyk
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Snyk policy file
# https://docs.snyk.io/scan-using-snyk/snyk-code/configure-snyk-code#excluding-directories-and-files-from-the-snyk-code-test
version: v1.25.0
exclude:
global:
- tests/**
- ddcdatabases/core/constants.py
ignore:
'snyk:lic:pip:psycopg:LGPL-3.0':
- '*':
reason: psycopg is used as a dependency, not modified - LGPL-3.0 is compatible with MIT
expires: 2027-03-20T00:00:00.000Z
'snyk:lic:pip:psycopg-binary:LGPL-3.0':
- '*':
reason: psycopg-binary is used as a dependency, not modified - LGPL-3.0 is compatible with MIT
expires: 2027-03-20T00:00:00.000Z
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<p align="center">
<a href="https://github.com/sponsors/ddc"><img src="https://img.shields.io/static/v1?style=plastic&label=Sponsor&message=%E2%9D%A4&logo=GitHub&color=ff69b4" alt="Sponsor"/></a>
<br>
<a href="https://ko-fi.com/ddcsta"><img src="https://img.shields.io/badge/Ko--fi-ddcsta-FF5E5B?style=plastic&logo=kofi&logoColor=white&color=brightgreen" alt="Ko-fi"/></a>
<a href="https://ko-fi.com/ddc"><img src="https://img.shields.io/badge/Ko--fi-ddc-FF5E5B?style=plastic&logo=kofi&logoColor=white&color=brightgreen" alt="Ko-fi"/></a>
<a href="https://www.paypal.com/ncp/payment/6G9Z78QHUD4RJ"><img src="https://img.shields.io/badge/Donate-PayPal-brightgreen.svg?style=plastic&logo=paypal&logoColor=white" alt="Donate"/></a>
<br>
<a href="https://pypi.python.org/pypi/ddcDatabases"><img src="https://img.shields.io/pypi/v/ddcDatabases.svg?style=plastic&logo=python&cacheSeconds=3600" alt="PyPi"/></a>
Expand Down Expand Up @@ -733,8 +733,8 @@ Released under the [MIT License](LICENSE)

# Support

If you find this project helpful, consider supporting development:
If you find this project helpful, consider supporting development.

- [GitHub Sponsor](https://github.com/sponsors/ddc)
- [ko-fi](https://ko-fi.com/ddcsta)
- [PayPal](https://www.paypal.com/ncp/payment/6G9Z78QHUD4RJ)
<a href='https://github.com/sponsors/ddc' target='_blank'><img height='24' style='border:0px;height:24px;' src='https://img.shields.io/badge/Sponsor-❤-ea4aaa?style=plastic&logo=github&logoColor=white' border='0' alt='Sponsor on GitHub' /></a>
<a href='https://ko-fi.com/ddc' target='_blank'><img height='30' style='border:0px;height:30px;' src='https://storage.ko-fi.com/cdn/kofi2.png?v=6' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a>
<a href='https://www.paypal.com/ncp/payment/6G9Z78QHUD4RJ' target='_blank'><img height='30' style='border:0px;height:30px;' src='https://www.paypalobjects.com/digitalassets/c/website/marketing/apac/C2/logos-buttons/optimize/44_Yellow_PayPal_Pill_Button.png' border='0' alt='Donate via PayPal' /></a>
4 changes: 2 additions & 2 deletions ddcdatabases/core/exceptions.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import logging
from datetime import datetime, timezone
from datetime import UTC, datetime
from typing import Any

_logger = logging.getLogger(__name__)
Expand All @@ -13,7 +13,7 @@ class CustomBaseException(Exception):

def __init__(self, msg: Any) -> None:
self.original_exception = msg
now = datetime.now(timezone.utc)
now = datetime.now(UTC)
dt = now.isoformat(timespec="milliseconds")
_logger.error(f"[{dt}]:{repr(msg)}")
raise msg
Expand Down
16 changes: 8 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ packages = ["ddcdatabases"]

[project]
name = "ddcdatabases"
version = "4.0.0"
version = "4.0.1"
description = "Simplified database ORM connections with support for multiple database engines"
urls.Repository = "https://github.com/ddc/ddcDatabases"
urls.Homepage = "https://pypi.org/project/ddcDatabases"
Expand Down Expand Up @@ -42,8 +42,6 @@ classifiers = [
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
Expand All @@ -52,7 +50,7 @@ classifiers = [
"Intended Audience :: Developers",
"Natural Language :: English",
]
requires-python = ">=3.10"
requires-python = ">=3.12"
dependencies = [
"pydantic-settings>=2.11.0",
"sqlalchemy[asyncio]>=2.0.48",
Expand All @@ -72,12 +70,14 @@ dev = [
"coverage>=7.13.5",
"poethepoet>=0.42.1",
"pytest-asyncio>=1.3.0",
"ruff>=0.15.6",
"testcontainers[postgres,mysql,mssql,mongodb,oracle]>=4.14.1",
"ruff>=0.15.7",
"testcontainers[postgres,mysql,mssql,mongodb,oracle]>=4.14.2",
]

[tool.poe.tasks]
linter.shell = "uv run ruff check --fix . && uv run ruff format ."
snyk-export.shell = "rm -f requirements.txt && uv export --no-hashes --no-annotate --format requirements-txt > requirements.txt && uvx pre-commit run --all-files || uvx pre-commit run --all-files"
snyk.sequence = ["snyk-export", { shell = "uv pip install pip && snyk test --file=requirements.txt && snyk code test; uv pip uninstall pip" }]
profile = "uv run python -m cProfile -o cprofile_unit.prof -m pytest tests/unit"
profile-integration = "uv run python -m cProfile -o cprofile_integration.prof -m pytest tests/integration"
test.sequence = [{ shell = "uv run coverage run -m pytest tests/unit" }, { shell = "uv run coverage report" }, { shell = "uv run coverage xml" }]
Expand Down Expand Up @@ -121,15 +121,15 @@ exclude_lines = [

[tool.ruff]
line-length = 120
target-version = "py310"
target-version = "py312"

[tool.ruff.lint]
select = ["E", "W", "F", "I", "B", "C4", "UP", "S", "SLF"]
ignore = ["E501", "E402", "UP046", "UP047"]

[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"]
"tests/**/*.py" = ["S101", "S105", "S106", "S311", "SLF001", "F841"]
"tests/**/*.py" = ["S101", "S105", "S106", "S110", "S311", "S603", "S607", "SLF001", "F841"]

[tool.ruff.lint.isort]
known-first-party = ["ddcdatabases"]
Expand Down
Loading
Loading