-
Notifications
You must be signed in to change notification settings - Fork 2
/
pyproject.toml
181 lines (154 loc) · 4.1 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
173
174
175
176
177
178
179
180
181
[project]
name = "stream_mapper.pytorch"
version = "0.1.0"
description = "Stream ML pytorch extension."
readme = "README.rst"
requires-python = ">=3.10"
license = {file = "LICENSE"}
keywords = ["numpy", "interoperability"]
authors = [
{name = "Nathaniel Starkman", email = "[email protected]"},
{name = "Jacob Nibauer", email = "[email protected]"}
]
maintainers = [
{name = "Nathaniel Starkman", email = "[email protected]"},
{name = "Jacob Nibauer", email = "[email protected]"}
]
classifiers = [
"Intended Audience :: Science/Research",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
]
dependencies = [
"scipy>=1.7",
"stream_mapper.core @ git+https://github.com/GalOrrery/stream_mapper-core.git",
"torch>=1.13",
]
[project.optional-dependencies]
all = [
"tqdm",
"nflows",
"zuko",
]
test = [
"coverage[toml]",
"numpy>=1.18",
"pytest",
"pytest-astropy",
"typing_extensions>=4.4",
]
docs = [
"graphviz",
"IPython",
"jupyter_client",
"nbsphinx",
"pydata-sphinx-theme",
"sphinx",
"sphinx-astropy",
"sphinxcontrib.bibtex < 3.0.0",
"tomlkit",
]
[project.urls]
homepage = "https://github.com/nstarman/stream_mapper-pytorch"
repository = "https://github.com/nstarman/stream_mapper-pytorch"
documentation = "https://github.com/nstarman/stream_mapper-pytorch"
[build-system]
requires = [
"mypy>=0.971",
"numpy>=1.21",
"setuptools>=45.0",
"setuptools_scm[toml]>=6.3.1",
"wheel",
]
build-backend = 'setuptools.build_meta'
[tool.setuptools]
[tool.setuptools.packages.find]
where = ["src"]
[tool.setuptools.package-data]
"*" = ["py.typed"]
[tool.coverage.run]
omit = [
"tests/*",
"*setup_package*",
]
[tool.coverage.report]
exclude_lines = [
# Have to re-enable the standard pragma
# and branches that don't pertain to this version of Python
"pragma: no cover",
"pragma: py{ignore_python_version}",
# Don't complain if tests don't hit defensive assertion code:
"raise AssertionError",
"raise NotImplementedError",
# Don't complain if non-runnable code isn't run
"if __name__ == .__main__.:",
# Don't complain about abstract methods, they aren't run:
'@(abc\.)?abstractmethod',
# Exclude type check blocks and Protocol contents, they aren't run:
"if TYPE_CHECKING:",
'\.\.\.',
# Don't complain about IPython completion helper
"def _ipython_key_completions_",
]
[tool.mypy]
python_version = "3.10"
namespace_packages = true
explicit_package_bases = true
mypy_path = "$MYPY_CONFIG_FILE_DIR/src"
strict = true
disallow_subclassing_any = false
disallow_untyped_defs = true
no_implicit_optional = true
warn_return_any = true
warn_redundant_casts = true
warn_unused_configs = true
warn_unreachable = true
exclude = '''(^|/)tests/'''
plugins = ["numpy.typing.mypy_plugin",]
[[tool.mypy.overrides]]
module = [
"*/tests/*",
"tests/*"
]
ignore_errors = true
[[tool.mypy.overrides]]
module = [
"asdf.*",
"scipy.*",
"torch.*",
]
ignore_missing_imports = true
[tool.ruff]
target-version = "py310"
line-length = 88
select = ["ALL"]
ignore = [
"ANN101", "ANN102", "ANN401",
"ARG001", "ARG002",
"D105", "D107", "D203", "D213",
"ERA001",
"FBT003",
"PD",
"RET505", "RET506", "RET507",
# flake8-commas (COM)
"COM812", # TrailingCommaMissing
"COM818", # TrailingCommaOnBareTupleProhibited
"COM819", # TrailingCommaProhibited
# (FIX)
"FIX002", # Line contains TODO
# ruff (RUF)
"RUF009", # do not perform function call in dataclass defaults
# flake8-todo (TD) # TODO: fix these
"TD",
]
[tool.ruff.flake8-tidy-imports]
ban-relative-imports = "all"
[tool.ruff.isort]
force-sort-within-sections = true
known-third-party = ["numpy", "pytest", "torch"]
known-first-party = ["stream_mapper.core"]
known-local-folder = ["stream_mapper.pytorch"]
[tool.ruff.pylint]
max-args = 6