-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpyproject.toml
More file actions
211 lines (180 loc) · 4.38 KB
/
Copy pathpyproject.toml
File metadata and controls
211 lines (180 loc) · 4.38 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
[project]
name = "synference"
version = "0.1.1"
description = "Simulation-based inference for SED-fitting of galaxy photometry and spectroscopy"
license = {file = "LICENSE.md"}
readme = "README.md"
# Project keywords
keywords =[
"galaxy",
"modelling",
"SED-fitting",
"simulation-based inference",
"smoothed particle hydrodynamics",
"particles",
"nbody",
"galaxy formation",
"parametric",
"theory",
"sph",
"cosmology",
"galaxy evolution",
"survey",
"space telescope",
"SED",
"sed",
"spectral energy distribution",
"stellar population",
"synthesis",
]
authors = [
{ name = "T. Harvey", email = "tharvey303@gmail.com" },
{name = "S. Newman", email = "sophie.newman@port.ac.uk" },
{name = "C. C. Lovell", email = "chris.lovell.astro@gmail.com" }
]
requires-python = ">=3.10"
# Classifiers
classifiers = [ # Optional
"Development Status :: 4 - Beta", # 3 Alpha/4 Beta/5 Production/Stable
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering :: Astronomy",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
# Supported Python versions
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3 :: Only",
]
dependencies = [
"torch",
"lampe",
"cosmos-synthesizer",
"scikit-learn",
"tarp",
"sbi>=0.22.0",
"h5py",
"optuna",
"tqdm",
"astropy",
"numpy",
"scipy",
"unyt",
"jax",
"simple_parsing",
"corner",
"plotext",
"matplotlib",
"numba",
]
[project.optional-dependencies]
# Development
dev = [
"ruff==0.11.7",
"pre-commit",
"nb-clean",
]
# Testing
test = [
"nbmake",
"pytest",
"ruff==0.11.7",
"mypy>=0.910",
]
# Documentation building
docs = [
"nbmake",
"sphinx==7.4.7",
"pandoc",
"furo",
"sphinx_autodoc_typehints",
"ipython",
"sphinx_gallery",
"pillow",
"sphinx-toolbox",
"nbsphinx",
"sphinx-copybutton",
"readthedocs-sphinx-search",
]
# Project urls
[project.urls]
"Homepage" = "https://github.com/synthesizer-project/synference"
"Bug Reports" = "https://github.com/synthesizer-project/synference/issues"
"Source" = "https://github.com/synthesizer-project/synference"
"Documentation" = "https://synthesizer-project.github.io/synference/"
# Entry points
[project.scripts]
synference-download-data="synference.utils:download_test_data"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.metadata]
allow-direct-references = true
[tool.hatch.build.targets.wheel]
packages=["src/synference"]
# Configure the linter and formatter
[tool.ruff]
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".ipynb_checkpoints",
".mypy_cache",
".nox",
".pants.d",
".pyenv",
".pytest_cache",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
".vscode",
"__pypackages__",
".DS_Store",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"site-packages",
"venv",
".pre-commit-config.yaml",
"*__init__.py" # ignore all init files
]
# PEP-8 line length
line-length = 100
indent-width = 4
# Assume Python 3.10 by default regardless
target-version = "py310"
[tool.ruff.lint]
select = ["F", "E", "W", "D"]
ignore = [
"E402", # "module level import not at top of file" (isolate C imports in case python alternatives exist)
"F811", # "redefinition of unused name from line N" (breaks quantity objects)
]
# Sort imports alphabetically
extend-select = ["I"]
# Allow fix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = []
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.per-file-ignores]
# For every .py under examples/, ignore all D-rules
"examples/**/*.py" = ["D"]
[tool.ruff.format]
# Like Black, use double quotes for strings.
quote-style = "double"
docstring-code-format = true
docstring-code-line-length = 20
# Like Black, indent with spaces, rather than tabs.
indent-style = "space"
# Like Black, respect magic trailing commas.
skip-magic-trailing-comma = false
# Like Black, automatically detect the appropriate line ending.
line-ending = "auto"