-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathpyproject.toml
More file actions
141 lines (131 loc) · 3.02 KB
/
pyproject.toml
File metadata and controls
141 lines (131 loc) · 3.02 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
[build-system]
requires = ["setuptools>=61.0", "setuptools-scm>=8.0"]
build-backend = "setuptools.build_meta"
[project]
name = "swiftgalaxy"
version="3.0.1"
authors = [
{ name="Kyle Oman", email="kyle.a.oman@durham.ac.uk" },
]
description="Code abstraction of objects (galaxies) in simulations."
readme = "README.rst"
requires-python = ">=3.11"
license = "GPL-3.0-or-later"
classifiers = [
"Programming Language :: Python :: 3",
"Operating System :: OS Independent",
]
dependencies = [
"numpy",
"scipy",
"unyt",
"swiftsimio>=12.0.0",
"requests",
]
[project.urls]
"Homepage" = "https://github.com/SWIFTSIM/swiftgalaxy"
"Bug Tracker" = "https://github.com/SWIFTSIM/swiftgalaxy/issues"
"Documentation" = "https://swiftgalaxy.readthedocs.io/en/latest"
[project.optional-dependencies]
# PyPI will reject any uploads with git dependencies
extra = [
"tqdm",
"astropy",
]
velociraptor = ["velociraptor"]
# caesar = ["caesar @ git+https://github.com/dnarayanan/caesar"]
# soap_write = ["soap @ git+https://github.com/SWIFTSIM/soap"]
all = [
"swiftgalaxy[extra,velociraptor]",
# "swiftgalaxy[caesar,soap_write]", # merge with above
]
testing = [
"pytest",
"pytest-xdist",
"pytest-cov",
"flake8",
"ruff",
"mypy",
"numpydoc",
"nbmake",
"sphinx-lint",
]
docs = [
"sphinx",
"sphinx-rtd-theme",
"sphinx-design",
"recommonmark",
]
dev = [
"swiftgalaxy[all,testing,docs]",
# swiftgalaxy[caesar,soap_write] # merge with above
]
[tool.ruff]
exclude = ["docs/source/conf.py"]
line-length = 88
indent-width = 4
target-version = "py310"
[tool.ruff.lint]
select = ["E4", "E7", "E9", "F", "D", "ANN"]
ignore = []
fixable = ["ALL"]
unfixable = []
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
[tool.ruff.lint.per-file-ignores]
"tests/test_*" = ["ANN"]
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
docstring-code-format = false # enable eventually
docstring-code-line-length = "dynamic"
# numpydoc_validation provides many useful rules that ruff does not yet.
# If ruff support for rules improves this can be phased out.
[tool.numpydoc_validation]
checks = [
"GL01",
"GL02",
"GL03",
"GL05",
"GL06",
"GL07",
"GL08",
"GL10",
"SS01",
"SS02",
"SS03",
"SS04",
"SS05",
"PR01",
"PR02",
"PR03",
"PR04",
"PR05",
"PR06",
"PR07",
"PR08",
"PR09",
"PR10",
"RT02",
"RT03",
"RT04",
"RT05",
"SA02",
"SA03",
"SS06",
]
# Don't document class __init__ methods, put the docstring on the class object.
exclude = ['\.__init__$', '\.test_']
[tool.mypy]
ignore_missing_imports = true
disallow_untyped_defs = true
modules = [
'swiftgalaxy.reader',
'swiftgalaxy.halo_catalogues',
'swiftgalaxy.masks',
'swiftgalaxy.iterator',
'swiftgalaxy.demo_data',
]