-
Notifications
You must be signed in to change notification settings - Fork 3
/
pyproject.toml
197 lines (176 loc) · 4.39 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
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
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
[project]
name = "dysh"
description = ''
readme = "README.md"
requires-python = ">=3.10,<3.13"
license = {file = "LICENSE"}
keywords = []
dynamic = ["version"]
authors = [
{ name = "Marc Pound", email = "mpound@umd.edu" },
{ name = "Victoria Catlett", email = "vcatlett@nrao.edu" },
{ name = "Peter Teuben", email = "teuben@umd.edu" },
{ name = "Thomas Chamberlin", email = "tchamber@nrao.edu" },
{ name = "Pedro Salas", email = "psalas@nrao.edu" },
]
classifiers = [
"Development Status :: 3 - Alpha",
"Programming Language :: Python",
"Programming Language :: Python :: Implementation :: CPython",
]
dependencies = [
"astropy<6.1.0",
"ipython",
"jplephem",
"matplotlib",
"numpy",
"pandas",
"scipy",
"specutils",
"httpx",
"rich",
"tenacity",
]
[project.optional-dependencies]
dev = [
"coverage[toml]",
"pip-tools",
"pre-commit",
"ipdb",
"numpydoc",
"pytest",
"pytest-cov",
"myst_nb",
"sphinx",
"sphinx-autobuild",
"sphinx-inline-tabs",
"sphinx-book-theme",
"sphinx-design",
"sphinxcontrib-mermaid",
"nbformat",
"nbclient",
]
nb = [
"jupyter",
"jupyterlab",
]
all = ["dysh[dev,nb]"]
[project.urls]
Documentation = "https://github.com/GreenBankObservatory/dysh#readme"
Issues = "https://github.com/GreenBankObservatory/dysh/issues"
Source = "https://github.com/GreenBankObservatory/dysh"
[project.scripts]
fdr = "dysh.util.files:main_cli"
dysh = "dysh.shell:main"
dysh-lab = "dysh.shell.lab:main"
[tool.hatch.version]
path = "src/dysh/__init__.py"
[tool.hatch.envs.default]
# By default hatch will effectively do $ pip install dysh[all]
features = ["all"]
# run via: $ hatch run <script>
[tool.hatch.envs.default.scripts]
test = "pytest {args}"
lint = "ruff check . {args}"
lint-all = "ruff check --select ALL {args}"
lint-fix = "ruff check --select ALL --fix {args}"
docs = "sphinx-autobuild {root}/docs/source {root}/docs/build -b html {args}"
docs-build = "sphinx-build {root}/docs/source {root}/docs/build -b html {args}"
[tool.hatch.envs.test]
# run via: $ hatch run test:<script>
[tool.hatch.envs.test.scripts]
matrix = "pytest {args}"
cov = "pytest --cov-report=xml --cov-config=pyproject.toml --cov=src/dysh --cov=tests {args}"
# Run tests across all supported version of Python
[[tool.hatch.envs.test.matrix]]
python = ["310", "311", "312"]
[tool.hatch.build.targets.sdist]
include = ["/src", "/tests", "/bin"]
exclude = [
"/.github",
"/.gitignore",
"*.swp",
"/attic",
"/build",
"/benchmark",
"/docs",
"/dist",
"/notebooks",
]
[tool.hatch.build.targets.wheel]
packages = ["src/dysh"]
[tool.coverage.run]
branch = true
source = [
"src/"
]
parallel = true
omit = [
"src/dysh/__about__.py",
"*/tests/*",
"test_*.py"
]
[tool.coverage.report]
exclude_lines = [
"no cov",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]
[tool.isort]
# See: https://pycqa.github.io/isort/docs/configuration/options/#example-pyprojecttoml
profile = "black"
combine_as_imports = true
sections = [
"FUTURE",
"STDLIB",
"THIRDPARTY",
"FIRSTPARTY",
"LOCALFOLDER"
]
filter_files = true
[tool.black]
preview = true
line-length = 120
[tool.pyright]
reportImplicitStringConcatenation = false
[tool.ruff]
select = [
"F", # https://beta.ruff.rs/docs/rules/#pyflakes-f
"E", # https://beta.ruff.rs/docs/rules/#error-e
"W", # https://beta.ruff.rs/docs/rules/#warning-w
"B", # https://beta.ruff.rs/docs/rules/#flake8-bugbear-b
"I", # https://beta.ruff.rs/docs/rules/#isort-i
"NPY", # https://beta.ruff.rs/docs/rules/#numpy-specific-rules-npy
"PD", # https://beta.ruff.rs/docs/rules/#pandas-vet-pd
"RUF", # https://beta.ruff.rs/docs/rules/#ruff-specific-rules-ruf
]
fixable = ["ALL"]
unfixable = ["B"]
ignore = [
"E741", # ambiguous-variable-name
]
line-length = 120
src = ["src", "benchmark", "notebooks"]
[tool.ruff.per-file-ignores]
# Ignore in all `__init__.py` files
"__init__.py" = ["E402", "F405", "F403"]
"**/{tests,docs,tools}/*" = ["E402", "B011"]
# The stuff in the attic doesn't need to be linted at all
"attic/**" = ["ALL"]
[tool.pytest.ini_options]
minversion = "6.0"
testpaths = ["tests", "src", "docs"]
filterwarnings = [
"ignore::DeprecationWarning"
]
[tool.pip-tools]
src_files = ["pyproject.toml"]
extra = ["nb", "dev"]
resolver = "backtracking"
output_file= "requirements.txt"
no_strip_extras = true
quiet = true
no_emit_trusted_host = true
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"