Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
127 lines (115 loc) · 4.05 KB
/
Copy pathpyproject.toml
File metadata and controls
127 lines (115 loc) · 4.05 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
# pyproject.toml
[project]
name = "tektronix"
version = "0.5.0"
description = "Package for working with Tektronix test equipment"
readme = "README.md"
license = "MIT"
license-files = ["LICENSE.txt"]
authors = [
{ name = "Matthew Rankin", email = "369937+matthewrankin@users.noreply.github.com" },
]
requires-python = ">=3.12"
dependencies = ["numpy>=2.2.0"]
classifiers = [
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
'Programming Language :: Python :: 3.14',
'Development Status :: 5 - Production/Stable',
'Operating System :: OS Independent',
'Intended Audience :: Developers',
'Topic :: Software Development :: Libraries :: Python Modules',
]
[project.urls]
Homepage = "https://github.com/questrail/tektronix"
Issues = "https://github.com/questrail/tektronix/issues"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src/tektronix"]
[tool.ruff]
line-length = 88
[tool.ruff.lint]
# Select rules explicitly rather than relying on ruff's defaults, so that the
# rule set is a deliberate choice. The ruff version itself is pinned by uv.lock.
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"UP", # pyupgrade
"B", # flake8-bugbear
"SIM", # flake8-simplify
"EXE", # flake8-executable
"PL", # pylint
"PT", # flake8-pytest-style
"NPY", # numpy-specific rules
"C4", # flake8-comprehensions
"FURB",# refurb
"PERF",# perflint
"RET", # flake8-return
"ARG", # flake8-unused-arguments
"PIE", # flake8-pie
"ISC", # flake8-implicit-str-concat
"RSE", # flake8-raise
"A", # flake8-builtins
"N", # pep8-naming
"G", # flake8-logging-format
"LOG", # flake8-logging
"Q", # flake8-quotes
"S", # flake8-bandit
"RUF", # ruff's own rules
]
[tool.ruff.lint.per-file-ignores]
# PLR2004 asks for a name in front of every literal a comparison reaches. In
# a test the literal is the expected value, and naming it would only move the
# number one line up while making the assertion harder to read against the
# sample file it was read out of.
# S101 objects to `assert`, which is how a pytest suite states what it checks.
"tests/**" = ["PLR2004", "S101"]
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = ["--strict-markers", "--strict-config"]
# A numpy or stdlib deprecation is how this breaks across the 3.12 - 3.14 the
# classifiers claim. Left as a warning it scrolls past in a green run; as an
# error it fails the run that introduced it.
filterwarnings = ["error"]
# An xfail that starts passing is a test no longer checking what it says.
xfail_strict = true
[tool.coverage.run]
source = ["tektronix"]
branch = true
# Coveralls maps the report onto the repository, and absolute paths from a
# runner's checkout directory are not something it can map.
relative_files = true
[tool.coverage.report]
show_missing = true
# exclude_also adds to coverage's built-in exclusions; exclude_lines would
# replace them, which means restating the pragma pattern to keep it working.
exclude_also = ["if TYPE_CHECKING:"]
# The suite covers every statement and branch. A floor set anywhere below that
# would let coverage fall without anything noticing; set here, uncovered code
# has to arrive with either a test or a deliberate edit to this line.
fail_under = 100
[tool.pyright]
venvPath = "."
venv = ".venv"
include = ["src", "tests", "scripts"]
# The package ships py.typed, which tells a consumer's type checker to trust
# what it finds here. Under the default "standard" mode an unannotated
# function still passes while handing that consumer Unknown for every
# parameter and return, which is worse than shipping no marker at all: they
# lose the checking and are not told. Strict over src is what makes the marker
# honest. The tests are not published and stay at standard.
strict = ["src"]
[dependency-groups]
dev = [
"pyright>=1.1.411",
"pytest>=9.0.3",
"pytest-cov>=7.1.0",
"ruff>=0.16.5",
"zizmor>=1.30.0",
]