-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathpyproject.toml
134 lines (120 loc) · 3.62 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
[build-system]
requires = ["hatchling", "hatch-vcs", "setuptools_scm"]
build-backend = "hatchling.build"
[project]
name = "blop"
description = "Beamline optimization with machine learning"
readme = { file = "README.rst", content-type = "text/x-rst" }
authors = [
{ name = "Brookhaven National Laboratory", email = "[email protected]" },
]
maintainers = [
{ name = "Brookhaven National Laboratory", email = "[email protected]" },
]
requires-python = ">=3.9"
dependencies = [
"area-detector-handlers",
"bluesky",
"botorch",
"databroker",
"gpytorch",
"h5py",
"matplotlib",
"numpy",
"ophyd",
"ortools",
"scipy",
"tables",
"torch",
"tiled",
]
classifiers = [
"Development Status :: 4 - Beta",
"License :: OSI Approved :: BSD License",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Scientific/Engineering :: Physics",
]
dynamic = ["version"]
[project.optional-dependencies]
sirepo = ["sirepo-bluesky"]
napari = ["napari"]
gui = ["nicegui"]
pre-commit = [
"ruff",
"import-linter",
"nbstripout",
]
adaptive = ["bluesky-adaptive"]
dev = [
"pytest-codecov",
"coverage",
"furo",
"nbstripout",
"pre-commit",
"pre-commit-hooks",
"pytest",
"sphinx",
"twine",
"ipython",
"jupyter",
"matplotlib",
"nbsphinx",
"numpydoc",
"pandoc",
"sphinx-copybutton",
"sphinx_rtd_theme",
"ruff",
"import-linter",
"pandas-stubs",
"types-PyYAML",
"mypy",
]
[project.urls]
Homepage = "https://github.com/NSLS-II/blop"
Documentation = "https://nsls-ii.github.io/blop"
"Bug Reports" = "https://github.com/NSLS-II/blop/issues"
[tool.hatch.build.targets.wheel]
only-include = ["src/blop"]
[tool.hatch.build.targets.wheel.sources]
"src" = ""
[tool.setuptools_scm]
version_file = "src/blop/_version.py"
[tool.hatch]
version.source = "vcs"
build.hooks.vcs.version-file = "src/blop/_version.py"
[tool.hatch.version.raw-options]
local_scheme = "no-local-version"
[tool.ruff]
src = ["src", "examples", "docs/source/tutorials"]
line-length = 125
lint.select = [
"B", # flake8-bugbear - https://docs.astral.sh/ruff/rules/#flake8-bugbear-b
"C4", # flake8-comprehensions - https://docs.astral.sh/ruff/rules/#flake8-comprehensions-c4
"E", # pycodestyle errors - https://docs.astral.sh/ruff/rules/#error-e
"F", # pyflakes rules - https://docs.astral.sh/ruff/rules/#pyflakes-f
"W", # pycodestyle warnings - https://docs.astral.sh/ruff/rules/#warning-w
"I", # isort - https://docs.astral.sh/ruff/rules/#isort-i
"UP", # pyupgrade - https://docs.astral.sh/ruff/rules/#pyupgrade-up
"SLF", # self - https://docs.astral.sh/ruff/settings/#lintflake8-self
"PLC2701", # private import - https://docs.astral.sh/ruff/rules/import-private-name/
"LOG015", # root logger call - https://docs.astral.sh/ruff/rules/root-logger-call/
"S101", # assert - https://docs.astral.sh/ruff/rules/assert/
"D", # docstring - https://docs.astral.sh/ruff/rules/#pydocstyle-d
]
lint.ignore = [
"D", # TODO: Add docstrings, then enforce these errors
"SLF001", # TODO: Fix private member access, https://github.com/NSLS-II/blop/issues/94
]
lint.preview = true # so that preview mode PLC2701, and LOG015 is enabled
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.per-file-ignores]
"src/blop/tests/**/*" = ["S101", "SLF001", "D"]
# Ignore F821: undefined name '...' since the ipython profiles are dynamically loaded into the namespace
"docs/**/*" = ["F821"]
"examples/**/*" = ["F821"]
[tool.importlinter]
root_package = "blop"