-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
176 lines (156 loc) · 4.22 KB
/
pyproject.toml
File metadata and controls
176 lines (156 loc) · 4.22 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
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
170
171
172
173
174
175
176
[tool.poetry]
name = "mortiscope-api"
version = "1.0.0"
description = "A backend API for a deep learning system that provides endpoints to analyze images of Chrysomya megacephala for Post-Mortem Interval (PMI) estimation."
authors = [
"Neil Ivan Orencia <mortiscope@gmail.com>",
"Precious Andal <mortiscope@gmail.com>",
]
readme = "README.md"
packages = [{include = "app"}]
keywords = ["fastapi", "computer-vision", "forensic-entomology", "forensic-science", "pmi", "deep-learning"]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Scientific/Engineering :: Image Recognition",
"License :: Other/Proprietary License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Framework :: FastAPI",
"Operating System :: OS Independent",
]
[tool.poetry.urls]
Homepage = "https://github.com/mortiscope/mortiscope-api"
Repository = "https://github.com/mortiscope/mortiscope-api"
"Bug Tracker" = "https://github.com/mortiscope/mortiscope-api/issues"
[tool.poetry.dependencies]
python = ">=3.11,<3.15"
aiosqlite = "0.22.1"
boto3 = "1.39.4"
botocore = "1.39.4"
cuid2 = "2.0.1"
fastapi = "0.116.1"
jinja2 = "3.1.6"
kaleido = "1.1.0"
loguru = "0.7.3"
modal = "1.3.0.post1"
numpy = ">=2,<2.3.0"
onnxruntime = "1.22.1"
opencv-python = "4.12.0.88"
opencv-python-headless = "4.12.0.88"
pandas = "2.3.1"
pikepdf = "9.11.0"
pillow = "11.3.0"
plotly = "6.3.1"
psycopg = "3.2.9"
psycopg-binary = "3.2.9"
pydantic = "2.11.7"
pydantic-settings = "2.10.1"
python-dotenv = "1.1.1"
python-magic = "0.4.27"
python-magic-bin = "0.4.14"
pyzipper = "0.3.6"
reportlab = "4.4.4"
sahi = "*"
sqlalchemy = "2.0.41"
torch = "2.9.1"
torchvision = "0.24.1"
ultralytics = "8.3.239"
uvicorn = "0.38.0"
weasyprint = "66.0"
[tool.poetry.group.dev.dependencies]
bandit = "1.9.3"
faker = "38.2.0"
greenlet = "3.2.3"
httpx = "0.28.1"
moto = "5.1.19"
mypy = "1.18.2"
pre-commit = "4.2.0"
pytest = "9.0.1"
pytest-asyncio = "1.3.0"
pytest-cov = "7.0.0"
pytest-mock = "3.15.1"
ruff = "0.12.3"
pytest-dotenv = "^0.5.2"
[tool.ruff]
line-length = 100
target-version = "py311"
[tool.ruff.lint]
select = ["E", "F", "W", "I", "B", "C4", "UP", "A"]
ignore = [
"E501",
"B905",
]
isort.known-first-party = ["mortiscope-api"]
pydocstyle.convention = "google"
[tool.ruff.format]
quote-style = "double"
[tool.mypy]
python_version = "3.11"
# Exclude directories
exclude = [
"notebooks/",
]
# Catch real bugs
warn_return_any = true
warn_unused_configs = true
warn_redundant_casts = true
warn_unused_ignores = true
no_implicit_optional = true
strict_equality = true
# Allow gradual typing
disallow_untyped_defs = false
disallow_incomplete_defs = false
disallow_untyped_calls = false
check_untyped_defs = true
# Third-party libraries
ignore_missing_imports = true
# Project structure
explicit_package_bases = true
namespace_packages = true
# SQLAlchemy models
[[tool.mypy.overrides]]
module = "app.database.models.*"
disable_error_code = ["misc"]
# Libraries without type stubs
[[tool.mypy.overrides]]
module = ["cv2.*", "magic.*", "reportlab.*", "weasyprint.*"]
ignore_missing_imports = true
# Pytest Configuration
[tool.pytest.ini_options]
pythonpath = ["."]
testpaths = ["tests"]
python_files = ["test_*.py", "*_test.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
# Async test support (required for FastAPI endpoint testing)
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"
# Load test environment variables
env_files = [
".env.test",
]
# Test markers for categorizing and selectively running tests
markers = [
"unit: Unit tests for individual components",
"integration: Integration tests with real database and services",
"no_cover: Skip coverage instrumentation for these tests",
]
# Default pytest command-line options
addopts = [
"-v",
"--strict-markers",
"--tb=short",
"--cov=app",
"--cov-report=term-missing",
"--cov-report=xml",
"--cov-fail-under=80",
]
# Suppress expected warnings
filterwarnings = [
"ignore::DeprecationWarning",
"ignore:The NumPy module was reloaded:UserWarning",
]