-
Notifications
You must be signed in to change notification settings - Fork 28
/
pyproject.toml
117 lines (103 loc) · 3.59 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
[project]
name = "poptimizer"
version = "3.0.0a"
description = "Portfolio optimization"
readme = "README.md"
requires-python = ">=3.12,<3.13"
dependencies = [
"aiohttp>=3.11.8",
"pydantic>=2.10.1",
"pydantic-settings>=2.4.0",
"typer>=0.15.0",
"uvloop>=0.20.0",
"aiomoex>=2.1.2",
"openpyxl>=3.1.5",
"pandas>=2.2.2",
"lxml>=5.3.0",
"aiofiles>=24.1.0",
"scipy>=1.14.1",
"async-lru>=2.0.4",
"torch>=2.5.0",
"tqdm>=4.66.5",
"pymongo>=4.10.1",
]
[dependency-groups]
dev = [
"import-linter>=2.1",
"pyright>=1.1.389",
"pytest>=8.3.2",
"pytest-cov>=5.0.0",
"ruff>=0.7.1",
"pandas-stubs>=2.2.2.240807",
"pytest-asyncio>=0.24.0",
"lxml-stubs>=0.5.1",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.pyright]
verboseOutput = true
pythonVersion = "3.12"
typeCheckingMode = "strict"
exclude = ["**/tests/*"]
[tool.pytest.ini_options]
asyncio_mode = "auto"
addopts = "--cov-report=term-missing --setup-show --verbose"
[tool.coverage.run]
branch = true
[tool.coverage.report]
exclude_lines = ["if __name__ == .__main__.:"]
omit = ["*/tests/*"]
[tool.ruff]
line-length = 120
fix = true
[tool.ruff.lint]
select = ["ALL"]
fixable = ["ALL"]
ignore = [
"A003", # Class attribute is shadowing a python builtin
"ANN401", # Dynamically typed expressions (typing.Any) are disallowed
"COM812", # Missing-trailing-comma - ruff format recommendations
"D100", # Missing docstring in public module
"D101", # Missing docstring in public class
"D102", # Missing docstring in public method
"D103", # Missing docstring in public function
"D103", # Missing docstring in public function
"D104", # Missing docstring in public package
"D105", # Missing docstring in magic method
"D107", # Missing docstring in __init__ - prefer doc for class
"D203", # One-blank-line-before-class (D203) and no-blank-line-before-class (D211) are incompatible
"D213", # Multi-line-summary-first-line (D212) and multi-line-summary-second-line (D213) are incompatible
"DTZ", # The use of `datetime` without `tzinfo` argument is not allowed - one tz zone
"EM101", # Exception must not use a string literal, assign to variable first - don't like many exceptions
"EM102", # Exception must not use an f-string literal, assign to variable first - don't like many exceptions
"ISC001", # Single-line-implicit-string-concatenation - ruff format recommendations
"RUF001", # Ambiguous-unicode-character-string - russian
"RUF002", # Ambiguous-unicode-character-docstring - russian
"RUF003", # Ambiguous-unicode-character-comment - russian
"TRY003", # Avoid specifying long messages outside the exception class - don't like many exceptions
]
unfixable = [
"EM101", # Exception must not use a string literal, assign to variable first
"EM102", # Exception must not use an f-string literal, assign to variable first
]
[tool.ruff.lint.per-file-ignores]
"test_*.py" = [
"ANN001", # Missing type annotation for function argument
"ANN201", # Missing return type annotation for public function
"S101", # Use of `assert` detected
"PLR2004", # Magic value used in comparison
]
[tool.ruff.lint.pep8-naming]
classmethod-decorators = ["pydantic.field_validator", "pydantic.root_validator"]
[tool.importlinter]
root_package = "poptimizer"
[[tool.importlinter.contracts]]
name = "Layered"
type = "layers"
layers = [
"poptimizer.controllers",
"poptimizer.adapters",
"poptimizer.use_cases",
"poptimizer.domain",
]