File size: 3,537 Bytes
66a0674
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
# pyproject.toml corrigé pour Poetry
[tool.poetry]
name = "project5"
version = "0.1.0"
description = "Prédiction de consommation énergétique des bâtiments"
authors = ["francois hellebuyck <formation.fhellebuyck@pm.me>"]
packages = [{include = "project5", from = "src"}]

[tool.poetry.group.docs.dependencies]
# Sphinx et extensions essentielles
sphinx = "^7.2.6"
sphinx-rtd-theme = "^1.3.0"
sphinx-autodoc-typehints = "^1.25.2"
sphinx-copybutton = "^0.5.2"
myst-parser = "^2.0.0"
sphinx-autobuild = "^2021.3.14"
sphinxcontrib-napoleon = "^0.7"

# Extensions optionnelles mais recommandées
sphinx-book-theme = "^1.0.1"           # Thème moderne alternatif
sphinxext-rediraffe = "^0.2.7"         # Redirections
sphinx-design = "^0.5.0"               # Composants modernes
sphinx-tabs = "^3.4.4"                 # Onglets
sphinx-togglebutton = "^0.3.2"         # Boutons pliables

[tool.poetry.dependencies]
python = "^3.11"
fastapi = "^0.116.1"
uvicorn = {extras = ["standard"], version = "^0.35.0"}
# Base de données
sqlalchemy = "^2.0.23"
alembic = "^1.12.1"
psycopg2-binary = "^2.9.9"
# Configuration et sécurité
pydantic = "^2.5.0"
pydantic-settings = "^2.1.0"
python-dotenv = "^1.0.0"
passlib = {extras = ["bcrypt"], version = "^1.7.4"}
# Utilitaires
httpx = "^0.25.0"
python-jwt = "^4.1.0"
joblib = "^1.5.2"
numpy = "^2.3.3"
scikit-learn = "1.7.1"
pandas = "^2.3.2"
shibuya = "^2025.8.16"
eralchemy = "^1.3.0"
graphviz = "^0.20.0"


[tool.poetry.group.dev.dependencies]
pylint = "^3.3.8"
pytest = "^7.4.0"
pytest-cov = "^4.1.0" 
pytest-asyncio = "^0.21.0"
httpx = "^0.25.0"
black = "^24.0.0"
isort = "^5.12.0"
flake8 = "^6.1.0"
mypy = "^1.6.0"
bandit = "^1.7.5"
safety = "^2.3.0"
# Tests de base de données
pytest-postgresql = "^5.0.0"
aiosqlite = "^0.19.0"
sqlacodegen = "^3.1.0"


[build-system]
requires = ["poetry-core>=2.0.0,<3.0.0"]
build-backend = "poetry.core.masonry.api"

[tool.black]
line-length = 88
target-version = ['py311']
include = '\.pyi?$'
extend-exclude = '''
/(
  # directories
  \.eggs
  | \.git
  | \.hg
  | \.mypy_cache
  | \.tox
  | \.venv
  | build
  | dist
  | alembic/versions
)/
'''

[tool.isort]
profile = "black"
multi_line_output = 3
include_trailing_comma = true
force_grid_wrap = 0
use_parentheses = true
ensure_newline_before_comments = true
line_length = 88

[tool.mypy]
python_version = "3.11"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
plugins = ["sqlalchemy.ext.mypy.plugin"]

[tool.pytest.ini_options]
minversion = "6.0"
addopts = "-ra -q --strict-markers"
testpaths = [
    "tests",
]
pythonpath = ["./src"] 
asyncio_mode = "auto"
markers = [
    "unit: Unit tests",
    "integration: Integration tests",
    "database: Tests requiring database",
    "slow: Slow running tests",
]

[tool.coverage.run]
source = ["src"]
omit = [
    "*/tests/*",
    "*/venv/*",
    "*/.venv/*",
    "*/env/*",
    "*/alembic/*",
    "*/migrations/*",
]

[tool.coverage.report]
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.flake8]
max-line-length = 88
extend-ignore = [
    "E203",
    "W503",
    "E402",
    "E501",
]
exclude = [
    ".git",
    "__pycache__",
    ".venv", 
    "venv",
    ".jupyter",
    "alembic/versions",
    "migrations",
]
per-file-ignores = [
    "*.ipynb:E402",
    "alembic/*:E402,F401",
]