-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathpyproject.toml
161 lines (146 loc) · 4.75 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
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
[tool.poetry]
name = "trafficgen"
version = "0.5.0"
description = "Automatic generation of ship traffic situations from a set of predefined situations"
authors = ["Tom Arne Pedersen <Tom.Arne.Pedersen@dnv.com>"]
license = "MIT License"
readme = "README.md"
[tool.poetry.dependencies]
python = ">=3.9, <3.13"
click = "^8.1"
click-log = "^0.4.0"
numpy = "^1.25.2"
matplotlib = "^3.7.2"
basemap = "^1.3.8"
basemap-data-hires = "^1.3.2"
global-land-mask = "^1.0.0"
folium = "^0.14.0"
pydantic = "^2.5"
maritime-schema = "^0.0.6"
[tool.poetry.group.dev]
optional = true
[tool.poetry.group.dev.dependencies]
black = { version = "^23.12", extras = ["jupyter"] }
ruff = "^0.1.8" # linter
pyright = "^1.1.338"
tox = "^4.11.1"
pytest = "^7.4.1"
pytest-cov = "^4.1"
sourcery = "^1.14"
[tool.poetry.group.docs]
optional = true
[tool.poetry.group.docs.dependencies]
sphinx = "^7.2.5"
sphinx-rtd-theme = "^1.3.0"
# Add command line interface here like:
[tool.poetry.scripts]
trafficgen = "trafficgen.cli:main"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.pytest.ini_options]
testpaths = "tests"
addopts = "--strict-markers"
xfail_strict = true
[tool.black]
line-length = 105
target-version = ["py39", "py310", "py311", "py312"]
[tool.ruff]
exclude = [
".git",
".venv",
".tox",
"build",
"dist",
"__pycache__",
"./docs/conf.py",
]
src = ["src"]
ignore = [
"E501", # Line length too long
# "D100", # Missing docstring in public module
# "D101", # Missing docstring in public class
# "D102", # Missing docstring in public method
# "D103", # Missing docstring in public function
# "D104", # Missing docstring in public package
"D105", # Missing docstring in magic method
"D107", # Missing docstring in __init__
"D202", # No blank lines allowed after function docstring
"D203", # 1 blank line required before class docstring
"D205", # 1 blank line required between summary line and description
"D212", # Multi-line docstring summary should start at the first line
"D213", # Multi-line docstring summary should start at the second line
# "N802", # Function name should be lowercase (uncomment if you want to allow Uppercase function names)
# "N803", # Argument name should be lowercase (uncomment if you want to allow Uppercase argument names)
"N806", # Variable in function should be lowercase (uncomment if you want to allow Uppercase variable names in functions)
# "N815", # Variable in class scope should not be mixedCase (uncomment if you want to allow mixedCase variable names in class scope)
# "N816", # Variable in global scope should not be mixedCase (uncomment if you want to allow mixedCase variable names in global scope)
]
line-length = 105
select = [
"E",
"D",
"F",
"N",
"W",
"I",
"B",
]
target-version = "py39"
[tool.ruff.pep8-naming]
ignore-names = [
"test_*",
"setUp",
"tearDown",
]
[tool.ruff.pydocstyle]
convention = "numpy"
[tool.ruff.per-file-ignores]
"__init__.py" = ["I001"]
"./tests/*" = ["D"]
[tool.pyright]
exclude = [
".git",
".venv",
".tox",
"build",
"dist",
"**/__pycache__",
"./docs/conf.py",
"./venv",
]
extraPaths = ["./src"]
typeCheckingMode = "basic"
useLibraryCodeForTypes = true
# Activate the following rules step by step to (step by step..) improve code quality
reportMissingParameterType = "error"
reportUnknownParameterType = "warning"
reportUnknownMemberType = "warning"
reportMissingTypeArgument = "error"
reportPropertyTypeMismatch = "error"
reportFunctionMemberAccess = "warning"
reportPrivateUsage = "warning"
reportTypeCommentUsage = "warning"
reportIncompatibleMethodOverride = "warning"
reportIncompatibleVariableOverride = "error"
reportInconsistentConstructor = "error"
reportOverlappingOverload = "warning"
reportUninitializedInstanceVariable = "warning"
reportCallInDefaultInitializer = "warning"
reportUnnecessaryIsInstance = "information"
reportUnnecessaryCast = "warning"
reportUnnecessaryComparison = "warning"
reportUnnecessaryContains = "warning"
reportUnusedCallResult = "warning"
reportUnusedExpression = "warning"
reportMatchNotExhaustive = "warning"
reportShadowedImports = "warning"
reportUntypedFunctionDecorator = "warning"
reportUntypedBaseClass = "error"
reportUntypedNamedTuple = "warning"
# Activate the following rules only locally and temporary, i.e. for a QA session.
# (For server side CI they are considered too strict.)
# reportConstantRedefinition = "warning"
# reportUnnecessaryTypeIgnoreComment = "information"
# reportImportCycles = "warning"
# reportImplicitStringConcatenation = "warning"