-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathpyproject.toml
163 lines (150 loc) · 3.71 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
[build-system]
requires = ["setuptools>=45", "setuptools_scm[toml]>=6.2"]
build-backend = "setuptools.build_meta"
[project]
name = "21cmSense"
description = "Compute sensitivies of radio interferometers to the cosmic 21cm signal."
readme = "README.rst"
authors = [
{name="Jonathan Pober", email="[email protected]"},
{name="Steven Murray", email="[email protected]"},
{name="Matt Kolopanis", email="[email protected]"},
]
requires-python = ">=3.9"
# Add here all kinds of additional classifiers as defined under
# https://pypi.python.org/pypi?%3Aaction=list_classifiers
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Operating System :: POSIX",
"Operating System :: Unix",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: Implementation :: CPython",
]
dynamic = ['version']
# Add here dependencies of your project (semicolon/line-separated), e.g.
dependencies = [
"numpy<2.0", # Restriction can be lifted once pyuvdata is good with numpy 2
"scipy",
"future",
"click",
"tqdm",
"pyyaml",
"astropy>=5",
"methodtools",
"pyuvdata>=3.0.0",
"cached_property",
"rich",
"attrs",
"hickleable>=0.1.1",
]
[project.optional-dependencies]
docs = [
"sphinx>=1.3",
"sphinx-rtd-theme",
"numpydoc",
"nbsphinx",
"ipython",
]
test = [
"pre-commit",
"pytest",
"matplotlib",
"pytest-cov",
"pytest-xdist",
]
dev = [
"21cmSense[docs,test]",
"pre-commit",
"commitizen",
"ruff"
]
[project.scripts]
sense = "py21cmsense.cli:main"
[tool.setuptools_scm]
[tool.ruff]
line-length = 100
target-version = "py39"
[tool.ruff.lint]
extend-select = [
"UP", # pyupgrade
"E", # pycodestyle
"W", # pycodestyle warning
"C90", # mccabe complexity
"I", # isort
"N", # pep8-naming
"D", # docstyle
"B", # bugbear
"A", # builtins
"C4", # comprehensions
"DTZ", # datetime
"FA", # future annotations
"PIE", # flake8-pie
"T", # print statements
"PT", # pytest-style
"Q", # quotes
"SIM", # simplify
# "PTH", # use Pathlib
"ERA", # kill commented code
"NPY", # numpy-specific rules
"PERF", # performance
"RUF", # ruff-specific rules
]
ignore = [
"DTZ007", # use %z in strptime
"A003", # class attribute shadows python builtin
"B008", # function call in argument defaults
"N802", # TODO: remove this (function name should be lower-case)
"B019", # no using lru_cache on methods
"G004", # logging uses f-string
"D107", # no docstring in __init__
]
[tool.ruff.lint.per-file-ignores]
"tests/*.py" = [
"D103", # ignore missing docstring in tests
"DTZ", # ignore datetime in tests
"T", # print statements
]
"docs/conf.py" = [
"A", # conf.py can shadow builtins
"ERA",
]
"docs/*.ipynb" = [
"T", # print statements
]
[tool.ruff.lint.pydocstyle]
convention = 'numpy'
property-decorators = ['property', 'functools.cached_property']
[tool.ruff.lint.mccabe]
max-complexity = 15
[tool.pytest.ini_options]
# Options for py.test:
# Specify command line options as you would do when invoking py.test directly.
# e.g. --cov-report html (or xml) for html/xml output or --junitxml junit.xml
# in order to write a coverage file that can be read by Jenkins.
addopts = "--cov py21cmsense --cov-report term-missing --verbose"
norecursedirs = [
"dist",
"build",
".tox",
]
testpaths = "tests"
[tool.black]
line-length = 88
exclude = '''
/(
\.eggs
| \.git
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| _build
| buck-out
| build
| dist
)/
'''