-
Notifications
You must be signed in to change notification settings - Fork 88
Expand file tree
/
Copy pathpyproject.toml
More file actions
177 lines (158 loc) · 4.57 KB
/
Copy pathpyproject.toml
File metadata and controls
177 lines (158 loc) · 4.57 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
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
[project]
name = "pymc-extras"
authors = [
{name = "PyMC Developers", email = "pymc.devs@gmail.com"},
]
description = "A home for new additions to PyMC, which may include unusual probability distribitions, advanced model fitting algorithms, or any code that may be inappropriate to include in the pymc repository, but may want to be made available to users."
classifiers = [
"Development Status :: 5 - Production/Stable",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"License :: OSI Approved :: Apache Software License",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Mathematics",
"Operating System :: OS Independent",
]
readme = "README.md"
requires-python = ">=3.12"
keywords = [
"probability",
"machine learning",
"statistics",
"mcmc",
"sampling",
"bayesian",
]
license = {file = "LICENSE"}
dynamic = ["version"] # specify the version in the __init__.py file
dependencies = [
"pymc>=6.2.0,<6.3",
"pytensor>=3.2.3,<3.3",
"arviz>=1.2,<2.0",
"better-optimize>=0.4.2,<1.0",
"pydantic>=2.0.0,<3.0",
"preliz>=0.27.0,<0.28.0",
]
[project.optional-dependencies]
complete = [
"dask[complete]<2025.1.1",
"xhistogram",
]
dev = [
"pytest>=6.0,<10.0",
"dask[all]<2025.1.1",
"blackjax>=0.12,<2.0",
"statsmodels",
]
docs = [
"nbsphinx>=0.4.2,<1.0",
"sphinx>=4.0,<10.0",
"pymc-sphinx-theme>=0.16,<1.0",
]
dask_histogram = [
"dask[complete]<2025.1.1",
"xhistogram",
]
histogram = [
"xhistogram",
]
[project.urls]
Documentation = "https://pymc-extras.readthedocs.io/"
Repository = "https://github.com/pymc-devs/pymc-extras.git"
Issues = "https://github.com/pymc-devs/pymc-extras/issues"
[tool.hatch.version]
source = 'vcs'
[tool.hatch.build.hooks.vcs]
version-file = "_version.py"
[tool.hatch.build.targets.sdist]
exclude = [
'/.github',
'/notebooks',
]
[tool.hatch.build.targets.wheel]
packages = ["pymc_extras"]
[tool.hatch.metadata]
allow-direct-references = true
[tool.pytest.ini_options]
minversion = "6.0"
xfail_strict = true
addopts = [
"-v",
"--doctest-modules",
"--ignore=pymc_extras/model_builder.py"
]
filterwarnings =[
"error",
# JAX issues an over-eager warning if os.fork() is called when the JAX module is loaded, even if JAX isn't being used
'ignore:os\.fork\(\) was called\.:RuntimeWarning',
# OpenMP library warning on windows CI
'ignore::RuntimeWarning:threadpoolctl',
# Numba warnings that are filtered by PyTensor but re-introduced by pytest
'ignore::numba.core.errors.NumbaPerformanceWarning',
'ignore:.*Cannot cache compiled function.*:numba.core.errors.NumbaWarning',
# PyMC use of cachetools raises this warning: https://github.com/pymc-devs/pymc/issues/8106
'ignore:decorating class methods with @cachedmethod is deprecated:DeprecationWarning'
]
[tool.coverage.report]
exclude_lines = [
"pragma: nocover",
"raise NotImplementedError",
"if TYPE_CHECKING:",
]
[tool.ruff]
line-length = 100
target-version = "py312"
[tool.ruff.format]
docstring-code-format = true
[tool.ruff.lint]
select = ["D", "E", "F", "I", "UP", "W", "RUF"]
ignore = [
"E501",
"RUF001", # String contains ambiguous character (such as Greek letters)
"RUF002", # Docstring contains ambiguous character (such as Greek letters)
"RUF012", # Mutable class attributes should be annotated with `typing.ClassVar`
"RUF059", # Unused unpacked variable -- naming unused tuple elements is idiomatic in PyMC code
"D100",
"D101",
"D102",
"D103",
"D104",
"D105",
"D107",
"D200",
"D202",
"D203",
"D204",
"D205",
"D209",
"D212",
"D213",
"D301",
"D400",
"D401",
"D403",
"D413",
"D415",
"D417",
]
[tool.ruff.lint.isort]
lines-between-types = 1
[tool.ruff.lint.per-file-ignores]
'tests/*.py' = [
'F841', # Unused variable warning for test files -- common in pymc model declarations
'D106', # Missing docstring for public method -- unittest test subclasses don't need docstrings
'E402' # Import at top, not respected when pytest.importorskip is required
]
'tests/statespace/*.py' = [
'F401', # Unused import warning for test files -- this check removes imports of fixtures
'F811' # Redefine while unused -- this check fails on imported fixtures
]
'pymc_extras/__init__.py' = ['F401', 'F403']
'notebooks/*.ipynb' = ['E402'] # Notebooks configure backends and suppress warnings before importing