-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
executable file
·137 lines (124 loc) · 4.48 KB
/
pyproject.toml
File metadata and controls
executable file
·137 lines (124 loc) · 4.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.metadata]
allow-direct-references = true
[tool.hatch.build]
include = ["ddcdatabases/**/*"]
[tool.hatch.build.targets.wheel]
packages = ["ddcdatabases"]
[project]
name = "ddcdatabases"
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"
license = {text = "MIT"}
readme = "README.md"
authors = [
{name = "Daniel Costa", email = "daniel@ddcsoftwares.com"},
]
maintainers = [
{name = "Daniel Costa"},
]
keywords = [
"python", "python3", "python-3",
"ORM", "ORM-connection", "sqlalchemy",
"database", "databases", "ddcdatabase", "ddcdatabases",
"mssql", "mssql-database",
"mysql", "mysql-database",
"oracle", "oracle-database",
"mariadb", "mariadb-database",
"mongodb", "mongodb-database",
"sqlite", "sqlite3", "sqlite3-database",
"postgres", "postgres-database", "postgresql", "postgresql-database", "pgsql", "pgsql-database",
]
classifiers = [
"Topic :: Software Development :: Libraries :: Python Modules",
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Operating System :: OS Independent",
"Environment :: Other Environment",
"Intended Audience :: Developers",
"Natural Language :: English",
]
requires-python = ">=3.12"
dependencies = [
"pydantic-settings>=2.11.0",
"sqlalchemy[asyncio]>=2.0.48",
]
[project.optional-dependencies]
mongodb = ["motor>=3.7.1"]
oracle = ["oracledb>=3.4.2"]
mssql = ["pyodbc>=5.3.0", "aioodbc>=0.5.0"]
mysql = ["mysqlclient>=2.2.8", "aiomysql>=0.3.2"]
postgres = ["psycopg[binary]>=3.3.3", "asyncpg>=0.31.0"]
pgsql = ["ddcdatabases[postgres]"]
mariadb = ["ddcdatabases[mysql]"]
[dependency-groups]
dev = [
"coverage>=7.13.5",
"poethepoet>=0.42.1",
"pytest-asyncio>=1.3.0",
"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" }]
test-integration = "uv run pytest tests/integration"
tests.sequence = ["linter", "test", "test-integration"]
updatedev.sequence = ["linter", {shell = "uv lock --upgrade && uv sync --all-extras --group dev"}]
build.sequence = ["updatedev", "tests", {shell = "uv build --wheel"}]
[tool.pytest.ini_options]
addopts = "-v --import-mode=importlib --junitxml=junit.xml"
junit_family = "legacy"
asyncio_mode = "strict"
asyncio_default_fixture_loop_scope = "function"
markers = [
"integration: marks tests as integration tests",
]
filterwarnings = [
"ignore:Field name \"schema\" in .* shadows an attribute in parent:UserWarning",
]
[tool.coverage.run]
omit = [
"tests/*",
"*/__init__.py",
]
[tool.coverage.report]
show_missing = true
skip_covered = false
exclude_lines = [
"pragma: no cover",
"def __repr__",
"if self.debug:",
"if settings.DEBUG",
"raise AssertionError",
"raise NotImplementedError",
"if 0:",
"if __name__ == .__main__.:",
"class .*\\bProtocol\\):",
"@(abc\\.)?abstractmethod",
]
[tool.ruff]
line-length = 120
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", "S110", "S311", "S603", "S607", "SLF001", "F841"]
[tool.ruff.lint.isort]
known-first-party = ["ddcdatabases"]
no-lines-before = ["future", "standard-library", "third-party", "first-party", "local-folder"]
no-sections = true