-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
217 lines (188 loc) · 4.96 KB
/
Copy pathpyproject.toml
File metadata and controls
217 lines (188 loc) · 4.96 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
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
[build-system]
requires = ["setuptools>=61", "wheel", "setuptools_scm>=8.0", "numpy"]
build-backend = "setuptools.build_meta"
[tool.setuptools_scm]
[project]
name = "onepower"
description = "Python package for computing power spectra and one-point statistics using the halo model framework."
readme = "README.md"
authors = [
{name="Andrej Dvornik", email="andrej.dvornik@me.com"},
{name="Maria Cristina Fortuna", email="maricri.fortuna@gmail.com"},
{name="Marika Asgari", email="marika.asgari@newcastle.ac.uk"},
]
license = "MIT"
license-files = ["LICEN[CS]E*"]
requires-python = ">=3.12"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Science/Research",
"Operating System :: POSIX",
"Operating System :: Unix",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: Implementation :: CPython",
"Natural Language :: English",
"Topic :: Scientific/Engineering :: Physics",
"Topic :: Scientific/Engineering :: Astronomy",
]
dependencies = [
"hmf>=3.6.0",
"halomod>=2.2.3",
"numpy>=2.0",
"astropy>=6.0.0",
"scipy>=1.13.1",
"camb>=1.4.0",
"numexpr>=2.8.7",
"colossus>=1.3.5",
"hankel>=1.2.2",
"click",
"toml>=0.10.1",
"rich",
"pre-commit",
]
dynamic = ["version"]
[project.optional-dependencies]
bnl = [
"dark_emulator==1.1.2 ; python_version == '3.12'",
"scipy==1.13.1 ; python_version == '3.12'",
"bnl-not-supported-on-python-gt-3-12 ; python_version > '3.12'",
]
docs = [
"sphinx>=6.1.3",
"numpydoc>=0.8.0",
"nbsphinx",
"ipython",
"pandoc",
"sphinx_rtd_theme",
"pydata-sphinx-theme",
"importlib_metadata",
"ipykernel",
"docutils>=0.19",
]
tests = [
"coverage>=4.5.1",
"pytest>=3.5.1",
"pytest-cov>=2.5.1",
"pytest-plt",
"pytest-runner",
"PyYAML",
"mpmath>=1.0.0",
"numba",
]
dev = [
"onepower[docs,tests,bnl]"
]
all = [
"onepower[dev]"
]
[project.urls]
Homepage = "https://github.com/KiDS-WL/onepower"
Repository = "https://github.com/KiDS-WL/onepower.git"
Documentation = "https://kids-wl.github.io/onepower/"
Issues = "https://github.com/KiDS-WL/onepower/issues"
Changelog = "https://github.com/KiDS-WL/onepower/blob/main/CHANGELOG.rst"
[tool.cibuildwheel]
build = "cp313-*"
skip = "*-win32 *-manylinux_i686"
wheel-dir = "wheelhouse"
[tool.cibuildwheel.macos]
archs = ["universal2"]
[tool.cibuildwheel.ios]
archs = ["arm64", "simulator_arm64", "x86_64"]
[tool.pytest.ini_options]
addopts = "--cov onepower --cov-report term-missing --verbose"
norecursedirs = [
"dist",
"build",
".tox",
]
testpaths = "tests"
[tool.coverage.run]
source = ["onepower"]
omit = [
"tests/*",
"*site-packages/*",
"*hmf/*",
"*halomod/*"
]
[tool.coverage.report]
omit = [
"tests/*",
"*site-packages*",
"*hmf/*",
"*halomod/*"
]
[tool.ruff]
# Line length
line-length = 88
include = ["*.pyi", "*.py"]
# Exclude files/directories
exclude = [
"docs/*",
"legacy_input_files/*",
"benchmarks/*",
"cosmosis_modules/example_ini_files/*",
"cosmosis_modules/legacy/*",
"cosmosis_modules/pk_to_real/*",
"cosmosis_modules/defaults_dictionary.txt",
"cosmosis_modules/module.yaml",
]
# Per-file ignores
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["D", "T001", "T201", "B018"]
"docs/conf.py" = ["D", "A"]
"**/__init__.py" = ["F401"]
"cosmosis_modules/onepower_interface.py" = ["C901"]
[tool.ruff.format]
# Equivalent to Black's skip-string-normalization
quote-style = "single"
line-ending = "lf"
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.ruff.lint.mccabe]
max-complexity = 25
[tool.ruff.lint]
extend-select = [
"E", # pycodestyle
"W", # pycodestyle warning
"UP", # pyupgrade
"C90", # mccabe complexity
"B", # bugbear
"A", # builtins
"C4", # comprehensions
"DTZ", # datetime
"FA", # future annotations
"PIE", # flake8-pie
"T", # print statements
"SIM", # simplify
"PTH", # use Pathlib
"NPY", # numpy-specific rules
"PERF", # performance
]
# Ignore rules equivalent to flake8's ignore list
ignore = [
"E501", # Line too long
"E731", # Do not assign a lambda expression, use a def
"B008", # Do not perform function calls in argument defaults
"B023", # Function definition does not bind loop variable
]
# Import organization (Ruff's import sorting is enabled by default)
[tool.ruff.lint.isort]
known-first-party = ["onepower"]
# Import sections (Ruff uses a similar section order)
section-order = [
"future",
"standard-library",
"third-party",
"first-party",
"local-folder",
]
# Default section for imports (same as isort's default_section)
default-section = "first-party"
# Multi-line output style (3 = "Vertical Hanging Indent")
combine-as-imports = true
lines-after-imports = 2