-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathpyproject.toml
More file actions
144 lines (127 loc) · 3.86 KB
/
pyproject.toml
File metadata and controls
144 lines (127 loc) · 3.86 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
[build-system]
requires = ["setuptools>=77.0"]
build-backend = "setuptools.build_meta"
[tool.setuptools]
packages = ["mrcfile"]
package-dir = {"" = "src"}
[tool.setuptools.dynamic]
version = {attr = "mrcfile.version.__version__"}
readme = {file = ["README.rst"]}
[project]
name = "mrcfile"
authors = [
{name = "Colin Palmer", email = "colin.palmer@stfc.ac.uk"},
]
dynamic = ["version", "readme"]
description = "MRC file I/O library"
license = "BSD-3-Clause"
license-files = ["LICENSE.txt"]
requires-python = ">=3.9"
classifiers = [
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'Intended Audience :: Science/Research',
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
'Programming Language :: Python :: 3.14',
'Topic :: Scientific/Engineering :: Bio-Informatics',
'Topic :: Software Development :: Libraries :: Python Modules'
]
dependencies = ["numpy >= 1.16.0"]
optional-dependencies.dev = [
"mypy ~=1.18.0",
"pre-commit",
"pytest",
"ruff ~=0.13.0",
]
[project.urls]
homepage = "https://github.com/ccpem/mrcfile"
documentation = "https://mrcfile.readthedocs.io/"
[project.scripts]
'mrcfile-header' = 'mrcfile.command_line:print_headers'
'mrcfile-validate' = 'mrcfile.validator:main'
[tool.mypy]
files = ["src", "tests"]
python_version = "3.9"
[[tool.mypy.overrides]]
module = "mrcfile.*"
disallow_untyped_defs = true
[tool.ruff]
# Same as Black.
line-length = 88
indent-width = 4
target-version = "py39"
[tool.ruff.lint]
# Linting rules
select = [
"A", # flake8-builtins
"ARG", # Unused arguments
"ASYNC", # flake8-async
"B", # flake8-bugbear
"BLE", # Overly-broad except clauses
"C4", # flake8-comprehensions
"C901", # McCabe complexity
"COM", # flake8-commas
"D1", # Missing docstrings in public API
"E", # pycodestyle errors
"ERA", # Eradicate commented-out code
"EXE", # flake8-executable
"F", # Pyflakes
"FA", # flake8-future-annotations
"FBT", # Avoid positional boolean arguments
"FIX", # flake8-fixme
"FLY", # flynt
"FURB", # refurb
"I", # isort
"ICN", # flake8-import-conventions
"ISC", # Implicit string concatenation
"N", # PEP8 naming conventions
"NPY", # NumPy-specific rules
"PERF", # Perflint
"PGH", # pygrep-hooks (incl no bare "noqa" or "type: ignore" comments)
"PIE", # flake8-pie
"PL", # Pylint
"Q", # flake8-quotes
"RSE", # flake8-raise
"RUF", # Ruff-specific rules
"S", # flake8-bandit
"SIM", # flake8-simplify
"SLF", # flake8-self
"SLOT", # flake8-slots
"T10", # flake8-debugger
"T20", # flake8-print
"TD", # flake8-todos
"TID", # flake8-tidy-imports
"TRY", # tryceratops
"UP", # pyupgrade
"W", # pycodestyle warnings
]
# Possibly useful but not yet selected: ANN, DTZ, EM, LOG, G, TC, D[234]
# Specific rules to ignore
ignore = [
"B028", # explicit stacklevel keyword in warnings - aim to review these
"COM812", # trailing commas - won't fix, conflicts with Ruff formatter
"PLR2004", # magic values - won't fix, not worth changing these
"TRY003", # long exception messages - won't fix
]
# Allow fix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = []
[tool.ruff.lint.per-file-ignores]
# Ignore some rules that are not relevant to test code
"tests/**.py" = [
"D", # docstrings
"S101", # assertions
"SLF001", # private member access
"T20", # flake8-print
]
# Ignore some rules that are not relevant to docs config file
"docs/conf.py" = [
"D" # docstrings
]