-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathpyproject.toml
More file actions
175 lines (156 loc) · 4.89 KB
/
pyproject.toml
File metadata and controls
175 lines (156 loc) · 4.89 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
[project]
name = "bliss-toolkit"
version = "0.4.2"
description = "Bayesian Light Source Separator"
readme = "README.md"
requires-python = ">=3.12"
license = {text = "MIT"}
authors = [
{name = "BLISS developers"}
]
keywords = ["cosmology", "blending", "weak lensing", "bayesian", "ml", "pytorch"]
dependencies = [
"torch>=2.7.0",
"torchvision>=0.22.0",
"numpy>=1.18.5",
"scipy>=1.4.1",
"matplotlib>=3.3.3",
"requests>=2.31.0",
"torchmetrics>=1.4.0.post0",
"lightning[extra]>=2.3.3",
"einops>=0.8.0",
"hydra-core>=1.0.4",
"astropy>=6.1.1",
"galsim>=2.4.10",
"reproject>=0.11.0",
"pyvo>=1.4.1",
"colossus>=1.3.5",
"lsstdesc-gcr-catalogs>=1.10.1",
"anacal>=0.7.3",
"pyccl>=3.2.1",
"treecorr>=5.1.2",
"camb>=1.6.5",
]
[[tool.uv.index]]
name = "pytorch-cu128"
url = "https://download.pytorch.org/whl/cu128"
explicit = true
[tool.uv.sources]
torch = [{index = "pytorch-cu128"}]
torchvision = [{index = "pytorch-cu128"}]
[project.optional-dependencies]
dev = [
"Sphinx>=4.0.2",
"git-lfs>=1.6",
"ipykernel>=6.29.5",
"jupyter>=1.0.0",
"nbstripout>=0.5.0",
"plotly>=4.14.3",
"pre-commit>=2.9.2",
"pre-commit-hooks>=4.4.0",
"pytest-cov>=2.10",
"ruff>=0.8.0",
"sphinx-rtd-theme>=0.5.2",
"tqdm>=4.62.3",
"nbsphinx>=0.9.2",
"pypandoc>=1.11",
"scikit-learn>=0.24.2",
"seaborn>=0.13.0",
"pyarrow>=15.0.0",
"healpy>=1.16.6",
"h5py>=3.11.0",
"pytest>=8.2.2",
"pytest-xdist>=3.5.0",
"tensorboard>=2.20.0",
]
[project.scripts]
bliss = "bliss.main:main"
[project.urls]
Documentation = "https://prob-ml.github.io/bliss/"
Repository = "https://github.com/prob-ml/bliss"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["bliss"]
[tool.pytest.ini_options]
addopts = "-ra -v -n auto"
markers = [
"run_first: mark test to run first for parallel test scheduling",
]
filterwarnings = [
"ignore:numpy.core.* is deprecated:DeprecationWarning",
"ignore:.*does not have many workers which may be a bottleneck.*:UserWarning",
"ignore:GPU available but not used.*:UserWarning",
"ignore:numpy.ndarray size changed:RuntimeWarning",
"ignore:.*when logging on epoch level in distributed setting.*",
"ignore:.*pkg_resources.declare_namespace.*:DeprecationWarning",
"ignore:.*distutils Version classes are deprecated.*:DeprecationWarning",
"ignore:.*Total length of `DataLoader` across ranks is zero.*:UserWarning",
"ignore:.*Total length of `CombinedLoader` across ranks is zero.*:UserWarning",
"ignore:.*Detected call of `lr_scheduler.step()` before `optimizer.step()`.*:UserWarning",
"ignore:.*AMP with fp16 is not supported on CPU.*:UserWarning",
"ignore:.*This process.*is multi-threaded, use of fork.*may lead to deadlocks.*:DeprecationWarning",
]
minversion = "6.0"
testpaths = [
"tests",
]
[tool.ruff]
line-length = 100
target-version = "py312"
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # Pyflakes
"I", # isort
"N", # pep8-naming
"D", # pydocstyle
"S", # flake8-bandit (security)
"B", # flake8-bugbear
"A", # flake8-builtins
"C4", # flake8-comprehensions
"SIM", # flake8-simplify
"PL", # Pylint
"RUF", # Ruff-specific rules
]
ignore = [
# === Docstring Rules ===
"D100", "D101", "D102", "D103", "D104", "D105", "D106", "D107",
# === Security Rules ===
"S101", # Use of assert (useful for testing/development)
"E731", # Lambda assignment
# === Naming Conventions ===
"N812", # Lowercase imported as non-lowercase (e.g., import F)
"N817", # CamelCase imported as acronym
# === Pylint Rules ===
"PLR0913", # Too many arguments
"PLR0914", # Too many local variables
"PLR0915", # Too many statements
"PLR0912", # Too many branches
"PLR0911", # Too many return statements
"PLR0917", # Too many positional arguments
"PLR2004", # Magic value comparison
"PLR0904", # Too many public methods
"PLW0603", # Global statement
"PLC0415", # Import outside top-level
# === Complexity ===
"C901", # Function too complex
# === Ruff-specific ===
"RUF012", # Mutable class attributes (common in dataclass-like patterns)
"RUF013", # Implicit Optional (common pattern, not enforced before)
]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["S101", "PLR2004", "D"]
"conftest.py" = ["D"]
"__init__.py" = ["D104"]
"case_studies/*" = ["D", "E501", "N803", "N806", "B006", "B007", "B028", "B905", "PLW2901", "RUF012", "RUF013", "S301", "S311"]
"*.ipynb" = ["E501", "N803", "N806", "B006", "B007", "B905", "E402", "F821", "RUF012", "RUF013"]