-
Notifications
You must be signed in to change notification settings - Fork 28
/
pyproject.toml
127 lines (110 loc) · 3.67 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
[project]
name = "poptimizer"
version = "3.0.0a"
description = "Portfolio optimization"
authors = [
{ name = "WLM1ke", email = "[email protected]" }
]
dependencies = [
"aiohttp>=3.9.5",
"motor>=3.3.2",
"pydantic>=2.6.0",
"pydantic-settings>=2.1.0",
"typer>=0.11.1",
"uvloop>=0.19.0",
"aiomoex>=2.1.2",
"openpyxl>=3.1.2",
"pandas>=2.1.4",
"lxml>=5.1.0",
"aiofiles>=23.2.1",
"scipy>=1.12.0",
"torch>=2.2.0",
"async-lru>=2.0.4",
]
readme = "README.md"
requires-python = ">= 3.12"
[project.urls]
repository = "https://github.com/WLM1ke/poptimizer"
[project.scripts]
poptimizer="poptimizer.__main__:main"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.rye]
managed = true
dev-dependencies = [
"import-linter>=2.0",
"pyright>=1.1.364",
"pytest>=8.2.0",
"pytest-cov>=4.1.0",
"ruff>=0.4.1",
"pandas-stubs>=2.1.4.231227",
"pytest-asyncio>=0.23.3",
"lxml-stubs>=0.5.1",
]
[tool.hatch.metadata]
allow-direct-references = true
[tool.pyright]
verboseOutput = true
pythonVersion = "3.12"
typeCheckingMode = "strict"
[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
"ANN101", # Missing-type-self
"ANN102", # Missing-type-cls
"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" = [
"S101", # Use of `assert` detected
]
[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.ui",
"poptimizer.service",
"poptimizer.adapter",
"poptimizer.domain",
]