forked from aglavic/quicknxs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
124 lines (107 loc) · 4.15 KB
/
pyproject.toml
File metadata and controls
124 lines (107 loc) · 4.15 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
[project]
name = "quicknxs-v1"
description = "QuickNXS v1 - Magnetism Reflectometer data reduction"
dynamic = ["version"]
requires-python = ">=3.10,<3.13"
[tool.versioningit.vcs]
method = "git"
default-tag = "1.0.0"
[tool.versioningit.next-version]
method = "minor"
[tool.versioningit.format]
distance = "{next_version}.dev{distance}"
dirty = "{version}"
distance-dirty = "{next_version}.dev{distance}"
[tool.versioningit.write]
file = "quicknxs/_version.py"
[build-system]
build-backend = "setuptools.build_meta"
requires = ["setuptools>=68.0", "versioningit"]
[tool.setuptools.packages.find]
where = ["."]
include = ["quicknxs*"]
[tool.pixi.workspace]
platforms = ["linux-64"]
channels = ["conda-forge"]
[tool.pixi.dependencies]
python = ">=3.10,<3.13"
pyqt = ">=5.15,<6"
qtpy = "*"
numpy = "*"
matplotlib = ">=3.8"
h5py = "*"
scipy = "*"
configobj = ">=5.0"
ipython = ">=8"
qtconsole = ">=5"
ipykernel = "*"
[tool.pixi.pypi-dependencies]
quicknxs-v1 = { path = ".", editable = true }
[tool.pixi.feature.test.dependencies]
pytest = ">=8"
pytest-cov = "*"
pytest-qt = ">=4.4.0"
pytest-timeout = ">=2.3"
pytest-xvfb = ">=3.1.1"
[tool.pixi.feature.dev.dependencies]
ruff = "*"
[tool.pixi.environments]
default = { features = ["dev", "test"], solve-group = "default" }
[tool.pixi.tasks]
show-version = { cmd = "python -m versioningit", description = "Show the current computed version" }
test = { cmd = "pytest", description = "Run the test suite" }
test-core = { cmd = "pytest tests/qreduce_test.py tests/qcalc_test.py tests/qio_test.py -v", description = "Run non-GUI tests" }
test-gui = { cmd = "pytest tests/main_gui_test.py -v", description = "Run GUI tests" }
test-db = { cmd = "pytest tests/database_test.py -v", description = "Run database tests" }
[tool.pytest.ini_options]
testpaths = ["tests/"]
python_files = ["*_test.py"]
timeout = 90
timeout_method = "signal"
filterwarnings = [
# Treat all warnings as errors so future code cannot introduce new warnings silently.
"error",
# numpy exposes a `test` attribute (a PytestTester object, not a function); pytest
# tries to collect it during module scanning and emits this harmless false-positive.
"ignore::pytest.PytestCollectionWarning",
# ipykernel 7.x warns that its own InProcessKernel.do_history is not async.
# This is an upstream bug in ipykernel itself; it is not actionable from our code.
"ignore::PendingDeprecationWarning:ipykernel",
]
[tool.ruff]
line-length = 120
[tool.ruff.lint]
select = ["E", "F", "W"]
[tool.ruff.lint.per-file-ignores]
# Qt Designer auto-generated UI files — E402 because Qt pattern places imports
# at the bottom of the file (after the Ui_ class body), E501 for long generated lines.
"quicknxs/icons_rc.py" = ["E501"]
"quicknxs/default_interface.py" = ["E501", "E402"]
"quicknxs/docked_interface.py" = ["E501", "E402"]
"quicknxs/background_dialog.py" = ["E402", "E501"]
"quicknxs/compare_widget.py" = ["E402"]
"quicknxs/database_widget.py" = ["E402"]
"quicknxs/gisans_dialog.py" = ["E402"]
"quicknxs/nxs_widget.py" = ["E402"]
"quicknxs/plot_dialog.py" = ["E402"]
"quicknxs/point_picker_dialog.py" = ["E402"]
"quicknxs/polarization_dialog.py" = ["E402"]
"quicknxs/rawcompare_dialog.py" = ["E402"]
"quicknxs/reduce_dialog.py" = ["E402"]
"quicknxs/smooth_dialog.py" = ["E402"]
# Data format template file — long lines are intentional column-aligned file headers.
"quicknxs/config/output_templates.py" = ["E501"]
# Third-party embedded libraries (should not be modified).
"quicknxs/mpfit.py" = ["E501", "E402", "E741", "E722", "E721", "E701", "E702", "F841", "W293", "W291"]
"quicknxs/buzhug/__init__.py" = ["F403", "F405"]
"quicknxs/buzhug/buzhug.py" = ["F403", "F405", "E722", "E741"]
"quicknxs/buzhug/buzhug_files.py" = ["E402"]
# Scientific modules that use `from numpy import *` — a common numpy idiom
# for interactive/computation code. Refactoring to `import numpy as np`
# throughout these large files is deferred; suppress the star-import warnings.
"quicknxs/compare_plots.py" = ["F403", "F405"]
"quicknxs/database.py" = ["F403", "F405"]
"quicknxs/genx_data.py" = ["F403", "F405"]
"quicknxs/qcalc.py" = ["F403", "F405"]
"quicknxs/qreduce.py" = ["F403", "F405"]
"quicknxs/rawcompare_plots.py" = ["F403", "F405"]