-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
128 lines (116 loc) · 3.27 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
117
118
119
120
121
122
123
124
125
126
127
128
[project]
name = "mpt-finops-operations"
version = "0.1.0"
description = "SWO FinOps For Cloud Operations API"
readme = {file = "README.md", content-type = "text/markdown"}
authors = [
{name = "SoftwareOne AG"},
]
license = {file = "LICENSE.txt"}
requires-python = ">=3.12,<4"
dependencies = [
"alembic==1.14.*",
"asyncpg==0.30.*",
"fastapi-pagination==0.12.*",
"fastapi[standard]==0.115.*",
"pydantic-extra-types==2.10.*",
"pydantic-settings==2.6.*",
"python-dotenv==1.0.*",
"sqlalchemy[asyncio]==2.0.*",
"httpx==0.27.*",
"pyjwt==2.10.*",
"sqlalchemy-utils==0.41.*",
"cryptography==44.0.*",
"gunicorn==23.0.*",
"uvloop==0.21.*",
"uvicorn-worker==0.3.*",
"svcs==24.1.*",
"pyyaml==6.0.*",
"typer==0.13.*",
]
[dependency-groups]
dev = [
"bandit>=1.8.0,<2.0",
"faker>=33.1.0,<34.0",
"ipython>=8.30.0,<9.0",
"mypy>=1.14.0,<2.0",
"pre-commit>=4.0.1,<5.0",
"pytest-httpx>=0.34.0,<1.0",
"pytest>=8.3.3,<9.0",
"pytest-asyncio>=0.24.0,<1.0",
"pytest-cov>=6.0.0,<7.0",
"ruff>=0.8.0,<1.0",
"pytest-mock>=3.14.0,<4.0",
"freezegun>=1.5.1,<2.0",
"ipdb>=0.13.13,<1.0",
"asgi-lifespan>=2.1.0,<3.0",
"types-pyyaml>=6.0.12.20241230,<7.0",
]
[project.scripts]
ffcops = "app.cli:app"
[tool.uv]
package = true
[tool.setuptools]
py-modules = ["app"]
[tool.ruff]
line-length = 100
target-version = "py312"
output-format = "full"
extend-exclude = [
"migrations/versions/",
]
cache-dir = ".cache/ruff"
[tool.ruff.lint]
select = [
"E", # w errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade,
"PT", # flake8-pytest-style
"T10", # flake8-pytest-style
]
ignore = [
"PT001", # Use `@pytest.fixture()` over `@pytest.fixture`
"PT011", # pytest.raises({exception}) is too broad, set the match parameter or use a more specific exception
"PT023", # @pytest.mark.parametrize` is missing required arguments
"B008", # do not perform function calls in argument defaults
"B904", # Within an `except` clause, raise exceptions with `raise ... from err` or `raise ... from None` to distinguish them from errors in exception handling
]
[tool.ruff.format]
quote-style = "double"
docstring-code-format = true
[tool.bandit]
exclude_dirs = ["tests", ".venv"]
[tool.pytest.ini_options]
testpaths = "tests/"
pythonpath = "."
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "session"
addopts = "--cov=app --cov-report=term-missing --cov-report=html --cov-report=xml"
cache_dir = ".cache/pytest"
[tool.coverage.run]
branch = true
source = ["app"]
relative_files = true
# SQLAlchemy uses greenlets to pass context, so we need to specify this here,
# so that the coverage is calculated correctly. 'thread' is the default value,
# so including it in case some code relies on it
#
# refs:
# * https://coverage.readthedocs.io/en/7.6.9/config.html#run-concurrency
# * https://github.com/nedbat/coveragepy/issues/1082
concurrency = ["thread", "greenlet"]
[tool.coverage.report]
show_missing = true
exclude_lines = [
"pragma: no cover",
"pragma: no branch"
]
[tool.mypy]
warn_no_return = false
ignore_missing_imports = true
cache_dir = ".cache/mypy"
plugins = ["pydantic.mypy"]