-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
137 lines (123 loc) · 4.94 KB
/
Copy pathpyproject.toml
File metadata and controls
137 lines (123 loc) · 4.94 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
[build-system]
requires = ["setuptools>=61", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "pyTomoAO"
description = "An open-source tool for tomographic reconstruction for AO systems"
readme = "README.md"
license = { text = "MIT" }
requires-python = ">=3.9"
authors = [
{ name = "Jacob Taylor", email = "jacobataylor7@gmail.com" },
{ name = "Uriel Conod", email = "urielconod@phas.ubc.ca" },
]
keywords = ["adaptive optics", "tomography", "wavefront reconstruction", "astronomy"]
classifiers = [
# Keep in sync with requires-python and the CI matrix in .github/workflows/test.yml.
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Topic :: Scientific/Engineering :: Astronomy",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
# Runtime dependencies only. Test and documentation tooling lives in the optional
# dependencies below so that installing pyTomoAO does not drag them in. matplotlib is
# deliberately absent: it is needed only by the visualisation helpers, and it is a heavy
# thing to force on a machine that only builds reconstructors. See the "plot" extra.
dependencies = ["numpy", "numba", "scipy", "PyYAML"]
dynamic = ["version"]
[project.urls]
Documentation = "https://keckobservatory.github.io/pyTomoAO/"
Source = "https://github.com/KeckObservatory/pyTomoAO"
Issues = "https://github.com/KeckObservatory/pyTomoAO/issues"
Changelog = "https://github.com/KeckObservatory/pyTomoAO/blob/main/CHANGELOG.md"
[project.optional-dependencies]
# Needed only by the visualisation helpers; see the note on dependencies above.
plot = ["matplotlib"]
# CUDA 12 build of CuPy. On CUDA 11 install cupy-cuda11x instead; pyTomoAO uses whichever
# is importable.
gpu = ["cupy-cuda12x"]
# Keep in sync with docs/requirements.txt.
docs = [
"sphinx>=7.2,<9",
"furo>=2024.1.29",
"myst-parser>=2.0",
"sphinx-autodoc-typehints>=2.0",
"sphinx-copybutton>=0.5.2",
"sphinx-design>=0.5",
"sphinxcontrib-mermaid>=0.9",
]
# Keep the ruff pin in sync with .github/workflows/code-health.yml.
dev = [
"ruff==0.15.5",
"pytest",
"pytest-cov",
# The plotting helpers are covered by the suite, so the dev environment needs
# matplotlib even though the runtime does not.
"matplotlib",
]
[tool.setuptools]
packages = ["pyTomoAO"]
[tool.setuptools.package-data]
# The reference YAML configurations ship inside the package so that `pip install pyTomoAO`
# is enough to run the documented examples; see pyTomoAO.example_config.
pyTomoAO = ["data/*.yaml"]
[tool.setuptools.dynamic]
version = { attr = "pyTomoAO.__version__" }
[tool.ruff]
line-length = 100
target-version = "py39"
# sandbox/ holds exploratory scripts that are deliberately not packaged or tested;
# linting them would gate real work on throwaway code.
extend-exclude = ["sandbox", "docs/build", "docs/source/api/generated"]
[tool.ruff.lint]
select = [
"F", # pyflakes: undefined names, unused imports and variables
"E", # pycodestyle errors
"W", # pycodestyle warnings
"I", # isort: import ordering
"UP", # pyupgrade: modern syntax
"B", # flake8-bugbear: likely bugs
"C4", # flake8-comprehensions
"PIE", # flake8-pie: misc lints
"RET", # flake8-return
"SIM", # flake8-simplify
"ARG", # flake8-unused-arguments
"PL", # pylint
"RUF", # ruff-specific rules
]
ignore = [
# Naming (pep8-naming, "N") is deliberately not enabled. This codebase is a
# translation of MATLAB adaptive-optics code: class names such as
# `tomographicReconstructor` are public API, and matrix names such as `Gamma`,
# `Cxx` and `R` match the equations they implement. Renaming them would break
# user scripts and make the maths harder to follow.
# Numerical code is full of meaningful constants (2, 5/6, 1e-15).
"PLR2004",
# The reconstruction kernels legitimately take many parameter objects and are
# long, linear numerical routines. Splitting them for a lint rule would hurt
# readability more than it helps.
"PLR0912", # too many branches
"PLR0913", # too many arguments
"PLR0915", # too many statements
# tomographicReconstructor imports the CPU or GPU kernels inside a try block at
# module scope, and a few helpers import lazily on purpose.
"PLC0415",
# The CUDA backend is selected through a module-level flag.
"PLW0603",
]
[tool.ruff.lint.per-file-ignores]
# Tests and benchmarks: unused arguments are common in fixtures, and asserting on
# hard-coded expected values is the point.
"tests/*" = ["ARG"]
"examples/*" = ["ARG", "T20"]
[tool.ruff.lint.isort]
known-first-party = ["pyTomoAO"]
[tool.ruff.format]
docstring-code-format = true