@@ -33,9 +33,7 @@ dependencies = [
3333test = [
3434 " pytest>=6.0" ,
3535]
36- viz = [
37- " matplotlib>=3.0" ,
38- ]
36+
3937all = [
4038 " mmu[test,viz]" ,
4139]
@@ -66,6 +64,129 @@ MMU_VENDOR_OPENMP = "OFF"
6664MMU_ENABLE_INTERNAL_TESTS = " OFF"
6765MMU_ENABLE_ARCH_FLAGS = " ON"
6866
67+ [tool .cibuildwheel ]
68+ archs = [" auto64" ]
69+ skip = [" *-win32" , " *-manylinux_i686" , " *-musllinux_x86_64" ]
70+ build = [" cp39-*" , " cp310-*" , " cp311-*" , " cp312-*" , " cp313-*" , " cp314-*" ]
71+
72+ # make sure to build generic wheels
73+ environment = {CMAKE_ARGS =" -DSDTN_ENABLE_ARCH_FLAGS=OFF -DSDTN_DISABLE_OPENMP=ON" }
74+
75+ # Run pytest to ensure that the package was correctly built
76+ test-command = " pytest {project}/tests"
77+ test-requires = " pytest"
78+ # Skip trying to test arm64 builds on Intel Macs
79+ test-skip = " *-macosx_arm64 *-macosx_universal2:arm64"
80+
81+ # Necessary to see build output from the actual compilation
82+ build-verbosity = 1
83+
84+ [tool .cibuildwheel .linux ]
85+ repair-wheel-command = " auditwheel repair -w {dest_dir} {wheel}"
86+
87+ [tool .cibuildwheel .macos ]
88+ archs = [" x86_64" , " arm64" ]
89+ # Needed for full C++17 support
90+ repair-wheel-command = " delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel} --exclude libomp.dylib"
91+
92+ [tool .cibuildwheel .windows ]
93+ before-build = " pip install delvewheel"
94+ repair-wheel-command = " delvewheel repair -w {dest_dir} {wheel}"
95+
96+ [tool .ruff ]
97+ extend-select = [
98+ " E" , # pyflakes `E`
99+ " W" , # pyflakes `W`
100+ " I" , # isort
101+ " TID" , # flake8-tidy-imports
102+ " UP" , # pyupgrade
103+ " D212" , # pydocstyle
104+ " D411" , # pydocstyle
105+ " C4" , # flake8-comprehensions
106+ " EM" , # flake8-errmsg
107+ " FA" , # flake8-future-annotations
108+ " INP" , # flake8-no-pep420
109+ " PIE" , # flake8-pie
110+ " RET" , # flake8-return
111+ " SIM" , # flake8-simplify
112+ " TCH" , # flake8-type-checking
113+ " TD002" , # flake8-todos
114+ " PL" , # pylint
115+ " PERF" , # perflint
116+ " FURB" , # refurb
117+ ]
118+ target-version = " py310"
119+ line-length = 120
120+ select = [
121+ # Enable Pyflakes `E`, `F` and `W` codes
122+ " F" ,
123+ # pytest
124+ " PT" ,
125+ # numpy
126+ " NPY" ,
127+ # import conventions
128+ " ICN" ,
129+ # prints
130+ " T20" ,
131+ # quotes
132+ " Q" ,
133+ # ruff-specific rules
134+ " RUF" ,
135+ # logging format
136+ " G" ,
137+ # pydocstyle
138+ " D" ,
139+ # annotation with autofix
140+ " ANN204" ,
141+ # error messages
142+ " EM" ,
143+ # raise
144+ " RSE" ,
145+ # flynt
146+ " FLY" ,
147+ ]
148+
149+ ignore = [
150+ " E501" , # line length
151+ " PLR0913" , # too many arguments
152+ " PLR2004" , # magic value
153+ " PLR0912" , # too many branches
154+ " PLR0915" , # too many statements
155+ " PLR0911" , # too many return statements
156+ " PLR6301" , # method could be function/staticmethod
157+ # Only lint existing docstrings
158+ " D100" ,
159+ " D101" ,
160+ " D102" ,
161+ " D103" ,
162+ " D104" ,
163+ " D105" ,
164+ " D106" ,
165+ " D107" ,
166+ # period not required
167+ " D400" ,
168+ " D415" ,
169+ # newline not required
170+ " D205" ,
171+ # address later
172+ " PLW2901" ,
173+ " PLC1901"
174+ ]
175+
176+ [tool .ruff .per-file-ignores ]
177+ "tests/*" = [" S101" , " PLR2004" , " CPY001" , " ANN001" ]
178+ "docs/sphinx/source/conf.py" = [" INP" , " CPY001" ]
179+ "example.py" = [" T201" , " CPY001" ]
180+
181+ [tool .ruff .pydocstyle ]
182+ convention = " google"
183+
184+ [tool .ruff .isort ]
185+ split-on-trailing-comma = false
186+
187+ [tool .ruff .format ]
188+ skip-magic-trailing-comma = true
189+
69190[tool .pytest .ini_options ]
70191minversion = " 6.0"
71192addopts = " -ra -q -vv"
0 commit comments