-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathpyproject.toml
172 lines (162 loc) · 4.45 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
[build-system]
requires = ["setuptools>=30.3.0", "wheel", "setuptools_scm[toml]>=6.2,!=8.0"]
build-backend = "setuptools.build_meta"
[tool.setuptools_scm]
write_to = "hera_cal/_version.py"
parentdir_prefix_version = "hera_cal-"
fallback_version = "0.0.0"
[project]
name = "hera-calibration"
description = "A collection of calibration routines to run on the HERA instrument."
readme = "README.md"
authors = [
{name="HERA Team"},
]
license = {text="BSD"}
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"License :: OSI Approved",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Topic :: Scientific/Engineering :: Astronomy",
"Topic :: Scientific/Engineering :: Physics",
]
dynamic=["version"]
requires-python = ">=3.9"
dependencies = [
'numpy>=1.10',
"scipy>=1.9.0",
"h5py",
"hdf5plugin",
"astropy",
"astropy-healpix",
"pyuvdata>=3.1.3",
"linsolve",
"hera_qm>=2.2.0",
"scikit-learn",
"hera-filters",
"line_profiler",
"aipy",
"rich",
"jax",
"jaxlib",
"optax",
"attrs",
"frozendict",
"toml",
]
[project.optional-dependencies]
dev = [
"pytest",
"pre-commit",
"pytest-cov",
"hera_sim>=4.3.0",
"pytest-xdist",
"hypothesis",
"ruff",
]
[tool.setuptools]
script-files = [
"scripts/apply_cal.py",
"scripts/auto_reflection_run.py",
"scripts/baseline_chunker.py",
"scripts/chunk_files.py",
"scripts/delay_filter_run.py",
"scripts/extract_autos.py",
"scripts/extract_hh.py",
"scripts/flag_all.py",
"scripts/lstbin_run.py",
"scripts/lstbin_simple.py",
"scripts/model_calibration_run.py",
"scripts/multiply_gains.py",
"scripts/noise_from_autos.py",
"scripts/post_redcal_abscal_run.py",
"scripts/query_ex_ants.py",
"scripts/red_average.py",
"scripts/redcal_run.py",
"scripts/select_spw_ranges.py",
"scripts/smooth_cal_run.py",
"scripts/subselect.py",
"scripts/throw_away_flagged_antennas.py",
"scripts/time_average.py",
"scripts/time_chunk_from_baseline_chunks_run.py",
"scripts/tophat_frfilter_run.py",
"scripts/transfer_flags.py"
]
[tool.pytest]
addopts = "--ignore=scripts --cov=hera_cal --cov-config=.coveragerc"
[tool.pytest.ini_options]
filterwarnings = [
"ignore:Fixing auto-correlations to be be real-only:UserWarning",
'ignore:telescope_location is not set\. Using known values for HERA\.:UserWarning',
"ignore:invalid value encountered in divide:RuntimeWarning",
]
[tool.ruff]
line-length = 88
target-version = "py39"
[tool.ruff.lint]
select = [
"E",
"W",
"A", # builtins
# "ARG", # unused arguments
# "B", # bugbear
# "C4", # comprehensions
# "C90", # mccabe complexity
# "COM", # commas
# "D", # docstyle
# "DTZ", # datetime
# "F", # pyflakes
# "FA", # future annotations
# "FURB", # refurb
# "I", # isort
# "ISC", # implicit string concat
# "LOG", # logging
# "N", # pep8-naming
# "NPY", # numpy-specific rules
# "PERF", # performance
# "UP", # pyupgrade
# "PIE", # flake8-pie
# "PLC", # pylint
# "PLE", # pylint
# "PLR", # pylint
# "PLW", # pylint
# "PT", # pytest-style
# "PTH", # use pathlib
# "Q", # quotes
# "RSE", # flake8-raise
# "RUF", # ruff-specific rules
# "SIM", # flake8-simplify
# "TRY", # tryceratops
# "UP", # pyupgrade
]
exclude = [
"scripts/notebooks/*.ipynb", # For now, ignore notebooks when linting.
]
ignore = [
"E402",
"E501",
"W291",
"W293",
"A005", # module io shadows python stdlib
# Following Rulesets we really don't want
"AIR", # airflow - unused library
"ASYNC", # async -- unused library
"DJ", # django -- unused library
"EXE", # executable -- unused features
"G", # logging-format -- this linter gives bad advice a lot
"INT", # gettext -- unknown why we would use this
"PD", # unused library
"PGH", # pygrep hooks?
"PYI", # typing stuff
"S", # flake8-bandit -- security stuff that isn't really applicable
"SLOT", # slots stuff that isn't applicable atm
"TCH", # type-checking
"TD", # todo's
"TID", # tidy imports (should be done with isort)
"TRIO", # trio unused package
"YTT", # py2to3 stuff
]