-
Notifications
You must be signed in to change notification settings - Fork 3
/
pyproject.toml
129 lines (115 loc) · 3.5 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
128
129
[tool.poetry]
name = "symbrim"
version = "0.1.0"
description = "A Modular and Extensible Open-Source Framework for Symbolic Creating Bicycle-Rider Models"
authors = ["tjstienstra <[email protected]>"]
license = "CC0-1.0"
readme = "README.md"
repository = "https://github.com/mechmotum/symbrim"
[tool.poetry.dependencies]
python = "^3.9"
typing-extensions = "^4.12.2"
sympy = "^1.13"
numpy = ">=1.24"
symmeplot = {version = "^0.2.0", optional = true}
bicycleparameters = {version = "^1.2.0", optional = true}
importlib-metadata = {version = "^8.5.0", python = "<3.8"}
[tool.poetry.group.lint.dependencies]
ruff = "^0.6.9"
pre-commit = "^4.0.1"
[tool.poetry.group.test.dependencies]
pytest = "^8.3.3"
coverage = {extras = ["toml"], version = "7.6.1"}
pytest-cov = "^5.0.0"
numpy = "^1.26.4"
pytest-benchmark = "^4.0.0"
pytest-mock = "^3.14.0"
[tool.poetry.group.docs.dependencies]
sphinx = "^7.4.7"
furo = "^2024.8.6"
sphinxcontrib-bibtex = "^2.6.3"
nbsphinx = "^0.9.5"
rpds-py = "^0.20.0"
ipykernel = "^6.29.5"
nbstripout = "^0.7.1"
[tool.poetry.extras]
plotting = ["symmeplot"]
parametrize = ["bicycleparameters"]
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.ruff]
target-version = "py39"
line-length = 88
lint.select = ["ALL"]
lint.ignore = [
"COM812", # trailing comma missing
"C901", # function is too complex
"D105", # missing docstring in magic method
"D203", # 1 blank line required before class docstring
"D213", # multi-line docstring summary should start at the second line
"EM", # exception must not use a string literal
"FBT", # boolean-typed positional argument
"PLR0913", # too many arguments in function definition
"PLR2004", # magic value used in comparison
"SLF001", # private member accessed
"TRY003", # avoid specifying long messages outside the exception class
]
output-format = "full"
[tool.ruff.lint.per-file-ignores]
"tests/*" = [
"ANN", # annotations
"ARG002", # unused method argument (occurs frequently due to fixtures/parametrize)
"D", # documentation
"PT011", # `pytest.raises(...)` is too broad, set the `match` parameter or use a more specific exception
"SLF001", # private member accessed
"S101", # use of `assert` detected
]
"benchmarks/*" = [
"ANN", # annotations
"D", # documentation
"INP001", # part of an implicit namespace package
"S101", # use of `assert` detected
]
"docs/*" = [
"INP001", # part of an implicit namespace package
"S101", # use of `assert` detected
"S603", "S607", # `subprocess` call
]
"docs/tutorials/*" = [
"E501", # line too long
"ERA001", # commented out code as example
"ARG005", # unused lambda argument
"E731", # do not assign a `lambda` expression, use a `def`
"F401", "F811", # unused imports to help users
"F403", "F405", # related to star import
]
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.mypy]
python_version = "3.9"
[tool.pytest.ini_options]
testpaths = [
"tests",
]
[tool.coverage.paths]
source = ["src"]
[tool.coverage.run]
branch = true
source = ["symbrim"]
[tool.coverage.report]
show_missing = true
fail_under = 100
exclude_also = [
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
"with contextlib.suppress.ImportError.:",
"def get_param_values",
"def set_plot_objects"
]
omit = [
"src/symbrim/utilities/benchmarking.py",
"src/symbrim/utilities/parametrize.py",
"src/symbrim/utilities/plotting.py",
"src/symbrim/utilities/testing.py"
]