-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
138 lines (121 loc) · 3.51 KB
/
Copy pathpyproject.toml
File metadata and controls
138 lines (121 loc) · 3.51 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
138
[project]
name = "app"
version = "1.3.0"
authors = [
{ name = "Andreas Bazigos", email = "sc222ab@leeds.ac.uk" },
]
description = "Green FinTech BaaS Simulator API for sustainable finance"
readme = "README.md"
requires-python = ">=3.12"
classifiers = [
"Programming Language :: Python :: 3.12",
"Framework :: FastAPI",
"Operating System :: OS Independent",
]
license-files = ["LICEN[CS]E*"]
license = "MIT"
keywords = ["fintech", "esg", "api", "loan", "banking"]
dependencies = [
"fastapi==0.129.0",
"httpx>=0.28.1",
"pydantic>=2.12.5",
"pydantic-settings>=2.12.0",
"sqlalchemy[asyncio]>=2.0.47,<3.0.0",
"asyncpg>=0.31.0,<0.32.0",
"psycopg[binary]>=3.3.3,<4.0.0",
"alembic>=1.18.4,<2.0.0",
"psycopg2-binary>=2.9.11,<3.0.0",
"uvicorn>=0.40.0,<0.41.0",
"redis>=7.2.1,<8.0.0",
"reportlab>=4.4.10",
"pandas-stubs>=3.0.0.260204",
"types-reportlab>=4.4.10.20260223"
]
[project.urls]
repository = "https://github.com/scAB1001/green-fintech-baas"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[dependency-groups]
dev = [
"python-dotenv>=1.2.1,<2.0.0",
"black>=26.1.0,<27.0.0",
"isort>=7.0.0,<8.0.0",
"ruff>=0.15.1,<0.16.0",
"mypy>=1.19.1,<2.0.0",
"pre-commit>=4.5.1,<5.0.0",
"twine>=6.2.0,<7.0.0",
"pytest>=9.0.2,<10.0.0",
"pytest-cov>=7.0.0,<8.0.0",
"pytest-asyncio>=1.3.0,<2.0.0",
"openpyxl>=3.1.5,<4.0.0",
"pandas>=3.0.1,<4.0.0",
]
test = [
"pytest>=9.0.2,<10.0.0",
"pytest-cov>=7.0.0,<8.0.0",
"pytest-asyncio>=0.23.8",
"pytest-docker>=3.2.5,<4.0.0"
]
docs = [
"sphinx>=9.1.0,<10.0.0"
]
[tool.ruff]
target-version = "py312"
line-length = 88
[tool.ruff.lint]
select = ["E", "F", "I", "B", "C4", "UP", "ARG", "SIM", "RUF"]
ignore = []
[tool.ruff.lint.isort]
known-first-party = ["app"]
[tool.pytest.ini_options]
minversion = "9.0"
addopts = "-ra -q --strict-markers --tb=short"
testpaths = ["tests"]
python_files = "*_test.py"
python_classes = "Test*"
python_functions = "test_*"
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"
markers = [
"unit: Unit tests (fast, no external dependencies)",
"integration: Integration tests (require Docker/database)",
"crud: CRUD operation tests",
"api: API endpoint tests",
"auth: Authentication tests",
"slow: Tests that take > 5 seconds",
"smoke: Quick smoke tests for CI",
]
[tool.coverage.run]
# Measure branch coverage (did an 'if' statement evaluate to both True and False?)
branch = true
# Only measure the actual application code
source = ["src/app"]
# Explicitly omit tests and database migrations from coverage metrics
omit = [
"tests/*",
"alembic/*",
# Usually omitted as it's hard to test DB connection teardowns
"src/app/database/session.py"
]
[tool.coverage.report]
# Always show line numbers that are missing coverage in the terminal
show_missing = true
# Fail CI/CD pipeline if coverage < 80% (industry standard)
fail_under = 80
exclude_also = [
"def __repr__", # Ignore SQLAlchemy model debug representations
"if TYPE_CHECKING:", # Ignore type-hinting imports
"raise NotImplementedError", # Ignore abstract base classes
"if __name__ == .__main__.:",# Ignore standard script execution blocks
]
[tool.coverage.html]
directory = "htmlcov"
[tool.black]
target-version = ["py312"]
line-length = 88
[tool.ruff.lint.per-file-ignores]
"tests/**/*.py" = ["ARG", "B", "F401"]
"alembic/versions/*.py" = ["E501", "D100"]
[tool.ruff.lint.pydocstyle]
convention = "google"