-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathpyproject.toml
More file actions
170 lines (155 loc) · 5.73 KB
/
pyproject.toml
File metadata and controls
170 lines (155 loc) · 5.73 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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
[build-system]
requires = ["hatchling~=1.13"]
build-backend = "hatchling.build"
[project]
name = "libcosimpy"
dynamic = ["version"]
authors = [
{ name = "Magnus Steinstø", email = "magnus.steinsto@dnv.com" },
]
maintainers = [
{ name = "Hee Jong Park", email = "hee.jong.park@dnv.com"}
]
description = "Python wrapper for the libcosim library"
readme = "README.md"
requires-python = ">=3.11, <3.15"
classifiers = [
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX :: Linux"
]
[project.urls]
"Homepage" = "https://github.com/open-simulation-platform/libcosimpy"
[dependency-groups]
dev = [
"conan>=2.27.0",
"ruff>=0.15.0",
"pyright>=1.1.400",
"pytest>=8.3.5",
]
# Hatch configurations
[tool.hatch.version]
path = "src/libcosimpy/__about__.py"
[tool.hatch.build]
exclude = ["tests", ".github"]
[tool.hatch.build.targets.wheel.hooks.custom]
dependencies = [
"conan>=2.27.0",
"hatchling~=1.13",
"cmake>=3.10,<4.0",
"patchelf>=0.17.2; platform_system == 'Linux'"
]
[tool.hatch.build.targets.wheel.force-include]
"build/libcosimc" = "src/libcosimpy/libcosimc"
[tool.cibuildwheel]
build = "*-manylinux_x86_64 *-win_amd64"
build-frontend = "build[uv]"
test-command = "uv run --with pytest pytest {package}"
[tool.cibuildwheel.linux]
before-all = [
"yum install -y libatomic",
"yum install -y perl-IPC-Cmd perl-Digest-SHA perl-Time-Piece",
]
manylinux-x86_64-image = "manylinux_2_28"
[tool.pyright]
stubPath = "stubs"
include = [
"src",
"tests",
"demos",
]
exclude = [
]
ignore = [
"conanfile.py",
"hatch_build.py",
]
typeCheckingMode = "basic"
useLibraryCodeForTypes = true
reportMissingParameterType = "error"
reportUnknownParameterType = "warning"
reportUnknownMemberType = false
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"
reportUntypedClassDecorator = "warning"
reportUntypedBaseClass = "error"
reportUntypedNamedTuple = "warning"
reportUnnecessaryTypeIgnoreComment = "information"
[tool.ruff]
exclude = [
".git",
".venv",
"dist",
"build",
"*cache",
"**/__pycache__",
]
src = [
"src",
]
line-length = 120
target-version = "py310"
[tool.ruff.lint]
[lint]
# Settings for Ruff linter (invoked with `uv run ruff check`).
# Start by including _all_ Ruff lint rules, then ignore selected rules as needed
# https://docs.astral.sh/ruff/rules/
select = [
"ALL",
]
ignore = [
# Ruff lint rules temporarily ignored, but which should be reactivated and resolved in the future.
"D", # Missing docstrings <- @TODO: reactivate and resolve docstring issues @CLAROS, 2024-09-27
# Ruff lint rules considered as too strict and hence ignored
"FIX002", # Line contains TODO, consider resolving the issue
"TD003", # Missing issue link on the line following a TODO
"S101", # Use of assert detected
"RET504", # Unnecessary assignment to `result` before `return` statement
"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
"TRY003", # Avoid specifying long messages outside the exception class
"PLR1711", # Useless `return` statement at end of function
"G00", # Logging statement uses string formatting ('G00' covers all rules flagging string formatting in logging, e.g. G001, G002, etc.)
"S311", # Standard pseudo-random generators are not suitable for cryptographic purposes
"PLW0603", # Using the global statement to update {name} is discouraged
"PYI041", # Use `float` instead of `int | float`
# Ruff lint rules known to be in conflict with Ruff formatter.
# https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
"W191", # Tab-indentation (in conflict with Ruff formatter)
"E111", # Indentation with invalid multiple (in conflict with Ruff formatter)
"E114", # Indentation with invalid multiple comment (in conflict with Ruff formatter)
"E117", # Over-indented (in conflict with Ruff formatter)
"D206", # Indent with spaces (in conflict with Ruff formatter)
"D300", # Triple single quotes (in conflict with Ruff formatter)
"Q000", # Bad quotes in inline string (in conflict with Ruff formatter)
"Q001", # Bad quotes in multi-line string (in conflict with Ruff formatter)
"Q002", # Bad quotes in DocString (in conflict with Ruff formatter)
"Q003", # Avoidable escaped quote (in conflict with Ruff formatter)
"COM812", # Missing trailing comma (in conflict with Ruff formatter)
"COM819", # Prohibited trailing comma (in conflict with Ruff formatter)
"ISC001", # Single-line implicit string concatenation (in conflict with Ruff formatter)
"ISC002", # Multi-line implicit string concatenation (in conflict with Ruff formatter)
]