-
Notifications
You must be signed in to change notification settings - Fork 152
/
pyproject.toml
146 lines (134 loc) · 3.86 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
[build-system]
requires = [
"setuptools>=65", "wheel"
]
build-backend = "setuptools.build_meta"
[project]
name = "sbi"
description = "Simulation-based inference."
authors = [
{ name = "sbi-dev", email = "[email protected]"},
]
classifiers = [
"Intended Audience :: Developers",
"Intended Audience :: Education",
"Intended Audience :: Science/Research",
"Topic :: Adaptive Technologies",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Scientific/Engineering :: Mathematics",
"""License :: OSI Approved :: Apache Software License""",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Development Status :: 3 - Alpha",
]
requires-python = ">=3.9"
dynamic = ["version"]
readme = "README.md"
keywords = ["Bayesian inference", "simulation-based inference", "PyTorch"]
dependencies = [
"arviz",
"joblib>=1.0.0",
"jupyter",
"matplotlib",
"numpy<2.0.0",
"pillow",
"pyknos>=0.16.0",
"pyro-ppl>=1.3.1",
"scikit-learn",
"scipy<1.13",
"tensorboard",
"torch>=1.13.0",
"tqdm",
"pymc>=5.0.0",
"zuko>=1.2.0",
]
[project.optional-dependencies]
doc = [
# Documentation
"ipython <= 8.9.0",
"jupyter_contrib_nbextensions",
"mike",
"mkdocs",
"markdown-include",
"mkdocs-material",
"mkdocs-redirects",
"mkdocstrings[python] >= 0.18",
"nbconvert",
"nbformat",
"notebook <= 6.4.12",
"traitlets <= 5.9.0",
]
dev = [
"ffmpeg",
# Lint
"pre-commit == 3.5.0",
"pyyaml",
"pyright",
"ruff>=0.3.3",
# Test
"pytest",
"pytest-cov",
"pytest-xdist",
"torchtestcase",
]
[project.urls]
documentation = "https://sbi-dev.github.io/sbi/"
source = "https://github.com/sbi-dev/sbi"
tracker = "https://github.com/sbi-dev/sbi/issues"
# Package installation configuration
[tool.setuptools.packages.find]
where = ["."] # list of folders that contain the packages (["."] by default)
include = ["sbi*"] # package names should match these glob patterns (["*"] by default)
exclude = ["sbi-logs*"] # exclude packages matching these glob patterns (empty by default)
namespaces = false # to disable scanning PEP 420 namespaces (true by default)
[tool.setuptools.dynamic]
version = {attr = "sbi.__version__"}
# ruff configs
[tool.ruff]
extend-include = ["*.ipynb"]
line-length = 88
[tool.ruff.lint]
# pycodestyle, Pyflakes, pyupgrade, flake8-bugbear, flake8-simplify, isort
select = ["E", "F", "W", "B", "SIM", "I"]
ignore = [
"E731", # allow naming lambda functions.
"B008", # allow function calls in default args.
]
[tool.ruff.lint.extend-per-file-ignores]
"__init__.py" = ["E402", "F401", "F403"] # allow unused imports and undefined names
"test_*.py" = ["F403", "F405"]
[tool.ruff.lint.isort]
case-sensitive = true
lines-between-types = 0 # like isort default.
relative-imports-order = "furthest-to-closest" # like isort default.
known-first-party = ["sbi", "tests", "tutorials"]
[tool.ruff.format]
exclude = ["*.ipynb"]
preview = true
quote-style = "preserve"
# Pytest configuration
[tool.pytest.ini_options]
minversion = "6.0"
addopts = "-ra -q"
filterwarnings = [
"ignore::DeprecationWarning",
"ignore::PendingDeprecationWarning"
]
testpaths = ["tests"]
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"gpu: marks tests that require a gpu (deselect with '-m \"not gpu\"')",
"mcmc: marks tests that require MCMC sampling (deselect with '-m \"not mcmc\"')"
]
xfail_strict = true
# Pyright configuration
[tool.pyright]
include = ["sbi"]
exclude = ["**/__pycache__", "**/__node_modules__", ".git", "docs", "tutorials", "tests"]
python_version = "3.9"
reportUnsupportedDunderAll = false
reportGeneralTypeIssues = false
reportInvalidTypeForm = false
typeCheckingMode = "basic"