forked from hw-native-sys/simpler
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
82 lines (72 loc) · 2.91 KB
/
pyproject.toml
File metadata and controls
82 lines (72 loc) · 2.91 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
# Copyright (c) PyPTO Contributors.
# This program is free software, you can redistribute it and/or modify it under the terms and conditions of
# CANN Open Software License Agreement Version 2.0 (the "License").
# Please refer to the License for details. You may not use this file except in compliance with the License.
# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
# INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
# See LICENSE in the root of the software repository for the full text of the License.
# -----------------------------------------------------------------------------------------------------------
[build-system]
requires = ["scikit-build-core>=0.10.0", "nanobind>=2.0.0", "cmake>=3.15"]
build-backend = "scikit_build_core.build"
[project]
name = "simpler"
version = "0.1.0"
requires-python = ">=3.9"
[project.optional-dependencies]
# ``torch>=2.3`` is required by ``simpler_setup.torch_interop`` (uses
# ``torch.uint16`` / ``torch.uint32``, added in PyTorch 2.3). CI installs
# torch via a custom index URL and does not rely on this pin; it is here
# so ``pip install -e '.[test]'`` resolves a usable version for local devs.
test = ["pytest>=6.0", "pytest-xdist>=3.0", "torch>=2.3"]
[tool.ruff]
line-length = 120
target-version = "py39"
required-version = "0.14.8"
[tool.ruff.lint]
select = [
"PL", # pylint, https://docs.astral.sh/ruff/rules/#pylint-pl
"I", # isort, https://docs.astral.sh/ruff/rules/#isort-i
"E", # pycodestyle errors, https://docs.astral.sh/ruff/rules/#error-e
"W", # pycodestyle warnings, https://docs.astral.sh/ruff/rules/#warning-w
"F", # pyflakes, https://docs.astral.sh/ruff/rules/#pyflakes-f
"UP", # pyupgrade, https://docs.astral.sh/ruff/rules/#pyupgrade-up
]
ignore = [
"ANN401", # flake8-annotations: any-type
"PLR2004", # pylint: magic-value-comparison
"PLR0911", # too many return statements
"PLW2901", # pylint: redefined-loop-variable (DSL reassignment pattern)
]
fixable = ["ALL"]
[tool.ruff.lint.pylint]
max-statements = 100
max-args = 10
max-branches = 15
[tool.ruff.format]
quote-style = "double"
skip-magic-trailing-comma = false
line-ending = "lf"
[tool.pyright]
include = ["python", "simpler_setup", "tests"]
exclude = ["**/__pycache__", "build", "dist", "tests/st"]
extraPaths = ["python"]
typeCheckingMode = "basic"
pythonVersion = "3.9"
reportMissingImports = false
reportMissingTypeStubs = false
reportMissingModuleSource = false
reportCallIssue = false
reportAttributeAccessIssue = false
reportAssignmentType = false
reportOperatorIssue = false
reportRedeclaration = false
[tool.pytest.ini_options]
testpaths = ["tests", "examples"]
addopts = "--import-mode=importlib"
[tool.scikit-build]
wheel.packages = ["simpler_setup", "python/simpler"]
cmake.build-type = "Release"
build-dir = "build/{wheel_tag}"
editable.rebuild = false
editable.verbose = true