-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpyproject.toml
106 lines (88 loc) · 2.51 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
[project]
name = "SNAPRed"
description = "A desktop application for Lifecycle Managment of data collected from the SNAP instrument."
dynamic = ["version"]
requires-python = ">=3.10"
dependencies = [
"mantidworkbench >= 6.11.0.3rc2",
"pyoncat ~= 1.6"
]
readme = "README.md"
license = { text = "GPL3.0" }
[project.urls]
homepage = "https://github.com/neutrons/SNAPRed" # if no homepage, use repo url
repository = "https://github.com/neutrons/SNAPRed"
# documentation = add_url_to_readthedoc_here
issues = "https://github.com/neutrons/SNAPRed/issues"
[project.scripts]
snapred = "snapred.__main__:main"
[build-system]
requires = ["setuptools", "toml", "versioningit"]
build-backend = "setuptools.build_meta"
[tool.setuptools.packages.find]
where = ["src"]
exclude = ["tests*"]
[tool.setuptools.package-data]
"*" = ["*.ui", "*.txt","*.yml","*.yaml","*.qss"]
[tool.versioningit.vcs]
method = "git"
default-tag = "0.0.1"
[tool.versioningit.next-version]
method = "minor"
[tool.versioningit.format]
distance = "{next_version}.dev{distance}"
dirty = "{version}+d{build_date:%Y%m%d}"
distance-dirty = "{next_version}.dev{distance}+d{build_date:%Y%m%d%H%M}"
[tool.versioningit.write]
file = "src/snapred/_version.py"
[tool.pytest.ini_options]
pythonpath = [
"src"
]
markers = [
"integration: mark a test as an integration test",
"mount_snap: mark a test as using /SNS/SNAP/ data mount",
"golden_data(*, path=None, short_name=None, date=None): mark golden data to use with a test",
"datarepo: mark a test as using snapred-data repo",
"ui: mark a test as a UI test",
]
# The following will be overridden by the commandline option "-m integration"
addopts = "-m 'not (integration or datarepo)'"
[tool.ruff]
line-length = 120
# https://beta.ruff.rs/docs/rules/
select = ["A", "ARG", "BLE", "E", "F", "I", "PT"]
ignore = ["F403", "F405", # wild imports and unknown names
]
extend-exclude = ["conftest.py"]
[tool.mypy]
plugins = [
"pydantic.mypy"
]
ignore_missing_imports = true # gets around mantid imports
exclude = [
"tests/",
"src/snapred/backend/",
"src/snapred/meta/",
"src/snapred/ui/"
]
[tool.pydantic-mypy]
init_forbid_extra = true
init_typed = true
warn_required_dynamic_aliases = true
[tool.coverage.run]
source = ["src/snapred"]
omit = [
"*/tests/*",
"conda.recipe/*",
"docs/*",
"src/snapred/__init__.py",
"src/snapred/ui/*",
"src/snapred/backend/dao/*",
"src/snapred/_version.py",
]
[tool.coverage.report]
fail_under = 1
exclude_lines = [
'if __name__ == "__main__":'
]