-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
110 lines (98 loc) · 2.94 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
[build-system]
requires = [
"setuptools>=68",
"setuptools_scm[toml]>=8.0",
]
build-backend = "setuptools.build_meta"
[project]
name = "scippuncertainty"
description = "Advanced uncertainty propagation with Scipp"
authors = [{ name = "Scipp contributors" }]
license = { file = "LICENSE" }
readme = "README.md"
classifiers = [
"Intended Audience :: Science/Research",
"License :: OSI Approved :: BSD License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering",
"Typing :: Typed",
]
requires-python = ">=3.10"
# IMPORTANT:
# Run 'tox -e deps' after making changes here. This will update requirement files.
# Make sure to list one dependency per line.
dependencies = [
"scipp"
]
dynamic = ["version"]
[project.optional-dependencies]
all = ["rich"]
[project.urls]
"Bug Tracker" = "https://github.com/scipp/scippuncertainty/issues"
"Documentation" = "https://scipp.github.io/scippuncertainty"
"Source" = "https://github.com/scipp/scippuncertainty"
[tool.setuptools_scm]
[tool.pytest.ini_options]
minversion = "7.0"
addopts = """
--strict-config
--strict-markers
--import-mode=importlib
-ra
-v
"""
testpaths = "tests"
filterwarnings = [
"error",
]
[tool.ruff]
line-length = 88
extend-include = ["*.ipynb"]
extend-exclude = [
".*", "__pycache__", "build", "dist", "install",
]
[tool.ruff.lint]
# See https://docs.astral.sh/ruff/rules/
select = ["B", "C4", "DTZ", "E", "F", "G", "I", "PERF", "PGH", "PT", "PYI", "RUF", "S", "T20", "UP", "W"]
ignore = [
# Conflict with ruff format, see
# https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
"COM812", "COM819", "D206", "D300", "E111", "E114", "E117", "ISC001", "ISC002", "Q000", "Q001", "Q002", "Q003", "W191",
]
fixable = ["I001", "B010"]
isort.known-first-party = ["scippuncertainty"]
pydocstyle.convention = "numpy"
[tool.ruff.lint.per-file-ignores]
# those files have an increased risk of relying on import order
"__init__.py" = ["I"]
"tests/*" = [
"S101", # asserts are fine in tests
"B018", # 'useless expressions' are ok because some tests just check for exceptions
]
"*.ipynb" = [
"E501", # longer lines are sometimes more readable
"F403", # *-imports used with domain types
"F405", # linter may fail to find names because of *-imports
"I", # we don't collect imports at the top
"S101", # asserts are used for demonstration and are safe in notebooks
"T201", # printing is ok for demonstration purposes
]
[tool.ruff.format]
quote-style = "preserve"
[tool.mypy]
mypy_path = "src"
ignore_missing_imports = true
enable_error_code = [
"ignore-without-code",
"redundant-expr",
"truthy-bool",
]
strict = true
show_error_codes = true
warn_unreachable = true