-
Notifications
You must be signed in to change notification settings - Fork 9
/
pyproject.toml
137 lines (125 loc) · 3.68 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
[build-system]
requires = ["setuptools>=64", "setuptools_scm[toml]>=8.0.1", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "nexgen"
version = "0.9.10"
description = "Next Generation Nexus Generator"
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Natural Language :: English",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
keywords = ["nexus", "NXmx"]
dependencies = [
"freephil",
"h5py",
"hdf5plugin>=4.0.1",
"numpy",
"pint",
"importlib_resources>=1.1",
"scanspec",
"dataclasses-json",
"pydantic",
"flexparser==0.3.1", # See https://github.com/DiamondLightSource/nexgen/issues/309
]
license.file = "LICENSE"
readme = "README.rst"
requires-python = ">=3.10"
[project.optional-dependencies]
dev = [
"black",
"ruff",
"pytest",
"pytest-cov",
"pytest-random-order",
"sphinx-autobuild",
"sphinx-rtd-theme",
"autodoc_pydantic", # Needed for pydantic docs
"bump-my-version",
"ipython",
"mockito",
"pre-commit",
"pipdeptree",
"mypy",
"tox",
"wheel",
"build",
"types-mock",
]
[project.urls]
GitHub = "https://github.com/DiamondLightSource/nexgen"
Documentation = "https://nexgen.readthedocs.io/"
Bug-Tracker = "https://github.com/DiamondLightSource/nexgen/issues"
[[project.authors]]
email = "[email protected]"
name = "Diamond Light Source - Scientific Software"
[project.scripts]
nexgen = "nexgen.__main__:main"
generate_nexus = "nexgen.command_line.nexus_generator:main"
copy_nexus = "nexgen.command_line.copy_nexus:main"
nexgen_phil = "nexgen.command_line.phil_files_cli:main"
I19_nexus = "nexgen.command_line.I19_2_cli:main"
ED_nexus = "nexgen.command_line.ED_nexus:main"
ED_mrc_to_nexus = "nexgen.command_line.ED_mrc_to_nexus:main"
SSX_nexus = "nexgen.command_line.SSX_cli:main"
compare_pcap = "nexgen.command_line.compare_pcap:main"
[tool.setuptools.packages.find]
where = ["src"]
[tool.ruff]
src = ["src", "tests"]
line-length = 88
lint.extend-ignore = [
"E501", # Line too long
"F811", # support typing.overload decorator
"E203",
"E266",
"E402",
"E741",
]
lint.select = [
"C4", # flake8-comprehensions - https://beta.ruff.rs/docs/rules/#flake8-comprehensions-c4
"E", # pycodestyle errors - https://beta.ruff.rs/docs/rules/#error-e
"F", # pyflakes rules - https://beta.ruff.rs/docs/rules/#pyflakes-f
"W", # pycodestyle warnings - https://beta.ruff.rs/docs/rules/#warning-w
"I001", # isort
]
[tool.mypy]
plugins = ["pydantic.mypy"]
ignore_missing_imports = true # Ignore missing stubs in imported modules
[tool.pytest.ini_options]
addopts = """
-ra
--cov=src/nexgen --cov-report term --cov-report xml:cov.xml --cov-branch
"""
junit_family = "xunit2"
testpaths = "src tests"
[tool.coverage.paths]
# Tests are run from installed location, map back to the src directory
source = ["src", "**/site-packages/"]
# tox must currently be configured via an embedded ini string
# See: https://github.com/tox-dev/tox/issues/999
[tool.tox]
legacy_tox_ini = """
[tox]
skipsdist=True
[testenv:{pre-commit,mypy,pytest,docs}]
# Don't create a virtualenv for the command, requires tox-direct plugin
direct = True
passenv = *
allowlist_externals =
pytest
pre-commit
mypy
sphinx-build
sphinx-autobuild
commands =
pytest: pytest {posargs}
mypy: mypy src tests --ignore-missing-imports --no-strict-optional {posargs}
pre-commit: pre-commit run --all-files {posargs}
docs: sphinx-{posargs:build -EW --keep-going} -T docs build/html
"""