-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpyproject.toml
More file actions
180 lines (154 loc) · 4.81 KB
/
Copy pathpyproject.toml
File metadata and controls
180 lines (154 loc) · 4.81 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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
[build-system]
# requires = ["setuptools>=61.0", "wheel"]
# build-backend = "setuptools.build_meta"
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
[project]
name = "pytribeam"
# version = "0.0.2" # Deprecated static version, now determined by VCS
dynamic = ["version"] # Removed static version, now determined by VCS
description = "automated data collection on TriBeam tools"
requires-python = ">=3.8.12, <=3.11.14"
readme = "README.md"
authors = [
{ name="Andrew Polonsky", email="apolon@sandia.gov" },
{ name="Chad Hovey", email="chovey@sandia.gov" },
{ name="James Lamb", email="jdlamb@sandia.gov" },
]
dependencies = [
"pytz",
"schema",
]
[project.optional-dependencies]
dev = [
"h5py",
"numpy",
"pyyaml",
"pillow",
"pdoc",
"pylint",
"pytest",
"pytest-cov",
"anybadge",
"pylint",
"pylint-exit",
"interrogate",
"requests",
"ruff",
"coverage==7.5.1",
]
# pdoc configuration
# we only build pdoc on the source code, so we can ignore the tests and GUI for doc coverage
# [docstr-coverage]
# ignore = [
# "tests/",
# "src/pytribeam/GUI/",
# ]
# CLI Entry Points
# https://setuptools.pypa.io/en/latest/userguide/entry_point.html
[project.scripts]
pytribeam="pytribeam.command_line:pytribeam"
pytribeam_info ="pytribeam.command_line:module_info"
pytribeam_gui="pytribeam.command_line:launch_gui"
pytribeam_exp="pytribeam.command_line:run_experiment"
[project.urls]
documentation = "https://sandialabs.github.io/pytribeam/docs/userguide/book/index.html"
repository = "https://github.com/sandialabs/pytribeam"
# ----------------------
# Hatch Configuration
# ----------------------
[tool.hatch.version]
source = "vcs"
[tool.hatch.version.raw-options]
local_scheme = "no-local-version" # Ensures clean versions like 0.0.9 instead of 0.0.9+g1234567
[tool.hatch.build.targets.wheel]
packages = ["src/pytribeam"]
[tool.hatch.build.hooks.vcs]
version-file = "src/pytribeam/_version.py" # File to be generated when compiled
# By creating the _version.py file, pytrieam can access its own version number at
# runtime (typically from ._version import __version__) without needing to query
# the Git repo or metadata present on the user's system.
# ----------------------
# Ruff Configuration
# ----------------------
[tool.ruff]
line-length = 88
# _version.py is auto-generated by setuptools-scm on every build and cannot be
# kept ruff-compliant across builds, so it is excluded from all ruff checks.
extend-exclude = ["src/pytribeam/_version.py"]
[tool.ruff.format]
# Repeat the exclusion here — ruff's format subcommand uses its own exclude list
# independently of the top-level [tool.ruff] exclude in some versions.
exclude = ["src/pytribeam/_version.py"]
# ----------------------
# Pytest Configuration
# ----------------------
[tool.pytest.ini_options]
python_files = ["test_*.py", "*_test.py"]
testpaths = ["tests"]
pythonpath = ["src"]
addopts = "--cov=src/pytribeam --cov-report=term-missing -rs"
markers = [
"detached: test is always runnable and does not require AutoScript or hardware",
"simulated: test requires a simulated/offline microscope system",
"hardware: test requires a physical hardware system",
"laser_hardware: test requires a physical hardware system with laser support",
]
# ----------------------
# Coverage Configuration
# ----------------------
[tool.coverage.run] # Coverage is used for test coverage reports
branch = true
relative_files = true
source = [
"src",
]
omit = [
"src/pytribeam/GUI/*",
"src/pytribeam/_version.py",
"src/pytribeam/doc_examples.py",
]
[tool.coverage.paths]
pytribeam = [
"src/pytribeam",
]
[tool.coverage.report] # Coverage is used for test coverage reports
show_missing = true # Show which lines were not covered
exclude_lines = [
"pragma: no cover",
"if __name__ == .__main__.:",
"raise NotImplementedError",
]
[tool.coverage.html]
directory = "coverage_reports/combined/htmlcov"
[tool.coverage.xml]
output = "coverage_reports/combined/coverage.xml"
# -------------------------
# Interrogate Configuration
# -------------------------
[tool.interrogate] # interrogate is used for docstring coverage
fail-under = 0
exclude = ["src/pytribeam/GUI"]
ignore-init-method = true
ignore-init-module = false
ignore-magic = true
ignore-nested-functions = true
ignore-nested-classes = true
ignore-private = false
ignore-semiprivate = false
ignore-module = false
ignore-property-decorators = false
quiet = false
verbose = 2
# ----------------------
# Local CI Configuration
# ----------------------
[tool.pytribeam.local_ci] # Controls a few parameters used in the local CI workfow
package_name = "pytribeam"
src_dir = "src/pytribeam"
docs_api_dir = "docs/api"
coverage_dir = "coverage_reports"
badges_dir = "badges"
logs_dir = "logs"
userguide_badge_label = "userguide"
userguide_badge_value = "\U0001f4da"