-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpyproject.toml
150 lines (135 loc) · 4.24 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
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
[build-system]
requires = ["scikit-build-core"]
build-backend = "scikit_build_core.build"
[project]
name = "pytetwild"
version = "0.1.dev1"
description = "Python wrapper of fTetWild"
readme = { file = "README.rst", content-type = "text/x-rst" }
authors = [{ name = "Alex Kaszynski", email = "[email protected]" }]
dependencies = ["numpy"]
classifiers = [
'Development Status :: 3 - Alpha',
'Intended Audience :: Science/Research',
'Topic :: Scientific/Engineering :: Information Analysis',
'License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)',
'Operating System :: Microsoft :: Windows',
'Operating System :: POSIX',
'Operating System :: MacOS',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
]
include = ["src/pytetwild/py.typed"]
[project.optional-dependencies]
all = ['pyvista']
dev = ["pytest", "pre-commit", "pyvista", "scipy", "meshio"]
[tool.scikit-build]
cmake.build-type = "Release"
build-dir = "./build"
editable.mode = "inplace"
[tool.pytest.ini_options]
testpaths = 'tests'
[tool.cibuildwheel]
archs = ["auto64"] # 64-bit only
build = "cp38-* cp39-* cp310-* cp311-* cp312-*" # Only build Python 3.8-3.12 wheels
skip = ["pp*", "*musllinux*"] # disable PyPy and musl-based wheels
test-requires = "pytest pyvista scipy meshio"
test-command = "pytest {project}/tests -v"
[tool.cibuildwheel.linux]
before-all = "yum install gmp gmp-devel -y"
environment = "USE_MAVX='true'"
environment-pass = ["USE_MAVX"]
# pip install delvewheel &&
[tool.cibuildwheel.windows]
before-build = "pip install delvewheel && python -c \"import os; file_path = 'build/CMakeCache.txt'; os.remove(file_path) if os.path.exists(file_path) else None\""
repair-wheel-command = "python -c \"import shutil, os; shutil.copy(os.path.join(os.getenv('GMP_LIB'), '..', 'bin', 'mpir.dll'), '.')\" && delvewheel repair -w {dest_dir} {wheel} --add-path ."
[tool.blackdoc]
# From https://numpydoc.readthedocs.io/en/latest/format.html
# Extended discussion: https://github.com/pyvista/pyvista/pull/4129
# The length of docstring lines should be kept to 75 characters to facilitate
# reading the docstrings in text terminals.
line-length = 75
[tool.pydocstyle]
match = '(?!coverage).*.py'
convention = "numpy"
add-ignore = ["D404"]
[tool.mypy]
ignore_missing_imports = true
disallow_any_generics = true
pretty = true
show_error_context = true
warn_unused_ignores = true
plugins = ['numpy.typing.mypy_plugin','npt_promote']
[tool.numpydoc_validation]
checks = [
"all", # all but the following:
"GL01", # Contradicts numpydoc examples
"GL02", # Permit a blank line after the end of our docstring
"GL03", # Considering enforcing
"GL06", # Found unknown section
"GL07", # "Sections are in the wrong order. Correct order is: {correct_sections}",
"GL09", # Deprecation warning should precede extended summary (check broken)
"SA01", # Not all docstrings need a see also
"SA04", # See also section does not need descriptions
"SS05", # Appears to be broken.
"ES01", # Not all docstrings need an extend summary.
"EX01", # Examples: Will eventually enforce
"YD01", # Yields: No plan to enforce
]
[tool.ruff]
exclude = [
'.git',
'__pycache__',
'build',
'dist',
]
line-length = 100
indent-width = 4
target-version = 'py38'
[tool.ruff.lint]
external = ["E131", "D102", "D105"]
ignore = [
# whitespace before ':'
"E203",
# line break before binary operator
# "W503",
# line length too long
"E501",
# do not assign a lambda expression, use a def
"E731",
# too many leading '#' for block comment
"E266",
# ambiguous variable name
"E741",
# module level import not at top of file
"E402",
# Quotes (temporary)
"Q0",
# bare excepts (temporary)
# "B001", "E722",
"E722",
# we already check black
# "BLK100",
# 'from module import *' used; unable to detect undefined names
"F403",
]
fixable = ["ALL"]
unfixable = []
extend-select = [
"B007",
"B010",
"C4",
"F",
"FLY",
"NPY",
"PGH004",
"PIE",
"PT",
"RSE",
"RUF005",
"RUF010",
"RUF100",
]