Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
143 lines (126 loc) · 4.03 KB
/
Copy pathpyproject.toml
File metadata and controls
143 lines (126 loc) · 4.03 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
[build-system]
requires = ["hatchling", "uv-dynamic-versioning"]
build-backend = "hatchling.build"
[project]
name = "movici"
dynamic = ["version"]
requires-python = ">=3.11,<3.14"
dependencies = [
"movici-data-core",
"movici-drinking-water-model",
"movici-simulation-core",
"movici-transport-assignment-model",
"movici-urban-drainage-model",
]
[dependency-groups]
dev = [
"movici-simulation-core[all]",
"movici-data-core",
"pytest",
"coverage",
"mypy",
"taplo",
"ruff",
]
docs = [
"movici-simulation-core[models]",
"sphinx",
"furo",
"sphinxcontrib-mermaid",
"sphinxcontrib-plantuml",
]
[project.urls]
Homepage = "https://github.com/nginfra/movici-simulation-core"
Documentation = "https://docs.movici.nl/en/latest/index.html"
Repository = "https://github.com/nginfra/movici-simulation-core"
Issues = "https://github.com/nginfra/movici-simulation-core/issues"
[tool.uv]
exclude-newer = "1 week"
[tool.uv.sources]
movici-simulation-core = { workspace = true }
movici-data-core = { workspace = true }
movici-drinking-water-model = { workspace = true }
movici-transport-assignment-model = { workspace = true }
movici-urban-drainage-model = { workspace = true }
[tool.uv.workspace]
members = ["packages/*"]
[tool.hatch.build.targets.sdist]
include = ["README.rst", "src/*"]
[tool.hatch.version]
source = "uv-dynamic-versioning"
[tool.ruff]
line-length = 99
target-version = "py310"
[tool.ruff.lint]
# Ideally we'd have the following rules enabled. However, that is currently not feasible,
# so some of them are still disabled, we should work on enabling and fixing them:
select = [
# "ARG", # check for unused arguments -- there are too many false positives with overriding methods -> maybe typing.override will help?
"B", # (bugbear) catches certain common programming bugs
# "C4", # comprehension linting
"E", # common codestyle errors
"F", # pyflakes rules
# "FA", # check for correct usage of from __future__ import annotations
"FURB", # refactor opportunities
"I", # isort
"LOG", # check for logging best practices and bugs
# "N", # pep8 naming
"NPY", # numpy checks
"PD", # pandas checks
"PLE", # pylint errors
# "PLR", # pylint refactor opportunities
# "PLW", # pyling warnings
# "PT", # pytest style checks
# "PTH", # prefer pathlib over os.path
# "RSE", # return statement rules
# "RUF", # ruff specific rules
"S", # security (bandit) checks
# "SIM", # suggest code simplifications
"T10", # check for breakpoint() statements
"T20", # check for print statements
"W", # common codestyle warnings
"YTT", # check sys.version errors (not used extensively but nice to have)
]
ignore = [
"B027", # empty method in abstract base class
"B028", # warnings explicit `stack_level` kwarg
"B905", # zip explicit `strict` kwarg
"S101",
]
[tool.ruff.lint.per-file-ignores]
"packages/data-core/*" = ["S101", "B011"]
"packages/data-core/tests/*" = ["S"]
"packages/data-core/examples/*" = ["T20"]
"packages/drinking-water/tests/*" = ["S"]
"packages/simulation-core/tests/*" = ["S"]
"packages/simulation-core/examples/*" = ["S101", "T20"]
"packages/transport-assignment/tests/*" = ["S"]
"packages/urban-drainage/tests/*" = ["S"]
[tool.ruff.lint.isort]
known-first-party = [
"movici_data_core",
"movici_drinking_water_model",
"movici_simulation_core",
"movici_transport_assignment_model",
"movici_urban_drainage_model",
]
[tool.ruff.format]
docstring-code-format = true
[tool.pytest.ini_options]
minversion = "7.0"
addopts = ["--tb=short", "--strict-markers", "--strict-config"]
testpaths = ["tests"]
filterwarnings = ["ignore:.*ABCs from 'collections'.*:DeprecationWarning"]
asyncio_mode = "auto" # work with regular async @pytest.fixtures
[tool.mypy]
disallow_untyped_calls = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
disallow_untyped_decorators = true
check_untyped_defs = true
warn_return_any = true
warn_unused_configs = true
show_error_context = true
[[tool.mypy.overrides]]
module = ['numpy.*', 'numba.*']
ignore_missing_imports = true