-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
116 lines (97 loc) · 3.13 KB
/
pyproject.toml
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
[tool.poetry]
name = "flux-migrations"
version = "0.0.3a0"
packages = [{include = "flux", from = "src"}]
readme = "README.md"
description = "A database migration tool that works well with Python projects"
authors = ["Kevin Duff <kevinkelduff@gmail.com>"]
license = "MIT"
homepage = "https://github.com/k2bd/flux-migrations"
repository = "https://github.com/k2bd/flux-migrations"
classifiers = [
"Operating System :: OS Independent",
"Development Status :: 1 - Planning",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"License :: OSI Approved :: MIT License",
"Intended Audience :: Developers",
"Topic :: Software Development :: Libraries",
"Topic :: Database",
]
include = [
"LICENSE.md",
]
[tool.poetry.scripts]
flux = "flux.cli:app"
[tool.poetry.plugins."flux.backend"]
postgres = "flux.builtins.postgres:FluxPostgresBackend"
[tool.poetry.dependencies]
python = "^3.10"
typer = "^0.12.3"
toml = "^0.10.2"
aiopg = { version = "^1.4.0", optional = true }
databases = { version = "^0.9.0", optional = true }
asyncpg = { version = "^0.29.0", optional = true }
sqlparse = { version = "^0.5.1", optional = true }
[tool.poetry.group.dev.dependencies]
black = "^24.4.2"
isort = "^5.13.2"
flake8 = "^7.0.0"
pyright = "^1.1.362"
poethepoet = "^0.26.1"
pytest = "^8.2.0"
pytest-cov = "^5.0.0"
pytest-asyncio = "^0.23.6"
nest-asyncio = "^1.6.0"
freezegun = "^1.5.1"
[tool.poetry.extras]
postgres = ["aiopg", "databases", "asyncpg", "sqlparse"]
[tool.isort]
profile = "black"
multi_line_output = 3
[tool.poe.tasks]
autoformat.sequence = [
{cmd = "black src tests"},
{cmd = "isort src tests"},
]
lint.sequence = [
{cmd = "black --check -v src tests"},
{cmd = "isort --check -v src tests"},
{cmd = "flake8 src tests"},
{cmd = "pyright src tests"},
]
test.sequence = ["unit", "integration"]
test-ci.sequence = ["unit", "integration-ci"]
[tool.poe.tasks.unit]
sequence = [
{cmd = "pytest -vv --cov-report xml --cov-report term --cov=flux tests/unit"},
]
[tool.poe.tasks.unit.env]
FLUX_TESTING = "1"
[tool.poe.tasks.integration]
sequence = [
{cmd = "docker compose -f docker-compose.test.yml up -d --wait"},
{cmd = "pytest -vv --cov-append --cov-report xml --cov-report term --cov=flux tests/integration"},
{cmd = "docker compose -f docker-compose.test.yml down"},
]
ignore_fail = "return_non_zero"
[tool.poe.tasks.integration.env]
TEST_PG_CONNECTION_STRING = "postgresql+aiopg://postgres:postgres@localhost:55443"
TEST_PG_MANAGEMENT_DB = "postgres"
FLUX_TESTING = "1"
[tool.poe.tasks.integration-ci]
sequence = [
{cmd = "pytest -vv --cov-append --cov-report xml --cov-report term --cov=flux tests/integration"},
]
ignore_fail = "return_non_zero"
[tool.poe.tasks.integration-ci.env]
TEST_PG_CONNECTION_STRING = "postgresql+aiopg://postgres:postgres@localhost:5432"
TEST_PG_MANAGEMENT_DB = "postgres"
FLUX_TESTING = "1"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"